HELLO·Android
系统源代码
IT资讯
技术文章
我的收藏
注册
登录
-
我收藏的文章
创建代码块
我的代码块
我的账号
Jelly Bean MR2
|
4.3_r1
下载
查看原文件
收藏
根目录
external
chromium-trace
script.js
window.FLATTENED={};window.FLATTENED.base=!0;window.FLATTENED.event_target=!0;window.FLATTENED.measuring_stick=!0;window.FLATTENED.filter=!0;window.FLATTENED.range=!0;window.FLATTENED.selection=!0;window.FLATTENED.timeline_viewport=!0;window.FLATTENED.ui=!0;window.FLATTENED["tracks.track"]=!0;window.FLATTENED["tracks.container_track"]=!0;window.FLATTENED.fast_rect_renderer=!0;window.FLATTENED.color_scheme=!0;window.FLATTENED["tracks.canvas_based_track"]=!0;window.FLATTENED.sorted_array_utils=!0; window.FLATTENED["tracks.slice_track"]=!0;window.FLATTENED.guid=!0;window.FLATTENED["model.slice"]=!0;window.FLATTENED["model.slice_group"]=!0;window.FLATTENED["model.async_slice_group"]=!0;window.FLATTENED["model.sample"]=!0;window.FLATTENED["model.thread"]=!0;window.FLATTENED["model.counter"]=!0;window.FLATTENED["model.process_base"]=!0;window.FLATTENED["model.process"]=!0;window.FLATTENED["model.kernel"]=!0;window.FLATTENED["model.cpu"]=!0;window.FLATTENED.model=!0; window.FLATTENED["tracks.cpu_track"]=!0;window.FLATTENED["tracks.counter_track"]=!0;window.FLATTENED["tracks.slice_group_track"]=!0;window.FLATTENED["tracks.async_slice_group_track"]=!0;window.FLATTENED["tracks.thread_track"]=!0;window.FLATTENED["tracks.process_track"]=!0;window.FLATTENED["tracks.model_track"]=!0;window.FLATTENED["tracks.ruler_track"]=!0;window.FLATTENED.timeline_track_view=!0;window.FLATTENED["analysis.util"]=!0;window.FLATTENED.timeline_analysis_view=!0; window.FLATTENED.overlay=!0;window.FLATTENED.category_filter_dialog=!0;window.FLATTENED.find_control=!0;window.FLATTENED["importer.trace_event_importer"]=!0;window.FLATTENED["importer.linux_perf.parser"]=!0;window.FLATTENED["importer.linux_perf.bus_parser"]=!0;window.FLATTENED["importer.linux_perf.clock_parser"]=!0;window.FLATTENED["importer.linux_perf.cpufreq_parser"]=!0;window.FLATTENED["importer.linux_perf.disk_parser"]=!0;window.FLATTENED["importer.linux_perf.drm_parser"]=!0; window.FLATTENED["importer.linux_perf.exynos_parser"]=!0;window.FLATTENED["importer.linux_perf.gesture_parser"]=!0;window.FLATTENED["importer.linux_perf.i915_parser"]=!0;window.FLATTENED["importer.linux_perf.mali_parser"]=!0;window.FLATTENED["importer.linux_perf.power_parser"]=!0;window.FLATTENED["importer.linux_perf.sched_parser"]=!0;window.FLATTENED["importer.linux_perf.workqueue_parser"]=!0;window.FLATTENED["importer.linux_perf.android_parser"]=!0; window.FLATTENED["importer.linux_perf.kfunc_parser"]=!0;window.FLATTENED["importer.linux_perf_importer"]=!0;window.FLATTENED["importer.v8.log_reader"]=!0;window.FLATTENED["importer.v8.splaytree"]=!0;window.FLATTENED["importer.v8.codemap"]=!0;window.FLATTENED["importer.v8_log_importer"]=!0;window.FLATTENED.settings=!0;window.FLATTENED.timeline_view=!0;"use strict";var global=this; this.base=function(){function d(b){"/"==b[b.length-1]&&(b=b.substring(0,b.length-1));q=b}function c(b,a){r[b]||(r[b]=[]);for(var f=r[b],e=!1,g=0;g
\x3c/script>';base.doc.write(h);v[k]="APPENDED"}}j=r[b]||[];for(d=0;d
\x3c/script>'); w[b]="APPENDED"}}function g(b){if(!window.FLATTENED&&!x[b]){x[b]=!0;b=b.replace(/\./g,"/")+".css";b=q+"/"+b;var a=document.createElement("link");a.setAttribute("rel","stylesheet");a.setAttribute("href",b);base.doc.head.appendChild(a)}}function j(b,a,f,e){var g=new base.Event(a+"Change");g.propertyName=a;g.newValue=f;g.oldValue=e;b.dispatchEvent(g)}function h(b){return b.replace(/([A-Z])/g,"-$1").toLowerCase()}function k(b,a){switch(a){case y.JS:var f=b+"_";return function(){return this[f]};case y.ATTR:var e= h(b);return function(){return this.getAttribute(e)};case y.BOOL_ATTR:return e=h(b),function(){return this.hasAttribute(e)}}}function l(b,a,f){switch(a){case y.JS:var e=b+"_";return function(a){var g=this[e];a!==g&&(this[e]=a,f&&f.call(this,a,g),j(this,b,a,g))};case y.ATTR:var g=h(b);return function(a){var e=this[g];a!==e&&(void 0==a?this.removeAttribute(g):this.setAttribute(g,a),f&&f.call(this,a,e),j(this,b,a,e))};case y.BOOL_ATTR:return g=h(b),function(a){var e=this[g];a!==e&&(a?this.setAttribute(g, b):this.removeAttribute(g),f&&f.call(this,a,e),j(this,b,a,e))}}}function t(b,a,f){var e=base.doc.createEvent("Event");e.initEvent(b,!!a,!!f);e.__proto__=global.Event.prototype;return e}function m(){this.types=[];this.values=[]}var q=".",p=!1,r={},u={},s={},w={},v={},x={},y={JS:"js",ATTR:"attr",BOOL_ATTR:"boolAttr"},z=1;m.prototype={__proto__:Object.prototype,add:function(b,a){this.types.push(b);this.values.push(a)},get:function(b){for(var a=0;a
b.indexOf(a)&&b.push(a)}else this.listeners_[c]=[a]},removeEventListener:function(c,a){if(this.listeners_&&c in this.listeners_){var b=this.listeners_[c],f=b.indexOf(a);0<=f&&(1==b.length?delete this.listeners_[c]:b.splice(f,1))}},dispatchEvent:function(c){if(!this.listeners_)return!0;var a=this;c.__defineGetter__("target", function(){return a});c.preventDefault=function(){this.returnValue=!1};var b=c.type,f=0;if(b in this.listeners_)for(var b=this.listeners_[b].concat(),e=0,g;g=b[e];e++)f=g.handleEvent?f|!1===g.handleEvent.call(g,c):f|!1===g.call(this,c);return!f&&c.returnValue}};return{EventTarget:d}}); base.exportTo("tracing",function(){function d(){this.iframe_=void 0}d.prototype={__proto__:Object.prototype,measure:function(c){this.iframe_.contentDocument.body.appendChild(c);var a=this.iframe_.contentWindow.getComputedStyle(c),b=parseInt(a.width,10),a=parseInt(a.height,10);this.iframe_.contentDocument.body.removeChild(c);return{width:b,height:a}},attach:function(){var c=document.createElement("iframe");c.style.cssText="width:100%;height:0;border:0;visibility:hidden";document.body.appendChild(c); this.iframe_=c;this.iframe_.contentDocument.body.style.cssText="padding:0;margin:0;overflow:hidden";for(var c=document.querySelectorAll("link[rel=stylesheet]"),a=0;a
b||b+f>this.length_)throw Error("Index out of bounds");for(var g=b;g
=b){var c=this.xWorldToView(g);a.moveTo(c,0);a.lineTo(c,e)}g+=this.gridStep}a.strokeStyle="rgba(255,0,0,0.25)";a.stroke()}for(g=0;g
this.xWorldToView(a)?this.xPanWorldPosToViewPos(a,"left",f):this.xWorldToView(b)>f&&this.xPanWorldPosToViewPos(b,"right",f)},xSetWorldBounds:function(a,b, f){this.setPanAndScale(-a,f/(b-a))},get gridEnabled(){return this.gridEnabled_},set gridEnabled(a){this.gridEnabled_!=a&&(this.gridEnabled_=a&&!0,this.dispatchChangeEvent())},get gridTimebase(){return this.gridTimebase_},set gridTimebase(a){this.gridTimebase_!=a&&(this.gridTimebase_=a,base.dispatchSimpleEvent(this,"change"))},get gridStep(){return this.gridStep_},applyTransformToCanvas:function(a){a.transform(this.scaleX_,0,0,1,this.panX_*this.scaleX_,0)},addMarker:function(a){a=new c(this,a);this.markers.push(a); this.dispatchChangeEvent();this.dispatchMarkersChangeEvent_();return a},removeMarker:function(a){for(var b=0;b
=b&&d
=b&&c
l)c.style.width=l+"px";else{c.style.width=0;var a=c.scrollWidth;c.style.width=a
=e.top&&a
this.maxMergeDist_&&this.flush(),this.merging_?(this.mergeCurRight_=f,this.mergedColorId=Math.max(this.mergedColorId,b)):(this.merging_=!0,this.mergeStartX_=c,this.mergeCurRight_= f,this.mergedColorId=b)):(this.merging_&&this.flush(),this.ctx_.fillStyle=this.pallette_[b],this.ctx_.fillRect(c,this.y_,a,this.h_))},flush:function(){this.merging_&&(this.ctx_.fillStyle=this.pallette_[this.mergedColorId],this.ctx_.fillRect(this.mergeStartX_,this.y_,this.mergeCurRight_-this.mergeStartX_,this.h_),this.merging_=!1)}};return{FastRectRenderer:d}});"use strict"; base.exportTo("tracing",function(){function d(b){for(var a=0,f=0;f
this.viewport_.markers.length?this.classList.remove("ruler-track-with-distance-measurements"):this.classList.add("ruler-track-with-distance-measurements")},invalidate:function(){this.rafPending_||(webkitRequestAnimationFrame(function(){this.rafPending_= !1;this.viewport_&&(this.updateCanvasSizeIfNeeded_(),this.redraw())}.bind(this),this),this.rafPending_=!0)},get isAttachedToDocument_(){var c=this.parentNode;if(c){for(;c.parentNode;)c=c.parentNode;return c==this.ownerDocument}},updateCanvasSizeIfNeeded_:function(){var c=window.getComputedStyle(this.canvasContainer_),a=parseInt(c.width)-parseInt(c.paddingLeft)-parseInt(c.paddingRight)-parseInt(c.borderLeftWidth)-parseInt(c.borderRightWidth),c=parseInt(c.height)-parseInt(c.paddingTop)-parseInt(c.paddingBottom)- parseInt(c.borderTopWidth)-parseInt(c.borderBottomWidth),b=window.devicePixelRatio||1;this.canvas_.width!=a&&(this.canvas_.width=a*b,this.canvas_.style.width=a+"px");this.canvas_.height!=c&&(this.canvas_.height=c*b,this.canvas_.style.height=c+"px")},get firstCanvas(){return this.canvas_}};return{CanvasBasedTrack:d}}); base.exportTo("tracing",function(){function d(a,b,f){if(0==a.length)return 1;for(var e=0,g=a.length-1,c,d,k=-1;e<=g;)c=Math.floor((e+g)/2),d=b(a[c])-f,0>d?e=c+1:(0
g)){var h=d(a,b,e);if(-1!=h&&(0
=e&&c(a[h-1]),h!=a.length))for(f=a.length;h
=g);h++)c(a[h])}}return{findLowIndexInSortedArray:d,findLowIndexInSortedIntervals:function(a,b,f,e){var g=d(a,b,e);return 0==g?e>=b(a[0])&&e
=b(a[g-1])&&e
e)break;var v=Math.max(s.duration,0.001),x=s.selected?s.colorId+f:s.colorId;v
e)break;s.duration>w&&(r=s.title,s.didNotFinish&&(r+=" (Did Not Finish)"),x=this.labelWidth(r),v&&this.labelWidthWorld(r,d)>s.duration&&(x=this.elidedTitleCache.get(this,d, r,x,s.duration),r=x.string,x=x.width),x*d
=e.bottom)return!1;b=this.viewport_.xViewVectorToWorld(b*devicePixelRatio);b=tracing.findLowIndexInSortedIntervals(this.slices_,function(b){return b.start},function(b){return b.duration},b);return 0<=b&&b
e)){var p=this;tracing.iterateOverIntersectingIntervals(this.slices_,function(b){return b.start},function(b){return b.duration},b,a,c)}},indexOfSlice_:function(b){for(var a=tracing.findLowIndexInSortedArray(this.slices_, function(b){return b.start},b.start);a
a||a>=this.slices_.length)return!1;b=f.addSlice(this,this.slices_[a]);this.decorateHit(b);return!0},addAllObjectsMatchingFilterToSelection:function(b,a){for(var f=0;f
d;)f=f.substring(0,0.75*f.length),m=!0;m&&3
=this.openPartialSlices_[this.openPartialSlices_.length-1].start},get openSliceCount(){return this.openPartialSlices_.length},endSlice:function(a){if(!this.openSliceCount)throw Error("endSlice called without an open slice");var b=this.openPartialSlices_[this.openSliceCount-1];this.openPartialSlices_.splice(this.openSliceCount- 1,1);if(a
f?(t(a),k.pop()):l.pop()}};0<=c||0<=h;){var q=e[c],p=g[h];void 0===q||void 0!==p&&q.end
a&&(a=f)}this.maxTotal=a}}};d.compare=function(c,a){var b=c.parent.compareTo(a);if(0!=b)return b;b=c.name.localeCompare(a.name);return 0==b?c.tid-a.tid:b};return{Counter:d}});"use strict";base.require("range");base.require("guid");base.require("model.thread");base.require("model.counter"); base.exportTo("tracing.model",function(){function d(){this.guid_=tracing.GUID.allocate();this.threads={};this.counters={};this.bounds=new base.Range}var c=tracing.model.Thread,a=tracing.model.Counter;d.prototype={get guid(){return this.guid_},get numThreads(){var b=0,a;for(a in this.threads)b++;return b},shiftTimestampsForward:function(b){for(var a in this.threads)this.threads[a].shiftTimestampsForward(b);for(var e in this.counters)this.counters[e].shiftTimestampsForward(b)},autoCloseOpenSlices:function(b){for(var a in this.threads)this.threads[a].autoCloseOpenSlices(b)}, mergeKernelWithUserland:function(){for(var b in this.threads)this.threads[b].mergeKernelWithUserland()},updateBounds:function(){this.bounds.reset();for(var b in this.threads)this.threads[b].updateBounds(),this.bounds.addRange(this.threads[b].bounds);for(var a in this.counters)this.counters[a].updateBounds(),this.bounds.addRange(this.counters[a].bounds)},addCategoriesToDict:function(b){for(var a in this.threads)this.threads[a].addCategoriesToDict(b);for(var e in this.counters)b[this.counters[e].category]= !0},findAllThreadsNamed:function(b){var a=[],e;for(e in this.threads){var c=this.threads[e];c.name==b&&a.push(c)}return a},pruneEmptyContainers:function(){var b={},a;for(a in this.threads){var e=this.threads[a];e.isEmpty||(b[a]=e)}this.threads=b},getOrCreateThread:function(b){this.threads[b]||(this.threads[b]=new c(this,b));return this.threads[b]},getOrCreateCounter:function(b,f){var e=b+"."+f;this.counters[e]||(this.counters[e]=new a(this,e,b,f));return this.counters[e]}};return{ProcessBase:d}}); "use strict";base.require("model.process_base");base.exportTo("tracing.model",function(){function d(c){tracing.model.ProcessBase.call(this);this.pid=c}d.compare=function(c,a){return c.pid-a.pid};d.prototype={__proto__:tracing.model.ProcessBase.prototype,compareTo:function(c){return d.compare(this,c)},get userFriendlyName(){return this.pid},get userFriendlyDetails(){return"pid: "+this.pid}};return{Process:d}});"use strict";base.require("model.process_base"); base.exportTo("tracing.model",function(){function d(){tracing.model.ProcessBase.call(this)}d.compare=function(){return 0};d.prototype={__proto__:tracing.model.ProcessBase.prototype,compareTo:function(c){return d.compare(this,c)},get userFriendlyName(){return"kernel"},get userFriendlyDetails(){return"kernel"}};return{Kernel:d}});"use strict";base.require("range");base.require("model.slice");base.require("model.counter"); base.exportTo("tracing.model",function(){function d(a){this.cpuNumber=a;this.slices=[];this.counters={};this.bounds=new base.Range}var c=tracing.model.Counter;d.prototype={getOrCreateCounter:function(a,b){var f;f=a.length?a+"."+b:b;this.counters[f]||(this.counters[f]=new c(this,f,a,b));return this.counters[f]},shiftTimestampsForward:function(a){for(var b=0;b
=t){b.lineTo(u,s);b.lineTo(u+8*j,s);b.lineTo(u+8*j,e);break}var x=a.timestamps[v],y=a.totals[v*l+p],y=e-q*y;if(x>f){b.lineTo(x,s);b.lineTo(x,e);break}if(v+1
=e.bottom)return!1;b=this.viewport_.xViewVectorToWorld(a*devicePixelRatio);e=this.counter_;if(a
a||a>=e.timestamps.length)return!1;0
this.counter_.timestamps[a-1]&&a--;this.getBoundingClientRect();f=f.addCounterSample(this,this.counter,a);this.decorateHit(f);return!0},addIntersectingItemsInRangeToSelection:function(a,b,f,e,c){var d=this.getBoundingClientRect();f=Math.max(f,d.top);e=Math.min(e,d.bottom);if(!(f>e)){e=this.counter_;d=window.devicePixelRatio||1;a=this.viewport_.xViewToWorld(a*d);d=this.viewport_.xViewToWorld(b* d);f=tracing.findLowIndexInSortedArray(e.timestamps,function(b){return b},a);b=tracing.findLowIndexInSortedArray(e.timestamps,function(b){return b},d);0
e.timestamps[f-1]&&f--;0
e.timestamps[b-1]&&b--;for(a=f;a<=b;a++)a>=e.timestamps.length||(d=c.addCounterSample(this,this.counter,a),this.decorateHit(d))}},addAllObjectsMatchingFilterToSelection:function(){}};return{CounterTrack:c}});"use strict";base.require("tracks.container_track");base.require("sorted_array_utils");base.require("ui"); base.exportTo("tracing.tracks",function(){var d=tracing.ui.define(tracing.tracks.ContainerTrack);d.prototype={__proto__:tracing.tracks.ContainerTrack.prototype,decorate:function(){this.classList.add("slice-group-track")},get group(){return this.group_},set group(c){this.group_=c;this.updateChildTracks_()},set heading(c){this.tracks_.length&&(this.tracks_[0].heading=c)},set tooltip(c){this.tracks_.length&&(this.tracks_[0].tooltip=c)},set decorateHit(c){this.decorateHit_=c;this.updateChildTracks_()}, applyCategoryFilter_:function(){this.updateChildTracks_()},addSliceTrack_:function(c){var a=new tracing.tracks.SliceTrack;a.slices=c;a.decorateHit=this.decorateHit_;this.addTrack_(a);return a},updateChildTracks_:function(){if(this.group_){var c=tracing.filterSliceArray(this.categoryFilter,this.group_.slices);if(c.length){if(this.visible=!0,!this.areArrayContentsSame_(this.filteredSlices_,c)){this.filteredSlices_=c;this.detach();this.subRows_=this.buildSubRows_(c);for(c=0;c
=h.start&&e.end<=h.end){for(;f.length<=d+1;)f.push([]);f[d+1].push(e);h.subSlices&&h.subSlices.push(e);g=!0;break}}g||f[0].push(e)}return f},areArrayContentsSame_:function(c,a){if(!c||!a||(!c.length||!a.length)||c.length!=a.length)return!1;for(var b=0;b
=d[d.length-1].end){e=!0;if(void 0===f.subSlices||1>f.subSlices.length)throw Error("AsyncEvent missing subSlices: ")+f.name;for(g=0;g
a&&(a=e)}this.headingWidth=a+ "px"},updateChildTracks_:function(){this.detachAllChildren();if(this.model_){var c=this.model_.getAllCpus();c.sort(tracing.model.Cpu.compare);for(var a=0;a
q?(m="ms",p=1,r=this.strings_msecs_):(m="s",p=1E3,r=this.strings_secs_);var u=e.xWorldVectorToView(q/ 5),l=Math.floor(g/q)*q,f=Math.floor(0.25*f);a.fillStyle="rgb(0, 0, 0)";a.strokeStyle="rgb(0, 0, 0)";a.textAlign="left";a.textBaseline="top";t=window.devicePixelRatio||1;a.font=9*t+"px sans-serif";for(g=l;g
l;++l){var w=Math.floor(s+u*l);a.moveTo(w,k-f);a.lineTo(w,k)}a.stroke()}if(h){a.moveTo(0,k);a.lineTo(b,k);a.stroke();b=e.markers.slice(); b.sort(function(b,a){return b.positionWorld_-a.positionWorld_});k+=2;d=k+4;for(l=0;l
u?(m="ms",p=1):(m="s",p=1E3),p=u/p,m=Math.abs(Math.floor(1E3*p)/1E3)+" "+m,p=a.measureText(m).width,f=e.xViewVectorToWorld(p),p=p+26+10,g=r.positionWorld+u/2-f/2,s=g+f,u=k,f=e.xWorldToView(g),g=e.xWorldToView(s),r=e.xWorldToView(r.positionWorld),t=e.xWorldToView(t.positionWorld),s=!1, p<=q&&(a.fillStyle="rgb(0,0,0)",a.fillText(m,f,u),s=!0),26<=q&&(s?(m=f-10,p=g+10):p=m=h,this.drawArrow_(a,m,d,r,d,3,"rgb(128,121,121)"),this.drawArrow_(a,p,d,t,d,3,"rgb(128,121,121)"))}},addIntersectingItemsToSelection:function(){},addIntersectingItemsInRangeToSelection:function(){},addAllObjectsMatchingFilterToSelection:function(){}};return{RulerTrack:d}});"use strict";base.requireStylesheet("timeline_track_view");base.require("event_target");base.require("measuring_stick");base.require("filter"); base.require("selection");base.require("timeline_viewport");base.require("tracks.model_track");base.require("tracks.ruler_track");base.require("ui"); base.exportTo("tracing",function(){var d=tracing.Selection,c=tracing.TimelineViewport,a=tracing.ui.define("div");a.prototype={__proto__:HTMLDivElement.prototype,model_:null,decorate:function(){this.classList.add("timeline-track-view");this.categoryFilter_=new tracing.CategoryFilter;this.viewport_=new c(this);this.rulerTrack_=new tracing.tracks.RulerTrack;this.rulerTrack_.viewport=this.viewport_;this.appendChild(this.rulerTrack_);this.modelTrackContainer_=document.createElement("div");this.modelTrackContainer_.className= "model-track-container";this.appendChild(this.modelTrackContainer_);this.modelTrack_=new tracing.tracks.ModelTrack;this.modelTrackContainer_.appendChild(this.modelTrack_);this.dragBox_=this.ownerDocument.createElement("div");this.dragBox_.className="drag-box";this.appendChild(this.dragBox_);this.hideDragBox_();this.bindEventListener_(document,"keypress",this.onKeypress_,this);this.bindEventListener_(document,"keydown",this.onKeydown_,this);this.bindEventListener_(document,"keyup",this.onKeyup_,this); this.bindEventListener_(document,"mousemove",this.onMouseMove_,this);this.bindEventListener_(document,"mouseup",this.onMouseUp_,this);this.addEventListener("mousewheel",this.onMouseWheel_);this.addEventListener("mousedown",this.onMouseDown_);this.addEventListener("dblclick",this.onDblClick_);this.lastMouseViewPos_={x:0,y:0};this.maxHeadingWidth_=0;this.selection_=new d},bindEventListener_:function(b,a,e,c){this.boundListeners_||(this.boundListeners_=[]);e=e.bind(c);this.boundListeners_.push({object:b, event:a,boundFunc:e});b.addEventListener(a,e)},detach:function(){this.modelTrack_.detach();for(var b=0;b
: Select next event on current timeline\n":b+"General Navigation\n g/General : Shows grid at the start/end of the selected task\n <-,^TAB : Select previous event on current timeline\n ->, TAB : Select next event on current timeline\n";return b+"\nAlt + Scroll to zoom in/out\nDbl-click to zoom in; Shift dbl-click to zoom out\nf to zoom into selection\nz to reset zoom and pan to initial view\n"}, get selection(){return this.selection_},set selection(b){if(!(b instanceof d))throw Error("Expected Selection");var a;for(a=0;a
c?(c=e.min+0.5*(e.max-e.min),e=5*(e.max-e.min),this.viewport_.xSetWorldBounds(c-0.5*e,c+0.5*e,this.firstCanvas.width)):this.viewport_.xPanWorldBoundsIntoView(e.min,e.max,this.firstCanvas.width)},get firstCanvas(){if(this.rulerTrack_)return this.rulerTrack_.firstCanvas;if(this.modelTrack_)return this.modelTrack_.firstCanvas},hideDragBox_:function(){this.dragBox_.style.left="-1000px";this.dragBox_.style.top="-1000px";this.dragBox_.style.width=0;this.dragBox_.style.height= 0},setDragBoxPosition_:function(b,a,e,c,d){var h=Math.min(b,e);b=Math.max(b,e);e=this.modelTrack_.getBoundingClientRect();d?(d=e.top,e=e.bottom):(d=Math.min(a,c),e=Math.max(a,c));a=d;c=h+(b-h);d=a+(e-d);var k=this.modelTrackContainer_.getBoundingClientRect();e=k.left;var l=k.top,t=k.right,k=k.bottom,m=parseInt(this.modelTrack_.headingWidth);e+=m;m={};h>t||c
k||d
=e.left&&b.clientX
=e.top&&b.clientY
=c.left&&b.clientX
a||(e=4,b.shiftKey&&(e=1/e),this.zoomBy_(e),b.preventDefault())}};base.defineProperty(a,"model",base.PropertyKind.JS);return{TimelineTrackView:a}});"use strict";base.exportTo("tracing.analysis",function(){return{tsRound:function(d){return Math.round(1E3*d)/1E3}}});"use strict";base.require("analysis.util");base.require("ui");base.requireStylesheet("timeline_analysis_view"); base.exportTo("tracing",function(){function d(b,a){var e=a.getSliceHitsAsSelection(),c=a.getCounterSampleHitsAsSelection();if(1==e.length){var d=e[0].slice,h=b.appendTable("analysis-slice-table",2);b.appendTableHeader(h,"Selected slice:");b.appendSummaryRow(h,"Title",d.title);d.category&&b.appendSummaryRow(h,"Category",d.category);b.appendSummaryRowTime(h,"Start",d.start);b.appendSummaryRowTime(h,"Duration",d.duration);d.durationInUserTime&&b.appendSummaryRowTime(h,"Duration (U)",d.durationInUserTime); var e=0,k;for(k in d.args)e+=1;if(0
this.currentHitIndex_&&(this.currentHitIndex_=b-1);this.currentHitIndex_>=b&&(this.currentHitIndex_=0);0>this.currentHitIndex_||this.currentHitIndex_>=b?this.timeline.selection=new tracing.Selection:(a=0==this.currentHitIndex_, b=this.filterHits.subSelection(this.currentHitIndex_),this.timeline.setSelectionAndMakeVisible(b,a))}},findNext:function(){this.find_(1)},findPrevious:function(){this.find_(-1)}};return{FindControl:c,FindController:d}});base.require("model");base.require("color_scheme"); base.exportTo("tracing.importer",function(){function d(c,a){this.importPriority=1;this.model_=c;"string"===typeof a||a instanceof String?("["==a[0]&&(n=a.length,"\n"==a[n-1]&&(a=a.substring(0,n-1),n--,"\r"==a[n-1]&&(a=a.substring(0,n-1),n--)),","==a[n-1]&&(a=a.substring(0,n-1)),"]"!=a[n-1]&&(a+="]")),this.events_=JSON.parse(a)):this.events_=a;if(this.events_.traceEvents){var b=this.events_;this.events_=this.events_.traceEvents;for(fieldName in b)"traceEvents"!=fieldName&&this.model_.metadata.push({name:fieldName, value:b[fieldName]})}this.allAsyncEvents_=[]}d.canImport=function(c){return"string"===typeof c||c instanceof String?"{"==c[0]||"["==c[0]:c instanceof Array&&c.length&&c[0].ph?!0:c.traceEvents?c.traceEvents instanceof Array&&c.traceEvents[0].ph:!1};d.prototype={__proto__:Object.prototype,processAsyncEvent:function(c,a){var b=this.model_.getOrCreateProcess(a.pid).getOrCreateThread(a.tid);this.allAsyncEvents_.push({event:a,thread:b})},processCounterEvent:function(c){var a;a=void 0!==c.id?c.name+"["+ c.id+"]":c.name;a=this.model_.getOrCreateProcess(c.pid).getOrCreateCounter(c.cat,a);if(0==a.numSeries){for(var b in c.args)a.seriesNames.push(b),a.seriesColors.push(tracing.getStringColorId(a.name+"."+b));if(0==a.numSeries){this.model_.importErrors.push("Expected counter "+c.name+" to have at least one argument to use as a value.");delete a.parent.counters[a.name];return}}a.timestamps.push(c.ts/1E3);for(var f=0;f
\w+), write=(\w+=>\w+)/.exec(d.details);if(!b)return!1;c=b[1];this.i915GemObjectSlice(e,a,c,{obj:c,read:b[2],write:b[3]});return!0},gemObjectPreadWriteEvent:function(a,b,c,e,d){d=/obj=(\w+), offset=(\d+), len=(\d+)/.exec(d.details);if(!d)return!1;b=d[1];c=parseInt(d[2]);d=parseInt(d[3]);this.i915GemObjectSlice(e,a,b,{obj:b,offset:c,len:d});return!0},gemObjectFaultEvent:function(a,b,c,e,d){d=/obj=(\w+), (\w+) index=(\d+)/.exec(d.details); if(!d)return!1;b=d[1];c=d[2];d=parseInt(d[3]);this.i915GemObjectSlice(e,a,b,{obj:b,type:c,index:d});return!0},gemObjectDestroyEvent:function(a,b,c,e,d){b=/obj=(\w+)/.exec(d.details);if(!b)return!1;b=b[1];this.i915GemObjectSlice(e,a,b,{obj:b});return!0},gemRingDispatchEvent:function(a,b,c,e,d){d=/dev=(\d+), ring=(\d+), seqno=(\d+)/.exec(d.details);if(!d)return!1;b=parseInt(d[1]);c=parseInt(d[2]);d=parseInt(d[3]);this.i915GemRingSlice(e,a,b,c,{dev:b,ring:c,seqno:d});return!0},gemRingFlushEvent:function(a, b,c,e,d){b=/dev=(\d+), ring=(\w+), invalidate=(\w+), flush=(\w+)/.exec(d.details);if(!b)return!1;c=parseInt(b[1]);d=parseInt(b[2]);this.i915GemRingSlice(e,a,c,d,{dev:c,ring:d,invalidate:b[3],flush:b[4]});return!0},gemRequestEvent:function(a,b,c,e,d){d=/dev=(\d+), ring=(\d+), seqno=(\d+)/.exec(d.details);if(!d)return!1;b=parseInt(d[1]);c=parseInt(d[2]);d=parseInt(d[3]);this.i915GemRingSlice(e,a,b,c,{dev:b,ring:c,seqno:d});return!0},gemRingWaitEvent:function(a,b,c,e,d){c=/dev=(\d+), ring=(\d+)/.exec(d.details); if(!c)return!1;b=parseInt(c[1]);c=parseInt(c[2]);this.i915GemRingSlice(e,a,b,c,{dev:b,ring:c});return!0},regRWEvent:function(a,b,c,e,d){a=/(\w+) reg=(\w+), len=(\d+), val=(\(\w+, \w+\))/.exec(d.details);if(!a)return!1;b=a[1];c=a[2];this.i915RegSlice(e,b,c,{rw:b,reg:c,len:a[3],data:a[3]});return!0},flipEvent:function(a,b,c,e,d){c=/plane=(\d+), obj=(\w+)/.exec(d.details);if(!c)return!1;b=parseInt(c[1]);c=c[2];"i915_flip_request"==a?this.i915FlipOpenSlice(e,c,b):this.i915FlipCloseSlice(e,{obj:c,plane:b}); return!0}};c.registerSubtype(d);return{I915Parser:d}});base.require("importer.linux_perf.parser"); base.exportTo("tracing.importer.linux_perf",function(){function d(a){c.call(this,a);a.registerEventHandler("mali_dvfs_event",d.prototype.dvfsEventEvent.bind(this));a.registerEventHandler("mali_dvfs_set_clock",d.prototype.dvfsSetClockEvent.bind(this));a.registerEventHandler("mali_dvfs_set_voltage",d.prototype.dvfsSetVoltageEvent.bind(this));this.addJMCounter("mali_hwc_MESSAGES_SENT","Messages Sent");this.addJMCounter("mali_hwc_MESSAGES_RECEIVED","Messages Received");this.addJMCycles("mali_hwc_GPU_ACTIVE", "GPU Active");this.addJMCycles("mali_hwc_IRQ_ACTIVE","IRQ Active");for(var b=0;7>b;b++){var f="JS"+b,e="mali_hwc_"+f;this.addJMCounter(e+"_JOBS",f+" Jobs");this.addJMCounter(e+"_TASKS",f+" Tasks");this.addJMCycles(e+"_ACTIVE",f+" Active");this.addJMCycles(e+"_WAIT_READ",f+" Wait Read");this.addJMCycles(e+"_WAIT_ISSUE",f+" Wait Issue");this.addJMCycles(e+"_WAIT_DEPEND",f+" Wait Depend");this.addJMCycles(e+"_WAIT_FINISH",f+" Wait Finish")}this.addTilerCounter("mali_hwc_TRIANGLES","Triangles");this.addTilerCounter("mali_hwc_QUADS", "Quads");this.addTilerCounter("mali_hwc_POLYGONS","Polygons");this.addTilerCounter("mali_hwc_POINTS","Points");this.addTilerCounter("mali_hwc_LINES","Lines");this.addTilerCounter("mali_hwc_VCACHE_HIT","VCache Hit");this.addTilerCounter("mali_hwc_VCACHE_MISS","VCache Miss");this.addTilerCounter("mali_hwc_FRONT_FACING","Front Facing");this.addTilerCounter("mali_hwc_BACK_FACING","Back Facing");this.addTilerCounter("mali_hwc_PRIM_VISIBLE","Prim Visible");this.addTilerCounter("mali_hwc_PRIM_CULLED","Prim Culled"); this.addTilerCounter("mali_hwc_PRIM_CLIPPED","Prim Clipped");this.addTilerCounter("mali_hwc_WRBUF_HIT","Wrbuf Hit");this.addTilerCounter("mali_hwc_WRBUF_MISS","Wrbuf Miss");this.addTilerCounter("mali_hwc_WRBUF_LINE","Wrbuf Line");this.addTilerCounter("mali_hwc_WRBUF_PARTIAL","Wrbuf Partial");this.addTilerCounter("mali_hwc_WRBUF_STALL","Wrbuf Stall");this.addTilerCycles("mali_hwc_ACTIVE","Tiler Active");this.addTilerCycles("mali_hwc_INDEX_WAIT","Index Wait");this.addTilerCycles("mali_hwc_INDEX_RANGE_WAIT", "Index Range Wait");this.addTilerCycles("mali_hwc_VERTEX_WAIT","Vertex Wait");this.addTilerCycles("mali_hwc_PCACHE_WAIT","Pcache Wait");this.addTilerCycles("mali_hwc_WRBUF_WAIT","Wrbuf Wait");this.addTilerCycles("mali_hwc_BUS_READ","Bus Read");this.addTilerCycles("mali_hwc_BUS_WRITE","Bus Write");this.addTilerCycles("mali_hwc_TILER_UTLB_STALL","Tiler UTLB Stall");this.addTilerCycles("mali_hwc_TILER_UTLB_HIT","Tiler UTLB Hit");this.addFragCycles("mali_hwc_FRAG_ACTIVE","Active");this.addFragCounter("mali_hwc_FRAG_PRIMATIVES", "Primitives");this.addFragCounter("mali_hwc_FRAG_PRIMATIVES_DROPPED","Primitives Dropped");this.addFragCycles("mali_hwc_FRAG_CYCLE_DESC","Descriptor Processing");this.addFragCycles("mali_hwc_FRAG_CYCLES_PLR","PLR Processing??");this.addFragCycles("mali_hwc_FRAG_CYCLES_VERT","Vertex Processing");this.addFragCycles("mali_hwc_FRAG_CYCLES_TRISETUP","Triangle Setup");this.addFragCycles("mali_hwc_FRAG_CYCLES_RAST","Rasterization???");this.addFragCounter("mali_hwc_FRAG_THREADS","Threads");this.addFragCounter("mali_hwc_FRAG_DUMMY_THREADS", "Dummy Threads");this.addFragCounter("mali_hwc_FRAG_QUADS_RAST","Quads Rast");this.addFragCounter("mali_hwc_FRAG_QUADS_EZS_TEST","Quads EZS Test");this.addFragCounter("mali_hwc_FRAG_QUADS_EZS_KILLED","Quads EZS Killed");this.addFragCounter("mali_hwc_FRAG_QUADS_LZS_TEST","Quads LZS Test");this.addFragCounter("mali_hwc_FRAG_QUADS_LZS_KILLED","Quads LZS Killed");this.addFragCycles("mali_hwc_FRAG_CYCLE_NO_TILE","No Tiles");this.addFragCounter("mali_hwc_FRAG_NUM_TILES","Tiles");this.addFragCounter("mali_hwc_FRAG_TRANS_ELIM", "Transactions Eliminated");this.addComputeCycles("mali_hwc_COMPUTE_ACTIVE","Active");this.addComputeCounter("mali_hwc_COMPUTE_TASKS","Tasks");this.addComputeCounter("mali_hwc_COMPUTE_THREADS","Threads Started");this.addComputeCycles("mali_hwc_COMPUTE_CYCLES_DESC","Waiting for Descriptors");this.addTripipeCycles("mali_hwc_TRIPIPE_ACTIVE","Active");this.addArithCounter("mali_hwc_ARITH_WORDS","Instructions (/Pipes)");this.addArithCycles("mali_hwc_ARITH_CYCLES_REG","Reg scheduling stalls (/Pipes)");this.addArithCycles("mali_hwc_ARITH_CYCLES_L0", "L0 cache miss stalls (/Pipes)");this.addArithCounter("mali_hwc_ARITH_FRAG_DEPEND","Frag dep check failures (/Pipes)");this.addLSCounter("mali_hwc_LS_WORDS","Instruction Words Completed");this.addLSCounter("mali_hwc_LS_ISSUES","Full Pipeline Issues");this.addLSCounter("mali_hwc_LS_RESTARTS","Restarts (unpairable insts)");this.addLSCounter("mali_hwc_LS_REISSUES_MISS","Pipeline reissue (cache miss/uTLB)");this.addLSCounter("mali_hwc_LS_REISSUES_VD","Pipeline reissue (varying data)");this.addLSCounter("mali_hwc_LS_REISSUE_ATTRIB_MISS", "Pipeline reissue (attribute cache miss)");this.addLSCounter("mali_hwc_LS_REISSUE_NO_WB","Writeback not used");this.addTexCounter("mali_hwc_TEX_WORDS","Words");this.addTexCounter("mali_hwc_TEX_BUBBLES","Bubbles");this.addTexCounter("mali_hwc_TEX_WORDS_L0","Words L0");this.addTexCounter("mali_hwc_TEX_WORDS_DESC","Words Desc");this.addTexCounter("mali_hwc_TEX_THREADS","Threads");this.addTexCounter("mali_hwc_TEX_RECIRC_FMISS","Recirc due to Full Miss");this.addTexCounter("mali_hwc_TEX_RECIRC_DESC","Recirc due to Desc Miss"); this.addTexCounter("mali_hwc_TEX_RECIRC_MULTI","Recirc due to Multipass");this.addTexCounter("mali_hwc_TEX_RECIRC_PMISS","Recirc due to Partial Cache Miss");this.addTexCounter("mali_hwc_TEX_RECIRC_CONF","Recirc due to Cache Conflict");this.addLSCCounter("mali_hwc_LSC_READ_HITS","Read Hits");this.addLSCCounter("mali_hwc_LSC_READ_MISSES","Read Misses");this.addLSCCounter("mali_hwc_LSC_WRITE_HITS","Write Hits");this.addLSCCounter("mali_hwc_LSC_WRITE_MISSES","Write Misses");this.addLSCCounter("mali_hwc_LSC_ATOMIC_HITS", "Atomic Hits");this.addLSCCounter("mali_hwc_LSC_ATOMIC_MISSES","Atomic Misses");this.addLSCCounter("mali_hwc_LSC_LINE_FETCHES","Line Fetches");this.addLSCCounter("mali_hwc_LSC_DIRTY_LINE","Dirty Lines");this.addLSCCounter("mali_hwc_LSC_SNOOPS","Snoops");this.addAXICounter("mali_hwc_AXI_TLB_STALL","Address channel stall");this.addAXICounter("mali_hwc_AXI_TLB_MISS","Cache Miss");this.addAXICounter("mali_hwc_AXI_TLB_TRANSACTION","Transactions");this.addAXICounter("mali_hwc_LS_TLB_MISS","LS Cache Miss"); this.addAXICounter("mali_hwc_LS_TLB_HIT","LS Cache Hit");this.addAXICounter("mali_hwc_AXI_BEATS_READ","Read Beats");this.addAXICounter("mali_hwc_AXI_BEATS_WRITE","Write Beats");this.addMMUCounter("mali_hwc_MMU_TABLE_WALK","Page Table Walks");this.addMMUCounter("mali_hwc_MMU_REPLAY_MISS","Cache Miss from Replay Buffer");this.addMMUCounter("mali_hwc_MMU_REPLAY_FULL","Replay Buffer Full");this.addMMUCounter("mali_hwc_MMU_NEW_MISS","Cache Miss on New Request");this.addMMUCounter("mali_hwc_MMU_HIT","Cache Hit"); this.addMMUCycles("mali_hwc_UTLB_STALL","UTLB Stalled");this.addMMUCycles("mali_hwc_UTLB_REPLAY_MISS","UTLB Replay Miss");this.addMMUCycles("mali_hwc_UTLB_REPLAY_FULL","UTLB Replay Full");this.addMMUCycles("mali_hwc_UTLB_NEW_MISS","UTLB New Miss");this.addMMUCycles("mali_hwc_UTLB_HIT","UTLB Hit");this.addL2Counter("mali_hwc_L2_READ_BEATS","Read Beats");this.addL2Counter("mali_hwc_L2_WRITE_BEATS","Write Beats");this.addL2Counter("mali_hwc_L2_ANY_LOOKUP","Any Lookup");this.addL2Counter("mali_hwc_L2_READ_LOOKUP", "Read Lookup");this.addL2Counter("mali_hwc_L2_SREAD_LOOKUP","Shareable Read Lookup");this.addL2Counter("mali_hwc_L2_READ_REPLAY","Read Replayed");this.addL2Counter("mali_hwc_L2_READ_SNOOP","Read Snoop");this.addL2Counter("mali_hwc_L2_READ_HIT","Read Cache Hit");this.addL2Counter("mali_hwc_L2_CLEAN_MISS","CleanUnique Miss");this.addL2Counter("mali_hwc_L2_WRITE_LOOKUP","Write Lookup");this.addL2Counter("mali_hwc_L2_SWRITE_LOOKUP","Shareable Write Lookup");this.addL2Counter("mali_hwc_L2_WRITE_REPLAY", "Write Replayed");this.addL2Counter("mali_hwc_L2_WRITE_SNOOP","Write Snoop");this.addL2Counter("mali_hwc_L2_WRITE_HIT","Write Cache Hit");this.addL2Counter("mali_hwc_L2_EXT_READ_FULL","ExtRD with BIU Full");this.addL2Counter("mali_hwc_L2_EXT_READ_HALF","ExtRD with BIU >1/2 Full");this.addL2Counter("mali_hwc_L2_EXT_WRITE_FULL","ExtWR with BIU Full");this.addL2Counter("mali_hwc_L2_EXT_WRITE_HALF","ExtWR with BIU >1/2 Full");this.addL2Counter("mali_hwc_L2_EXT_READ","External Read (ExtRD)");this.addL2Counter("mali_hwc_L2_EXT_READ_LINE", "ExtRD (linefill)");this.addL2Counter("mali_hwc_L2_EXT_WRITE","External Write (ExtWR)");this.addL2Counter("mali_hwc_L2_EXT_WRITE_LINE","ExtWR (linefill)");this.addL2Counter("mali_hwc_L2_EXT_WRITE_SMALL","ExtWR (burst size <64B)");this.addL2Counter("mali_hwc_L2_EXT_BARRIER","External Barrier");this.addL2Counter("mali_hwc_L2_EXT_AR_STALL","Address Read stalls");this.addL2Counter("mali_hwc_L2_EXT_R_BUF_FULL","Response Buffer full stalls");this.addL2Counter("mali_hwc_L2_EXT_RD_BUF_FULL","Read Data Buffer full stalls"); this.addL2Counter("mali_hwc_L2_EXT_R_RAW","RAW hazard stalls");this.addL2Counter("mali_hwc_L2_EXT_W_STALL","Write Data stalls");this.addL2Counter("mali_hwc_L2_EXT_W_BUF_FULL","Write Data Buffer full");this.addL2Counter("mali_hwc_L2_EXT_R_W_HAZARD","WAW or WAR hazard stalls");this.addL2Counter("mali_hwc_L2_TAG_HAZARD","Tag hazard replays");this.addL2Cycles("mali_hwc_L2_SNOOP_FULL","Snoop buffer full");this.addL2Cycles("mali_hwc_L2_REPLAY_FULL","Replay buffer full");a.registerEventHandler("tracing_mark_write:mali_driver", d.prototype.maliDDKEvent.bind(this));this.model_=a.model_}var c=tracing.importer.linux_perf.Parser;d.prototype={__proto__:c.prototype,maliDDKOpenSlice:function(a,b,c,e,d){a=this.importer.model_.getOrCreateProcess(a).getOrCreateThread(b);e=/^([\w\d_]*)(?:\(\))?:?\s*(.*)$/.exec(e);a.beginSlice("gpu-driver",e[1],c,{args:e[2],blockinfo:d})},maliDDKCloseSlice:function(a,b,c){a=this.importer.model_.getOrCreateProcess(a).getOrCreateThread(b);a.openSliceCount&&a.endSlice(c)},autoDetectLineRE:function(a){var b= /^\s*\(([\w\-]*)\)\s*(\w+):\s*([\w\\\/\.\-]*@\d*):?\s*(.*)$/;if(b.test(a))return b;b=/^s*()(\w+):\s*([\w\\\/.\-]*):?\s*(.*)$/;return b.test(a)?b:null},lineRE:null,maliDDKEvent:function(a,b,c,e,d){if(null==this.lineRE&&(this.lineRE=this.autoDetectLineRE(d.details),null==this.lineRE))return!1;a=this.lineRE.exec(d.details);b=""===a[1]?"mali":a[1];switch(a[2]){case "cros_trace_print_enter":this.maliDDKOpenSlice(c,b,e,a[4],a[3]);break;case "cros_trace_print_exit":this.maliDDKCloseSlice(c,b,e,[],a[3])}return!0}, dvfsSample:function(a,b,c,e){e=parseInt(e);a=this.model_.getOrCreateProcess(0).getOrCreateCounter("DVFS",a);0==a.numSeries&&(a.seriesNames.push(b),a.seriesColors.push(tracing.getStringColorId(a.name)));a.timestamps.push(c);a.samples.push(e)},dvfsEventEvent:function(a,b,c,e,d){a=/utilization=(\d+)/.exec(d.details);if(!a)return!1;this.dvfsSample("DVFS Utilization","utilization",e,a[1]);return!0},dvfsSetClockEvent:function(a,b,c,e,d){a=/frequency=(\d+)/.exec(d.details);if(!a)return!1;this.dvfsSample("DVFS Frequency", "frequency",e,a[1]);return!0},dvfsSetVoltageEvent:function(a,b,c,e,d){a=/voltage=(\d+)/.exec(d.details);if(!a)return!1;this.dvfsSample("DVFS Voltage","voltage",e,a[1]);return!0},hwcSample:function(a,b,c,e,d){d=/val=(\d+)/.exec(d.details);if(!d)return!1;d=parseInt(d[1]);a=this.model_.getOrCreateProcess(0).getOrCreateCounter(a,b);0==a.numSeries&&(a.seriesNames.push(c),a.seriesColors.push(tracing.getStringColorId(a.name)));a.timestamps.push(e);a.samples.push(d);return!0},jmSample:function(a,b,c,e){return this.hwcSample("mali:jm", "JM: "+a,b,c,e)},addJMCounter:function(a,b){this.importer.registerEventHandler(a,function(a,c,d,j,h){return this.jmSample(b,"count",j,h)}.bind(this))},addJMCycles:function(a,b){this.importer.registerEventHandler(a,function(a,c,d,j,h){return this.jmSample(b,"cycles",j,h)}.bind(this))},tilerSample:function(a,b,c,e){return this.hwcSample("mali:tiler","Tiler: "+a,b,c,e)},addTilerCounter:function(a,b){this.importer.registerEventHandler(a,function(a,c,d,j,h){return this.tilerSample(b,"count",j,h)}.bind(this))}, addTilerCycles:function(a,b){this.importer.registerEventHandler(a,function(a,c,d,j,h){return this.tilerSample(b,"cycles",j,h)}.bind(this))},fragSample:function(a,b,c,e){return this.hwcSample("mali:fragment","Fragment: "+a,b,c,e)},addFragCounter:function(a,b){this.importer.registerEventHandler(a,function(a,c,d,j,h){return this.fragSample(b,"count",j,h)}.bind(this))},addFragCycles:function(a,b){this.importer.registerEventHandler(a,function(a,c,d,j,h){return this.fragSample(b,"cycles",j,h)}.bind(this))}, computeSample:function(a,b,c,e){return this.hwcSample("mali:compute","Compute: "+a,b,c,e)},addComputeCounter:function(a,b){this.importer.registerEventHandler(a,function(a,c,d,j,h){return this.computeSample(b,"count",j,h)}.bind(this))},addComputeCycles:function(a,b){this.importer.registerEventHandler(a,function(a,c,d,j,h){return this.computeSample(b,"cycles",j,h)}.bind(this))},addTripipeCycles:function(a,b){this.importer.registerEventHandler(a,function(a,c,d,j,h){return this.hwcSample("mali:shader", "Tripipe: "+b,"cycles",j,h)}.bind(this))},arithSample:function(a,b,c,e){return this.hwcSample("mali:arith","Arith: "+a,b,c,e)},addArithCounter:function(a,b){this.importer.registerEventHandler(a,function(a,c,d,j,h){return this.arithSample(b,"count",j,h)}.bind(this))},addArithCycles:function(a,b){this.importer.registerEventHandler(a,function(a,c,d,j,h){return this.arithSample(b,"cycles",j,h)}.bind(this))},addLSCounter:function(a,b){this.importer.registerEventHandler(a,function(a,c,d,j,h){return this.hwcSample("mali:ls", "LS: "+b,"count",j,h)}.bind(this))},textureSample:function(a,b,c,e){return this.hwcSample("mali:texture","Texture: "+a,b,c,e)},addTexCounter:function(a,b){this.importer.registerEventHandler(a,function(a,c,d,j,h){return this.textureSample(b,"count",j,h)}.bind(this))},addLSCCounter:function(a,b){this.importer.registerEventHandler(a,function(a,c,d,j,h){return this.hwcSample("mali:lsc","LSC: "+b,"count",j,h)}.bind(this))},addAXICounter:function(a,b){this.importer.registerEventHandler(a,function(a,c,d, j,h){return this.hwcSample("mali:axi","AXI: "+b,"count",j,h)}.bind(this))},mmuSample:function(a,b,c,e){return this.hwcSample("mali:mmu","MMU: "+a,b,c,e)},addMMUCounter:function(a,b){this.importer.registerEventHandler(a,function(a,c,d,j,h){return this.mmuSample(b,"count",j,h)}.bind(this))},addMMUCycles:function(a,b){this.importer.registerEventHandler(a,function(a,c,d,j,h){return this.mmuSample(b,"cycles",j,h)}.bind(this))},l2Sample:function(a,b,c,e){return this.hwcSample("mali:l2","L2: "+a,b,c,e)}, addL2Counter:function(a,b){this.importer.registerEventHandler(a,function(a,c,d,j,h){return this.l2Sample(b,"count",j,h)}.bind(this))},addL2Cycles:function(a,b){this.importer.registerEventHandler(a,function(a,c,d,j,h){return this.l2Sample(b,"cycles",j,h)}.bind(this))}};c.registerSubtype(d);return{MaliParser:d}});base.require("importer.linux_perf.parser"); base.exportTo("tracing.importer.linux_perf",function(){function d(a){c.call(this,a);a.registerEventHandler("power_start",d.prototype.powerStartEvent.bind(this));a.registerEventHandler("power_frequency",d.prototype.powerFrequencyEvent.bind(this));a.registerEventHandler("cpu_frequency",d.prototype.cpuFrequencyEvent.bind(this));a.registerEventHandler("cpu_idle",d.prototype.cpuIdleEvent.bind(this))}var c=tracing.importer.linux_perf.Parser;d.prototype={__proto__:c.prototype,cpuStateSlice:function(a,b, c,e){b=this.importer.getOrCreateCpuState(b);"1"!=c?this.importer.importError("Don't understand power_start events of type "+c):(c=b.cpu.getOrCreateCounter("","C-State"),0==c.numSeries&&(c.seriesNames.push("state"),c.seriesColors.push(tracing.getStringColorId(c.name+".state"))),c.timestamps.push(a),c.samples.push(e))},cpuIdleSlice:function(a,b,c){b=this.importer.getOrCreateCpuState(b).cpu.getOrCreateCounter("","C-State");0==b.numSeries&&(b.seriesNames.push("state"),b.seriesColors.push(tracing.getStringColorId(b.name))); 4294967295!=c?b.samples.push(c):b.samples.push(0);b.timestamps.push(a)},cpuFrequencySlice:function(a,b,c){b=this.importer.getOrCreateCpuState(b).cpu.getOrCreateCounter("","Clock Frequency");0==b.numSeries&&(b.seriesNames.push("state"),b.seriesColors.push(tracing.getStringColorId(b.name+".state")));b.timestamps.push(a);b.samples.push(c)},powerStartEvent:function(a,b,c,e,d){a=/type=(\d+) state=(\d) cpu_id=(\d)+/.exec(d.details);if(!a)return!1;b=parseInt(a[3]);c=parseInt(a[2]);this.cpuStateSlice(e,b, a[1],c);return!0},powerFrequencyEvent:function(a,b,c,e,d){b=/type=(\d+) state=(\d+) cpu_id=(\d)+/.exec(d.details);if(!b)return!1;a=parseInt(b[3]);b=parseInt(b[2]);this.cpuFrequencySlice(e,a,b);return!0},cpuFrequencyEvent:function(a,b,c,e,d){b=/state=(\d+) cpu_id=(\d)+/.exec(d.details);if(!b)return!1;a=parseInt(b[2]);b=parseInt(b[1]);this.cpuFrequencySlice(e,a,b);return!0},cpuIdleEvent:function(a,b,c,e,d){b=/state=(\d+) cpu_id=(\d)+/.exec(d.details);if(!b)return!1;a=parseInt(b[2]);b=parseInt(b[1]); this.cpuIdleSlice(e,a,b);return!0}};c.registerSubtype(d);return{PowerParser:d}});base.require("importer.linux_perf.parser"); base.exportTo("tracing.importer.linux_perf",function(){function d(a){c.call(this,a);a.registerEventHandler("sched_switch",d.prototype.schedSwitchEvent.bind(this));a.registerEventHandler("sched_wakeup",d.prototype.schedWakeupEvent.bind(this))}var c=tracing.importer.linux_perf.Parser;TestExports={};var a=RegExp("prev_comm=(.+) prev_pid=(\\d+) prev_prio=(\\d+) prev_state=(\\S\\+?|\\S\\|\\S) ==> next_comm=(.+) next_pid=(\\d+) next_prio=(\\d+)");TestExports.schedSwitchRE=a;var b=/comm=(.+) pid=(\d+) prio=(\d+) success=(\d+) target_cpu=(\d+)/; TestExports.schedWakeupRE=b;d.prototype={__proto__:c.prototype,schedSwitchEvent:function(b,c,d,j,h){var k=a.exec(h.details);if(!k)return!1;b=k[4];d=k[5];h=parseInt(k[6]);k=parseInt(k[7]);this.importer.getOrCreateCpuState(c).switchRunningLinuxPid(this.importer,b,j,h,d,k);return!0},schedWakeupEvent:function(a,c,d,j,h){h=b.exec(h.details);if(!h)return!1;a=d;c=h[1];d=parseInt(h[2]);h=parseInt(h[3]);this.importer.markPidRunnable(j,d,c,h,a);return!0}};c.registerSubtype(d);return{SchedParser:d,_SchedParserTestExports:TestExports}}); base.require("importer.linux_perf.parser"); base.exportTo("tracing.importer.linux_perf",function(){function d(a){c.call(this,a);a.registerEventHandler("workqueue_execute_start",d.prototype.executeStartEvent.bind(this));a.registerEventHandler("workqueue_execute_end",d.prototype.executeEndEvent.bind(this));a.registerEventHandler("workqueue_queue_work",d.prototype.executeQueueWork.bind(this));a.registerEventHandler("workqueue_activate_work",d.prototype.executeActivateWork.bind(this))}var c=tracing.importer.linux_perf.Parser,a=/work struct (.+): function (\S+)/, b=/work struct (.+)/;d.prototype={__proto__:c.prototype,executeStartEvent:function(b,c,d,j,h){b=a.exec(h.details);if(!b)return!1;d=this.importer.getOrCreateKernelThread(h.threadName,d,d);d.openSliceTS=j;d.openSlice=b[2];return!0},executeEndEvent:function(a,c,d,j,h){if(!b.exec(h.details))return!1;a=this.importer.getOrCreateKernelThread(h.threadName,d,d);a.openSlice&&(j=new tracing.model.Slice("",a.openSlice,tracing.getStringColorId(a.openSlice),a.openSliceTS,{},j-a.openSliceTS),a.thread.pushSlice(j)); a.openSlice=void 0;return!0},executeQueueWork:function(){return!0},executeActivateWork:function(){return!0}};c.registerSubtype(d);return{WorkqueueParser:d}});base.require("importer.linux_perf.parser"); base.exportTo("tracing.importer.linux_perf",function(){function d(b){a.call(this,b);b.registerEventHandler("tracing_mark_write:android",d.prototype.traceMarkWriteAndroidEvent.bind(this));b.registerEventHandler("0:android",d.prototype.traceMarkWriteAndroidEvent.bind(this));this.model_=b.model_;this.ppids_={}}function c(a){var c={};if(a){a=a.split(";");for(var e=0;e
/.test(a))return d;var f=a.split("\n"),g=1;if(!c(/^
登录后可以享受更多权益
您还没有登录,登录后您可以:
收藏Android系统代码
收藏喜欢的文章
多个平台共享账号
去登录
首次使用?从这里
注册