Home | History | Annotate | Download | only in chromium-trace

Lines Matching refs:GET

16 this.base=function(){function d(a){"/"==a[a.length-1]&&(a=a.substring(0,a.length-1));l=a}function b(a,c){n[a]||(n[a]=[]);for(var e=n[a],b=!1,f=0;f<e.length;f++)e[f]==c&&(b=!0);b||e.push(c)}function a(a,c){q[a]||(q[a]=[]);for(var e=q[a],b=!1,f=0;f<q.length;f++)e[f]==c&&(b=!0);b||e.push(c)}function c(a,c){p[a]||(p[a]=[]);for(var e=p[a],b=!1,f=0;f<e.length;f++)e[f]==c&&(b=!0);b||e.push(c)}function e(){if(!window.FLATTENED&&!m){m=!0;var e=new XMLHttpRequest;e.open("GET","/deps.js",!1);e.send(null);if(200!=
18 setTimeout(function(){document.body.appendChild(g)},150);throw Error(f);}base.addModuleDependency=b;base.addModuleRawScriptDependency=a;base.addModuleStylesheet=c;try{eval(e.responseText)}catch(d){throw Error("When loading deps, got "+d.stack?d.stack:d.message);}delete base.addModuleStylesheet;delete base.addModuleRawScriptDependency;delete base.addModuleDependency}}function f(){if(!t&&!window.FLATTENED){t=!0;var a=new XMLHttpRequest;a.open("GET","/templates",!1);a.send(null);var c=document.createElement("div");
19 for(c.innerHTML=a.responseText;c.hasChildNodes();)document.head.appendChild(c.removeChild(c.firstChild))}}function g(a,c){var b=c||0,d=a;a instanceof Array||(d=[a]);e();f();d.forEach(function(a){if(window.FLATTENED){if(!window.FLATTENED[a])throw Error("Somehow, module "+a+" didn't get stored in the flattened js file! You may need to rerun build/generate_about_tracing_contents.py");}else if("APPENDED"!=v[a]&&"RESOLVING"!=v[a]){v[a]="RESOLVING";g(n[a]||[],b+1);for(var c=p[a]||[],e=0;e<c.length;e++)k(c[e]);
21 n={},p={},q={},t=!1,v={},w={},s={},r={};return{set moduleBasePath(a){d(a)},get moduleBasePath(){return l},initialize:function(){if(global.document)base.doc=document,base.isMac=/Mac/.test(navigator.platform),base.isWindows=/Win/.test(navigator.platform),base.isChromeOS=/CrOS/.test(navigator.userAgent),base.isLinux=/Linux/.test(navigator.userAgent),base.isGTK=/GTK/.test(chrome.toolkit),base.isViews=/views/.test(chrome.toolkit),d("/src");else{var a=base;Object.defineProperty(global,"base",{get:function(){Object.defineProperty(global,
22 "base",{value:a});a.initialize();return a},configurable:!0})}},require:g,requireStylesheet:k,requireRawScript:function(a){if(window.FLATTENED_RAW_SCRIPTS){if(!window.FLATTENED_RAW_SCRIPTS[a])throw Error("Somehow, "+a+" didn't get stored in the flattened js file! You may need to rerun build/generate_about_tracing_contents.py");}else if(!w[a])throw Error(a+" should already have been loaded. Did you forget to run build/generate_about_tracing_contents.py?");},requireTemplate:function(a){if(!window.FLATTENED&&
28 base.exportTo("tracing.trace_model",function(){function d(a,c){this.guid_=base.GUID.allocate();this.timestamp_=a;this.value_=c}function b(a,c){this.guid_=base.GUID.allocate();this.name_=a;this.color_=c;this.timestamps_=[];this.samples_=[]}d.prototype={__proto__:Object.prototype,get value(){return this.value_},set timestamp(a){this.timestamp_=a},toJSON:function(){for(var a={},c=Object.keys(this),e=0;e<c.length;e++){var b=c[e];"function"!=typeof this[b]&&(a[b]="parent"==b?this[b].guid:this[b])}return a}};
29 b.prototype={__proto__:Object.prototype,toJSON:function(){for(var a={},c=Object.keys(this),e=0;e<c.length;e++){var b=c[e];"function"!=typeof this[b]&&(a[b]="parent"==b?this[b].guid:this[b])}return a},get length(){return this.timestamps_.length},get name(){return this.name_},get color(){return this.color_},get samples(){return this.samples_},get timestamps(){return this.timestamps_},getSample:function(a){return this.samples_[a]},getTimestamp:function(a){return this.timestamps_[a]},addSample:function(a,
123 base.exportTo("base",function(){function d(){this.isEmpty_=!0;this.max_=this.min_=void 0}d.prototype={__proto__:Object.prototype,reset:function(){this.isEmpty_=!0;this.max_=this.min_=void 0},get isEmpty(){return this.isEmpty_},addRange:function(b){b.isEmpty||(this.addValue(b.min),this.addValue(b.max))},addValue:function(b){this.isEmpty_?(this.min_=this.max_=b,this.isEmpty_=!1):(this.max_=Math.max(this.max_,b),this.min_=Math.min(this.min_,b))},get min(){return this.isEmpty_?void 0:this.min_},get max(){return this.isEmpty_?
124 void 0:this.max_},get range(){return this.isEmpty_?void 0:this.max_-this.min_},get center(){return 0.5*(this.min_+this.max_)}};d.compareByMinTimes=function(b,a){return b.isEmpty||a.isEmpty?b.isEmpty&&!a.isEmpty?-1:!b.isEmpty&&a.isEmpty?1:0:b.min_-a.min_};return{Range:d}});"use strict";
128 base.exportTo("tracing.trace_model",function(){function d(b,a,c,e){this.guid_=base.GUID.allocate();this.parent=b;this.id=a;this.category=c||"";this.name=e;this.series_=[];this.bounds=new base.Range}d.prototype={__proto__:Object.prototype,get guid(){return this.guid_},toJSON:function(){for(var b={},a=Object.keys(this),c=0;c<a.length;c++){var e=a[c];"function"!=typeof this[e]&&(b[e]="parent"==e?this[e].guid:this[e])}return b},set timestamps(b){throw Error("Bad counter API. No cookie.");},set seriesNames(b){throw Error("Bad counter API. No cookie.");
129 get series(){return this.series_},get numSeries(){return this.series_.length},get numSamples(){return 0===this.series_.length?0:this.series_[0].length},get timestamps(){return 0===this.series_.length?[]:this.series_[0].timestamps},getSampleStatistics:function(b){b.sort();var a=[];this.series_.forEach(function(c){a.push(c.getStatistics(b))});
131 this.maxTotal=Math.max(e,this.maxTotal)}}}};d.compare=function(b,a){var c=b.parent.compareTo(a);if(0!=c)return c;c=b.name.localeCompare(a.name);return 0==c?b.tid-a.tid:c};return{Counter:d}});"use strict";base.exportTo("tracing.trace_model",function(){function d(b,a,c,e,f){this.category=b||"";this.title=a;this.colorId=c;this.start=e;this.args=f;this.didNotFinish=!1}d.prototype={selected:!1,duration:0,get end(){return this.start}};return{TraceModelEvent:d}});"use strict";base.require("tracing.trace_model.trace_model_event");
132 base.exportTo("tracing.trace_model",function(){function d(b,a,c,e,f,g){tracing.trace_model.TraceModelEvent.call(this,b,a,c,e,f);void 0!==g&&(this.duration=g)}d.prototype={__proto__:tracing.trace_model.TraceModelEvent.prototype,get end(){return this.start+this.duration}};return{Slice:d}});"use strict";base.require("base.range");base.require("tracing.trace_model.slice");base.require("tracing.trace_model.counter");
143 base.exportTo("tracing.trace_model",function(){function d(b,a,c,e,f){this.parent=b;this.id=a;this.category=c;this.name=e;this.creationTs=f;this.creationTsWasExplicit=!1;this.deletionTs=Number.MAX_VALUE;this.selected=this.deletionTsWasExplicit=!1;this.colorId=0;this.bounds=new base.Range;this.snapshots=[];this.hasImplicitSnapshots=!1}d.prototype={__proto__:Object.prototype,get typeName(){return this.name},addSnapshot:function(b,a){if(b<this.creationTs)throw Error("Snapshots must be >= instance.creationTs");
152 (g=f)}if(void 0===g)throw Error("Cannot add snapshot. No instance was alive that was mutable.");f=this.instances[g];f.creationTs=c}else f=this.instances[f];return f.addSnapshot(c,e)},get lastInstance(){return 0==this.instances.length?void 0:this.instances[this.instances.length-1]},idWasDeleted:function(b,a,c){0==this.instances.length&&this.instances.push(this.createObjectInstanceFunction_(this.parent,this.id,b,a,c));var e=this.instances[this.instances.length-1];if(c<e.creationTs)throw Error("Cannot delete a id before it was crated");
162 base.exportTo("tracing.trace_model",function(){function d(){this.slices=[];this.bounds=new base.Range}d.prototype={__proto__:Object.prototype,push:function(b){this.slices.push(b)},get length(){return this.slices.length},shiftTimestampsForward:function(b){for(var a=0;a<this.slices.length;a++){var c=this.slices[a];c.start+=b;for(var e=0;e<c.subSlices.length;e++)c.subSlices[e].start+=b}},updateBounds:function(){this.bounds.reset();for(var b=0;b<this.slices.length;b++)this.bounds.addValue(this.slices[b].start),
165 base.exportTo("tracing.trace_model",function(){function d(a){this.sliceConstructor=a||b;this.openPartialSlices_=[];this.slices=[];this.bounds=new base.Range}var b=tracing.trace_model.Slice;d.prototype={__proto__:Object.prototype,get length(){return this.slices.length},pushSlice:function(a){this.slices.push(a);return a},pushSlices:function(a){this.slices.push.apply(this.slices,a)},pushInstantEvent:function(a){this.slices.push(a)},beginSlice:function(a,c,b,f){if(this.openPartialSlices_.length&&b<this.openPartialSlices_[this.openPartialSlices_.length-
166 1].start)throw Error("Slices must be added in increasing timestamp order");var g=tracing.getStringColorId(c);a=new this.sliceConstructor(a,c,g,b,f?f:{});this.openPartialSlices_.push(a);return a},isTimestampValidForBeginOrEnd:function(a){return this.openPartialSlices_.length?a>=this.openPartialSlices_[this.openPartialSlices_.length-1].start:!0},get openSliceCount(){return this.openPartialSlices_.length},get mostRecentlyOpenedPartialSlice(){return this.openPartialSlices_.length?this.openPartialSlices_[this.openPartialSlices_.length-
173 d.prototype={__proto__:a.prototype};b.prototype={get guid(){return this.guid_},compareTo:function(a){return b.compare(this,a)},toJSON:function(){for(var a={},c=Object.keys(this),b=0;b<c.length;b++){var e=c[b];"function"!=typeof this[e]&&(a[e]="parent"==e?this[e].guid:this[e])}return a},addSample:function(a,c,b,e){if(this.samples_.length&&b<this.samples_[this.samples_.length-1].start)throw Error("Samples must be added in increasing timestamp order.");var d=tracing.getStringColorId(c);a=new tracing.trace_model.Sample(a,
174 c,d,b,e?e:{});this.samples_.push(a);return a},get samples(){return this.samples_},name:void 0,shiftTimestampsForward:function(a){this.sliceGroup.shiftTimestampsForward(a);if(this.cpuSlices)for(var c=0;c<this.cpuSlices.length;c++)this.cpuSlices[c].start+=a;if(this.samples_.length)for(c=0;c<this.samples_.length;c++)this.samples_[c].start+=a;this.kernelSliceGroup.shiftTimestampsForward(a);this.asyncSliceGroup.shiftTimestampsForward(a)},get isEmpty(){return this.sliceGroup.length||this.sliceGroup.openSliceCount||
177 this.samples_.length;c++)a[this.samples_[c].category]=!0},autoCloseOpenSlices:function(a){this.sliceGroup.autoCloseOpenSlices(a);this.kernelSliceGroup.autoCloseOpenSlices(a)},mergeKernelWithUserland:function(){if(0<this.kernelSliceGroup.length){var a=c.merge(this.sliceGroup,this.kernelSliceGroup);this.sliceGroup.slices=a.slices;this.kernelSliceGroup=new c;this.updateBounds()}},get userFriendlyName(){return this.name||this.tid},get userFriendlyDetails(){return"tid: "+this.tid+(this.name?", name: "+
179 base.exportTo("base",function(){function d(){return d}var b=localStorage;d.get=function(a,c,e){a=d.namespace_(a,e);var f=b.getItem(a);if(null===f||void 0===f)return c;try{return JSON.parse(f).value}catch(g){return b.removeItem(d.namespace_(a,e)),c}};d.set=function(a,c,e){if(void 0===c)throw Error("Settings.set: value must not be undefined");c=JSON.stringify({value:c});b.setItem(d.namespace_(a,e),c)};d.keys=function(a){var c=[];a=a||"";for(var e=0;e<b.length;e++){var f=b.key(e);d.isnamespaced_(f,a)&&
182 c[a]&&(delete c[a],d[a]=!0)});this.nonuniqueKeys=d;this.objectsByKey_=c},removeNonuniqueKeysFromSettings_:function(){var a=b.get("trace_model_settings",{}),c=!1;base.dictionaryKeys(a).forEach(function(b){this.nonuniqueKeys[b]&&(c=!0,delete a[b])},this);c&&b.set("trace_model_settings",a)},hasUniqueSettingKey:function(a){return(a=a.getSettingsKey())?void 0!==this.objectsByKey_[a]:!1},getSettingFor:function(a,c,e){var f=a.getSettingsKey();if(!f||!this.objectsByKey_[f])return c=a.ephemeralSettings[c],
183 void 0!==c?c:e;a=b.get("trace_model_settings",{});a[f]||(a[f]={});c=a[f][c];return void 0!==c?c:e},setSettingFor:function(a,c,e){var f=a.getSettingsKey();f&&this.objectsByKey_[f]?(a=b.get("trace_model_settings",{}),a[f]||(a[f]={}),a[f][c]=e,b.set("trace_model_settings",a)):a.ephemeralSettings[c]=e}};return{TraceModelSettings:d}});"use strict";base.require("base.guid");base.require("base.range");base.require("tracing.trace_model.counter");base.require("tracing.trace_model.object_collection");base.require("tracing.trace_model.thread");
185 base.exportTo("tracing.trace_model",function(){function d(a){if(!a)throw Error("Must provide a model");this.guid_=base.GUID.allocate();this.model=a;this.threads={};this.counters={};this.objects=new tracing.trace_model.ObjectCollection(this);this.bounds=new base.Range;this.sortIndex=0;this.ephemeralSettings={}}var b=tracing.trace_model.Thread,a=tracing.trace_model.Counter;d.compare=function(a,b){return a.sortIndex-b.sortIndex};d.prototype={get guid(){return this.guid_},get numThreads(){var a=0,b;for(b in this.threads)a++;
190 base.exportTo("tracing.trace_model",function(){function d(c){if(void 0===c)throw Error("model must be provided");a.call(this,c);this.cpus={}}var b=tracing.trace_model.Cpu,a=tracing.trace_model.ProcessBase;d.compare=function(a,b){return 0};d.prototype={__proto__:a.prototype,compareTo:function(a){return d.compare(this,a)},get userFriendlyName(){return"Kernel"},get userFriendlyDetails(){return"Kernel"},getOrCreateCpu:function(a){this.cpus[a]||(this.cpus[a]=new b(a));return this.cpus[a]},shiftTimestampsForward:function(c){a.prototype.shiftTimestampsForward.call(this);
193 c){return a.localeCompare(c)}))?c:b.pid-a.pid};d.prototype={__proto__:tracing.trace_model.ProcessBase.prototype,compareTo:function(b){return d.compare(this,b)},pushInstantEvent:function(b){this.instantEvents.push(b)},get userFriendlyName(){var b;b=this.name?this.name:"Process "+this.pid;this.labels.length&&(b+=": "+this.labels.join(", "));return b},get userFriendlyDetails(){return this.name?this.name+" (pid "+this.pid+")":"pid: "+this.pid},getSettingsKey:function(){return this.name?this.labels.length?
195 base.exportTo("tracing",function(){function d(a,b){this.kernel=new c(this);this.processes={};this.importErrors=[];this.metadata=[];this.categories=[];this.bounds=new base.Range;this.instantEvents=[];a&&this.importTraces([a],b)}function b(a){this.importPriority=0}var a=tracing.trace_model.Process,c=tracing.trace_model.Kernel;d.importerConstructors_=[];d.registerImporter=function(a){d.importerConstructors_.push(a)};d.prototype={__proto__:base.EventTarget.prototype,get numProcesses(){var a=0,c;for(c in this.processes)a++;
209 "\\n\\");k.push(y)}else k=[l[l.length-1]];l=k[k.length-1];x=e(l,'\\n";');if(x==l)return f;k[k.length-1]=x;return{ok:!0,lines:c?k:void 0,events_begin_at_line:h}};b.prototype={__proto__:Object.prototype,extractSubtrace:function(){},get model(){return this.model_},buildMapFromLinuxPidsToThreads:function(){this.threadsByLinuxPid={};this.model_.getAllThreads().forEach(function(a){this.threadsByLinuxPid[a.tid]=a}.bind(this))},getOrCreateCpuState:function(a){if(!this.cpuStates_[a]){var c=this.model_.kernel.getOrCreateCpu(a);
280 base.exportTo("tracing",function(){function d(a,c){this.track=a;this.slice=c}function b(a,c,b){this.track=a;this.counter=c;this.sampleIndex=b}function a(a,c){this.track=a;this.objectSnapshot=c}function c(a,c){this.track=a;this.objectInstance=c}function e(a){this.bounds_dirty_=!0;this.bounds_=new base.Range;this.length_=0;this.guid_=base.GUID.allocate();a&&this.pushHits(a)}d.prototype={get modelObject(){return this.slice},get selected(){return this.slice.selected},set selected(a){this.slice.selected=
281 a},addBoundsToRange:function(a){a.addValue(this.slice.start);a.addValue(this.slice.end)}};b.prototype={get modelObject(){return this.sampleIndex},get selected(){return!0==this.track.selectedSamples[this.sampleIndex]},set selected(a){this.track.selectedSamples[this.sampleIndex]=a?!0:!1},addBoundsToRange:function(a){this.track.timestamps&&a.addValue(this.track.timestamps[this.sampleIndex])}};a.prototype={get modelObject(){return this.objectSnapshot},get selected(){return this.objectSnapshot.selected},
282 set selected(a){this.objectSnapshot.selected=a},addBoundsToRange:function(a){a.addValue(this.objectSnapshot.ts)}};c.prototype={get modelObject(){return this.objectInstance},get selected(){return this.objectInstance.selected},set selected(a){this.objectInstance.selected=a},addBoundsToRange:function(a){a.addRange(this.objectInstance.bounds)}};var f=[{constructor:d,name:"slice",pluralName:"slices"},{constructor:b,name:"counterSample",pluralName:"counterSamples"},{constructor:a,name:"objectSnapshot",
283 pluralName:"objectSnapshots"},{constructor:c,name:"objectInstance",pluralName:"objectInstances"}];e.prototype={__proto__:Object.prototype,get bounds(){if(this.bounds_dirty_){this.bounds_.reset();for(var a=0;a<this.length_;a++)this[a].addBoundsToRange(this.bounds_);this.bounds_dirty_=!1}return this.bounds_},get duration(){return this.bounds_.isEmpty?0:this.bounds_.max-this.bounds_.min},get length(){return this.length_},get guid(){return this.guid_},clear:function(){for(var a=0;a<this.length_;++a)delete this[a];
295 base.exportTo("tracing.analysis",function(){var d=ui.define("x-generic-object-view");d.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){this.object_=void 0},get object(){return this.object_},set object(b){this.object_=b;this.updateContents_()},updateContents_:function(){this.textContent="";this.appendElementsForType_("",this.object_,0,0,5,"")},appendElementsForType_:function(b,a,c,e,f,d){e>f?this.appendSimpleText_(b,c,"<recursion limit reached>",d):void 0===a?this.appendSimpleText_(b,
318 base.exportTo("tracing.analysis",function(){var d=ui.define("object-instance-view");d.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.objectInstance_=void 0},set modelObject(b){this.objectInstance=b},get modelObject(){return this.objectInstance},get objectInstance(){return this.objectInstance_},set objectInstance(b){this.objectInstance_=b;this.updateContents()},updateContents:function(){throw Error("Not implemented");}};d.typeNameToViewInfoMap={};d.register=function(b,a,c){if(d.typeNameToViewInfoMap[b])throw Error("Handler already registerd for "+
320 base.exportTo("tracing.analysis",function(){var d=ui.define("object-snapshot-view");d.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.objectSnapshot_=void 0},set modelObject(b){this.objectSnapshot=b},get modelObject(){return this.objectSnapshot},get objectSnapshot(){return this.objectSnapshot_},set objectSnapshot(b){this.objectSnapshot_=b;this.updateContents()},updateContents:function(){throw Error("Not implemented");}};d.typeNameToViewInfoMap={};d.register=function(b,a,c){if(d.typeNameToViewInfoMap[b])throw Error("Handler already registered for "+
327 base.exportTo("tracing.analysis",function(){var d=ui.define("slice-view");d.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.objectInstance_=void 0},set modelObject(b){this.slice=b},get modelObject(){return this.slice},get slice(){return this.slice_},set slice(b){this.slice_=b;this.updateContents()},updateContents:function(){throw Error("Not implemented");}};d.titleToViewInfoMap={};d.register=function(b,a){if(d.titleToViewInfoMap[b])throw Error("Handler already registerd for "+
331 void 0,a;}this.currentView_ instanceof tracing.analysis.AnalysisResults?this.classList.remove("viewing-object"):this.classList.add("viewing-object")}},get currentView(){return this.currentView_},get selection(){return this.currentSelection_},set selection(b){this.selections_.push(b);window.history.pushState({view_guid:this.guid_,selection_guid:b.guid});this.processSelection(b)},clearSelectionHistory:function(){this.selections_=[]},onPopState:function(b){if(null!==b.state&&b.state.view_guid===this.guid_){var a;
344 [];this.onKeyDown=this.onKeyDown.bind(this);this.onKeyPress=this.onKeyPress.bind(this);this.onDocumentClick=this.onDocumentClick.bind(this);this.addEventListener("visibleChange",b.prototype.onVisibleChange_.bind(this),!0);this.obeyCloseEvents=!0},get visible(){return this.visible_},set visible(a){base.setPropertyAndDispatchChange(this,"visible",a)},get obeyCloseEvents(){return this.obeyCloseEvents_},set obeyCloseEvents(a){base.setPropertyAndDispatchChange(this,"obeyCloseEvents",a);this.ownerDocument.querySelector(".overlay-root").toggleToolbar(a)},
345 get toolbar(){return this.ownerDocument.querySelector(".overlay-root .tool-bar")},onVisibleChange_:function(){var a=this.ownerDocument.querySelector(".overlay-root");this.visible?(a.setAttribute("visible","visible"),a.showOverlay(this),document.addEventListener("keydown",this.onKeyDown,!0),document.addEventListener("keypress",this.onKeyPress,!0),document.addEventListener("click",this.onDocumentClick,!0)):(a.removeAttribute("visible"),document.removeEventListener("keydown",this.onKeyDown,!0),document.removeEventListener("keypress",
352 !1}d.prototype={__proto__:base.EventTarget.prototype,setWhenPossible:function(a){this.pendingSetFunction_=a},get isAttachedToDocument_(){var a=this.parentEl_;if(void 0!==a){for(;a.parentNode;)a=a.parentNode;return a==this.parentEl_.ownerDocument}},onResize_:function(){this.dispatchChangeEvent()},checkForAttach_:function(){if(this.isAttachedToDocument_&&0!=this.clientWidth){this.iframe_||(this.iframe_=document.createElement("iframe"),this.iframe_.style.cssText="position:absolute;width:100%;height:0;border:0;visibility:hidden;",
355 this.xViewVectorToWorld(a.panX);this.panY=a.panY},onModelTrackControllerScroll_:function(a){this.panY_=this.modelTrackContainer_.scrollTop},set modelTrackContainer(a){this.modelTrackContainer_&&this.modelTrackContainer_.removeEventListener("scroll",this.onModelTrackControllerScroll_);this.modelTrackContainer_=a;this.modelTrackContainer_.addEventListener("scroll",this.onModelTrackControllerScroll_)},get scaleX(){return this.scaleX_},set scaleX(a){this.scaleX_!=a&&(this.scaleX_=a,this.dispatchChangeEvent())},
356 get panX(){return this.panX_},set panX(a){this.panX_!=a&&(this.panX_=a,this.dispatchChangeEvent())},get panY(){return this.panY_},set panY(a){this.panY_=a;this.modelTrackContainer_.scrollTop=a},setPanAndScale:function(a,c){if(this.scaleX_!=c||this.panX_!=a)this.scaleX_=c,this.panX_=a,this.dispatchChangeEvent()},xWorldToView:function(a){return(a+this.panX_)*this.scaleX_},xWorldVectorToView:function(a){return a*this.scaleX_},xViewToWorld:function(a){return a/this.scaleX_-this.panX_},xViewVectorToWorld:function(a){return a/
357 this.scaleX_},xPanWorldPosToViewPos:function(a,c,b){if("string"==typeof c)if("left"==c)c=0;else if("center"==c)c=b/2;else if("right"==c)c=b-1;else throw Error("unrecognized string for viewPos. left|center|right");this.panX=c/this.scaleX_-a},xPanWorldBoundsIntoView:function(a,c,b){0>this.xWorldToView(a)?this.xPanWorldPosToViewPos(a,"left",b):this.xWorldToView(c)>b&&this.xPanWorldPosToViewPos(c,"right",b)},xSetWorldBounds:function(a,c,b){this.setPanAndScale(-a,b/(c-a))},get gridEnabled(){return this.gridEnabled_},
358 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,this.dispatchChangeEvent())},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 b(this,a);this.markers.push(a);this.dispatchChangeEvent();this.dispatchMarkersChangeEvent_();return a},removeMarker:function(a){for(var c=
360 "rgba(255,0,0,0.25)";a.stroke()}},drawMarkerArrows:function(a,c,b,d){for(var g=0;g<this.markers.length;++g)this.markers[g].drawTriangle_(a,c,b,a.canvas.height,d,this)},drawMarkerLines:function(a,c,b){for(var d=0;d<this.markers.length;++d)this.markers[d].drawLine(a,c,b,a.canvas.height,this)}};b.prototype={get positionWorld(){return this.positionWorld_},set positionWorld(a){this.positionWorld_=a;this.viewport_.dispatchChangeEvent()},set selected(a){this.selected_=a;this.viewport_.dispatchChangeEvent()},
361 get selected(){return this.selected_},get color(){return this.selected?"rgb(255,0,0)":"rgb(0,0,0)"},drawTriangle_:function(a,c,b,d,g,h){a.beginPath();var k=this.positionWorld_;k<c||k>b||(c=h.xWorldToView(k),a.moveTo(c,g),a.lineTo(c-3,g/2),a.lineTo(c+3,g/2),a.lineTo(c,g),a.closePath(),a.fillStyle=this.color,a.fill(),g!==d&&(a.beginPath(),a.moveTo(c,g),a.lineTo(c,d),a.closePath(),a.strokeStyle=this.color,a.stroke()))},drawLine:function(a,c,b,d,g){a.beginPath();var h=this.positionWorld_;h>=c&&h<b&&(c=
365 base.exportTo("ui",function(){var d=ui.define("div");d.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){this.observer_=new WebKitMutationObserver(this.didMutate_.bind(this));this.observer_.observe(this,{childList:!0});Object.defineProperty(this,"textContent",{get:void 0,set:this.onSetTextContent_})},appendChild:function(b){HTMLUnknownElement.prototype.appendChild.call(this,b);this.didMutate_(this.observer_.takeRecords())},insertBefore:function(b,a){HTMLUnknownElement.prototype.insertBefore.call(this,
369 base.exportTo("tracing.tracks",function(){var d=tracing.getColorPaletteHighlightIdBoost(),b=ui.define("track",ui.ContainerThatDecoratesItsChildren);b.prototype={__proto__:ui.ContainerThatDecoratesItsChildren.prototype,decorate:function(a){ui.ContainerThatDecoratesItsChildren.prototype.decorate.call(this);if(void 0===a)throw Error("viewport is required when creating a Track.");this.viewport_=a;this.classList.add("track");this.categoryFilter_=void 0},get viewport(){return this.viewport_},context:function(){if(this.parentNode){if(!this.parentNode.context)throw Error("Parent container does not support context() method.");
370 return this.parentNode.context()}},get
375 this.viewportChange_=this.viewportChange_.bind(this);this.viewport.addEventListener("change",this.viewportChange_)},get canvas(){return this.canvas_},context:function(){return this.ctx_},viewportChange_:function(){this.invalidate()},invalidate:function(){this.rafPending_||(this.rafPending_=!0,base.requestPreAnimationFrame(function(){this.rafPending_=!1;this.ctx_.clearRect(0,0,this.canvas_.width,this.canvas_.height);this.updateCanvasSizeIfNeeded_();base.requestAnimationFrameInThisFrameIfPossible(function(){for(var a=
379 base.exportTo("tracing.tracks",function(){var d=ui.define("heading-track",tracing.tracks.Track);d.prototype={__proto__:tracing.tracks.Track.prototype,decorate:function(b){tracing.tracks.Track.prototype.decorate.call(this,b);this.classList.add("heading-track");this.headingDiv_=document.createElement("heading");this.headingDiv_.style.width=tracing.constants.HEADING_WIDTH+"px";this.appendChild(this.headingDiv_)},get heading(){return this.headingDiv_.textContent},set heading(b){this.headingDiv_.textContent=
392 base.exportTo("tracing.tracks",function(){var d=ui.define("container-track",tracing.tracks.Track);d.prototype={__proto__:tracing.tracks.Track.prototype,decorate:function(b){tracing.tracks.Track.prototype.decorate.call(this,b)},detach:function(){this.textContent=""},get tracks_(){for(var b=[],a=0;a<this.children.length;a++)this.children[a].classList.contains("track")&&b.push(this.children[a]);return b},drawTrack:function(b){for(var a=0;a<this.children.length;++a)this.children[a]instanceof tracing.tracks.Track&&
398 base.exportTo("tracing.tracks",function(){function d(){}function b(a,b){this.string=a;this.width=b}var a=tracing.getColorPalette(),c=ui.define("slice-track",tracing.tracks.HeadingTrack);c.prototype={__proto__:tracing.tracks.HeadingTrack.prototype,SHOULD_ELIDE_TEXT:!0,decorate:function(a){tracing.tracks.HeadingTrack.prototype.decorate.call(this,a);this.classList.add("slice-track");this.elidedTitleCache=new d;this.asyncStyle_=!1;this.slices_=null},get asyncStyle(){return this.asyncStyle_},set asyncStyle(a){this.asyncStyle_=
399 !!a},get slices(){return this.slices_},set slices(a){this.slices_=a||[]},get height(){return window.getComputedStyle(this).height},set height(a){this.style.height=a},get hasVisibleContent(){return 0<this.slices.length},labelWidth:function(a){var b=this.context(),c=f[a];c||(c=b.measureText(a).width,f[a]=c);return c+2},labelWidthWorld:function(a,b){return this.labelWidth(a)*b},draw:function(a,b,c){switch(a){case tracing.tracks.DrawType.SLICE:this.drawSlices_(b,c)}},drawSlices_:function(b,c){var d=this.context(),
402 this.elidedTitleCache.get(this,q,w,u,r.duration),w=u.string,u=u.width),u*q<r.duration&&(r=p.xWorldToView(r.start+0.5*r.duration),d.fillText(w,r,2.5*f,u)))}},addIntersectingItemsInRangeToSelectionInWorldSpace:function(a,b,c,e){base.iterateOverIntersectingIntervals(this.slices_,function(a){return a.start},function(a){return a.duration},a,b,function(a){a=e.addSlice(this,a);this.decorateHit(a)}.bind(this))},indexOfSlice_:function(a){for(var b=base.findLowIndexInSortedArray(this.slices_,function(a){return a.start},
404 b.addSlice(this,this.slices_[c]);this.decorateHit(e)}}};var e=tracing.getColorPaletteHighlightIdBoost(),f={},g={};d.prototype={get:function(a,c,e,d,f){var p=g[e];p||(p={},g[e]=p);d=p[c];d||(p[c]={},d=p[c]);p=d[f];if(void 0===p){for(p=!1;a.labelWidthWorld(e,c)>f&&!(1>0.75*e.length);)e=e.substring(0,0.75*e.length),p=!0;p&&3<e.length&&(e=e.substring(0,e.length-3)+"...");p=new b(e,a.labelWidth(e));d[f]=p}return p}};return{SliceTrack:c}});"use strict";base.require("tracing.tracks.container_track");base.require("tracing.tracks.slice_track");
406 get cpu(){return this.cpu_},set cpu(b){this.cpu_=b;this.updateContents_()},get tooltip(){return this.tooltip_},set tooltip(b){this.tooltip_=b;this.updateContents_()},get hasVisibleContent(){return 0<this.children.length},
409 base.exportTo("tracing.tracks",function(){var d=tracing.getColorPalette(),b=tracing.getColorPaletteHighlightIdBoost(),a=ui.define("object-instance-track",tracing.tracks.HeadingTrack);a.prototype={__proto__:tracing.tracks.HeadingTrack.prototype,decorate:function(a){tracing.tracks.HeadingTrack.prototype.decorate.call(this,a);this.classList.add("object-instance-track");this.objectInstances_=[];this.objectSnapshots_=[]},get objectInstances(){return this.objectInstances_},set objectInstances(a){a&&0!=
410 a.length?(this.heading=a[0].typeName,this.objectInstances_=a,this.objectSnapshots_=[],this.objectInstances_.forEach(function(a){this.objectSnapshots_.push.apply(this.objectSnapshots_,a.snapshots)},this)):(this.heading="",this.objectInstances_=[],this.objectSnapshots_=[])},get height(){return window.getComputedStyle(this).height},set height(a){this.style.height=a},get snapshotRadiusView(){return 7*(window.devicePixelRatio||1)},draw:function(a,b,d){switch(a){case tracing.tracks.DrawType.SLICE:this.drawSlices_(b,
418 this.computeMaxBytes_(this.objectInstance_.snapshots)}else this.objectInstance_=[]},computeMaxBytes_:function(a){for(var b=0,d=0;d<a.length;d++){for(var g=a[d],h=Object.keys(g.heap_.children),k=0,l=0;l<h.length;l++)k+=g.heap_.children[h[l]].currentBytes;k>b&&(b=k)}return b},get height(){return window.getComputedStyle(this).height},set height(a){this.style.height=a},draw:function(a,b,d){switch(a){case tracing.tracks.DrawType.SLICE:this.drawSlices_(b,d)}},drawSlices_:function(a,e){var f=this.context(),
423 base.exportTo("tracing.tracks",function(){var d=tracing.getColorPalette(),b=ui.define("counter-track",tracing.tracks.HeadingTrack);b.prototype={__proto__:tracing.tracks.HeadingTrack.prototype,decorate:function(a){tracing.tracks.HeadingTrack.prototype.decorate.call(this,a);this.classList.add("counter-track");this.selectedSamples_={};this.categoryFilter_=new tracing.Filter},decorateHit:function(a){},get counter(){return this.counter_},set counter(a){this.counter_=a;this.heading=a.name+": "},get categoryFilter(){return this.categoryFilter_},
424 set categoryFilter(a){this.categoryFilter_=a},get selectedSamples(){return this.selectedSamples_},draw:function(a,b,e){switch(a){case tracing.tracks.DrawType.SLICE:this.drawSlices_(b,e)}},drawSlices_:function(a,b){var e=this.context(),f=window.devicePixelRatio||1,f=this.getBoundingClientRect().height*f,g=this.counter_,h=this.viewport,k=h.xViewVectorToWorld(1),l=h.xViewVectorToWorld(1);e.save();h.applyTransformToCanvas(e);for(var h=g.numSeries,m=g.numSamples,n=base.findLowIndexInSortedArray(g.timestamps,
429 base.exportTo("tracing.tracks",function(){var d=ui.define("slice-group-track",tracing.tracks.ContainerTrack);d.prototype={__proto__:tracing.tracks.ContainerTrack.prototype,decorate:function(b){tracing.tracks.ContainerTrack.prototype.decorate.call(this,b);this.classList.add("slice-group-track");this.heading_=this.tooltip_=""},get group(){return this.group_},set group(b){this.group_=b;this.updateContents_()},get heading(){return this.heading_},set heading(b){this.heading_=b;this.updateContents_()},
430 get tooltip(){return this.tooltip_},set tooltip(b){this.tooltip_=b;this.updateContents_()},set decorateHit(b){this.decorateHit_=b;this.updateContents_()},addSliceTrack_:function(b){var a=new tracing.tracks.SliceTrack(this.viewport);a.slices=b;a.decorateHit=this.decorateHit_;a.categoryFilter_=this.categoryFilter;this.appendChild(a);return a},get subRows(){return base.asArray(this.children).map(function(b){return b.slices})},get hasVisibleContent(){return 0<this.children.length},updateContents_:function(){if(this.group_){var b=
437 base.exportTo("tracing.tracks",function(){var d=ui.define("thread-track",tracing.tracks.ContainerTrack);d.prototype={__proto__:tracing.tracks.ContainerTrack.prototype,decorate:function(b){tracing.tracks.ContainerTrack.prototype.decorate.call(this,b);this.classList.add("thread-track")},get thread(){return this.thread_},set thread(b){this.thread_=b;this.updateContents_()},get hasVisibleContent(){return 0<this.tracks_.length},updateContents_:function(){this.detach();if(this.thread_){this.heading=this.thread_.userFriendlyName+
443 function(a){return n.children[n.selectedIndex].targetPropertyValue});n.__defineSetter__("selectedValue",function(a){for(var b=0;b<n.children.length;b++)if(n.children[b].targetPropertyValue==a){n.selectedIndex=b;h();return}throw Error("Not a valid value");});g=base.Settings.get(e,d);m=!1;for(l=0;l<n.children.length;l++)if(n.children[l].targetPropertyValue==g){m=!0;a[b]=g;n.selectedIndex=l;break}m||(n.selectedIndex=k,a[b]=d);return n},createCheckBox:function(a,c,e,f,g){function h(){base.Settings.set(e,
444 k.checked);a[c]=k.checked}var k=document.createElement("input");k.type="checkbox";f=base.Settings.get(e,f);k.checked=!!f;a[c]=f;k.addEventListener("change",h);f="#checkbox-"+b++;var l=d({className:"labeled-checkbox"});k.setAttribute("id",f);var m=document.createElement("label");m.textContent=g;m.setAttribute("for",f);l.appendChild(k);l.appendChild(m);l.__defineSetter__("checked",function(a){k.checked=!!a;h()});l.__defineGetter__("checked",function(){return k.checked});return l}}});"use strict";base.require("tcmalloc.heap_instance_track");
447 document.createElement("expand-button");this.expandEl_.classList.add("expand-button-expanded");this.processNameEl_=ui.createSpan();this.headerEl_=ui.createDiv({className:"process-track-header"});this.headerEl_.appendChild(this.expandEl_);this.headerEl_.appendChild(this.processNameEl_);this.headerEl_.addEventListener("click",this.onHeaderClick_.bind(this));this.appendChild(this.headerEl_)},get processBase(){return this.processBase_},set processBase(b){if(this.processBase_=b)this.expanded=(new a(this.processBase_.model)).getSettingFor(this.processBase_,
448 "expanded",!0);this.updateContents_()},get expanded(){return this.expandEl_.classList.contains("expand-button-expanded")},set expanded(b){b=!!b;this.expandEl_.classList.contains("expand-button-expanded")!==b&&(b?(this.classList.add("expanded"),this.expandEl_.classList.add("expand-button-expanded")):(this.classList.remove("expanded"),this.expandEl_.classList.remove("expand-button-expanded")),this.viewport_.dispatchChangeEvent(),this.processBase_&&(new a(this.processBase_.model)).setSettingFor(this.processBase_,
449 "expanded",b))},get hasVisibleContent(){return this.expanded?1<this.children.length:!0},onHeaderClick_:function(a){a.stopPropagation();a.preventDefault();this.expanded=!this.expanded},updateContents_:function(){this.tracks_.forEach(function(a){this.removeChild(a)},this);this.processBase_&&(this.processNameEl_.textContent=this.processBase_.userFriendlyName,this.headerEl_.title=this.processBase_.userFriendlyDetails,this.willAppendTracks_(),this.appendObjectInstanceTracks_(),this.appendCounterTracks_(),
454 base.exportTo("tracing.tracks",function(){var d=tracing.tracks.ProcessTrackBase,b=tracing.tracks.SpacingTrack,a=ui.define("kernel-track",d);a.prototype={__proto__:d.prototype,decorate:function(a){tracing.tracks.ProcessTrackBase.prototype.decorate.call(this,a)},set kernel(a){this.processBase=a},get kernel(){return this.processBase},willAppendTracks_:function(){var a=this.categoryFilter,d=base.dictionaryValues(this.kernel.cpus);d.sort(tracing.trace_model.Cpu.compare);for(var f=!1,g=0;g<d.length;++g){var h=
457 d.left,d.right);b.restore()}tracing.tracks.ContainerTrack.prototype.drawTrack.call(this,a)},set process(a){this.processBase=a},get process(){return this.processBase},addIntersectingItemsInRangeToSelectionInWorldSpace:function(a,b,d,f){base.iterateOverIntersectingIntervals(this.processBase.instantEvents,function(a){return a.start},function(a){return a.duration},a,b,function(a){a=f.addSlice(this,a);this.decorateHit(a)}.bind(this));tracing.tracks.ContainerTrack.prototype.addIntersectingItemsInRangeToSelectionInWorldSpace.apply(this,
459 base.exportTo("tracing.tracks",function(){var d=ui.define("trace-model-track",tracing.tracks.ContainerTrack);d.prototype={__proto__:tracing.tracks.ContainerTrack.prototype,decorate:function(b){tracing.tracks.ContainerTrack.prototype.decorate.call(this,b);this.classList.add("model-track")},detach:function(){tracing.tracks.ContainerTrack.prototype.detach.call(this)},get model(){return this.model_},set model(b){this.model_=b;this.updateContents_()},get hasVisibleContent(){return 0<this.children.length},
465 this.zoomModeButton_=this.buttonsEl_.querySelector(".zoom-mode-button");this.pos_={x:base.Settings.get("mouse_mode_selector.x",window.innerWidth-50),y:base.Settings.get("mouse_mode_selector.y",100)};this.constrainPositionToWindowBounds_();this.updateStylesFromPosition_();this.isDraggingModeSelectorDragHandle_=!1;this.initialRelativeMouseDownPos_={x:0,y:0};this.dragHandleEl_.addEventListener("mousedown",this.onDragHandleMouseDown_.bind(this));document.addEventListener("mousemove",this.onDragHandleMouseMove_.bind(this));
467 this.onMouseDown_.bind(this));document.addEventListener("keypress",this.onKeyPress_.bind(this));document.addEventListener("keydown",this.onKeyDown_.bind(this));document.addEventListener("keyup",this.onKeyUp_.bind(this));this.mode=base.Settings.get("mouse_mode_selector.mouseMode",tracing.mouseModeConstants.MOUSE_MODE_PANSCAN);this.isInteracting_=this.isInTemporaryAlternativeMouseMode_=!1},get mode(){return this.currentMode_},set mode(b){if(this.currentMode_!==b){var a=tracing.mouseModeConstants;this.currentMode_=
482 (this.boundListeners_=[]);d=d.bind(g);this.boundListeners_.push({object:a,event:b,boundFunc:d});a.addEventListener(b,d)},detach:function(){this.modelTrack_.detach();for(var a=0;a<this.boundListeners_.length;a++){var b=this.boundListeners_[a];b.object.removeEventListener(b.event,b.boundFunc)}this.boundListeners_=void 0;this.viewport_.detach()},get viewport(){return this.viewport_},get categoryFilter(){return this.categoryFilter_},set categoryFilter(a){this.modelTrackContainer_.invalidate();this.categoryFilter_=
483 a;this.modelTrack_.categoryFilter=a},get model(){return this.model_},set model(a){if(!a)throw Error("Model cannot be null");var b=this.model_!=a;this.model_=a;this.modelTrack_.model=a;this.modelTrack_.categoryFilter=this.categoryFilter;b&&this.viewport_.setWhenPossible(this.setInitialViewport_.bind(this));base.setPropertyAndDispatchChange(this,"model",a)},get hasVisibleContent(){return this.modelTrack_.hasVisibleContent},setInitialViewport_:function(){var a=this.modelTrackContainer_.canvas.width,
484 b,d;this.model_.bounds.isEmpty?(b=0,d=1E3):0==this.model_.bounds.range?(b=this.model_.bounds.min,d=1E3):(b=this.model_.bounds.min,d=this.model_.bounds.range);var g=0.15*d;this.viewport_.xSetWorldBounds(b-g,b+d+g,a)},addAllObjectsMatchingFilterToSelection:function(a,b){this.modelTrack_.addAllObjectsMatchingFilterToSelection(a,b)},get focusElement(){return this.focusElement_?this.focusElement_:this.parentElement},set focusElement(a){this.focusElement_=a},get listenToKeys_(){return!this.viewport_.isAttachedToDocument_||
490 "center",d)}},get keyHelp(){var a="Qwerty Controls\n w/s : Zoom in/out (with shift: go faster)\n a/d : Pan left/right\n\nDvorak Controls\n ,/o : Zoom in/out (with shift: go faster)\n a/e : Pan left/right\n\nMouse Controls\n drag (Selection mode) : Select slices (with "+(0==navigator.platform.indexOf("Mac")?"cmd":"ctrl")+": zoom to slices)\n drag (Pan mode) : Pan left/right/up/down)\n\n",a=this.focusElement.tabIndex?
492 get selection(){return this.selection_},set selection(a){if(!(a instanceof d))throw Error("Expected Selection");var b;for(b=0;b<this.selection_.length;b++)this.selection_[b].selected=!1;this.selection_.clear();this.selection_.addSelection(a);base.dispatchSimpleEvent(this,"selectionChange");for(b=0;b<this.selection_.length;b++)this.selection_[b].selected=!0;this.selection_.length&&this.selection_[0].track&&this.selection_[0].track.scrollIntoViewIfNeeded();this.viewport_.dispatchChangeEvent()},hideDragBox_:function(){this.dragBox_.style.left=
507 this.updateHitCountEl_()},get
508 document.activeElement==this.filterEl_){var a=this.controller.currentHitIndex,b=this.controller.filterHits.length;this.hitCountEl_.textContent=0==b?"0 of 0":a+1+" of "+b}else this.hitCountEl_.textContent=""}};d.prototype={__proto__:Object.prototype,get timeline(){return this.timeline_},set timeline(a){this.timeline_=a;this.filterHitsDirty_=!0},get filterText(){return this.filterText_},set filterText(a){a!=this.filterText_&&(this.filterText_=a,this.filterHitsDirty_=!0,this.showHits_(this.filterHits))},
509 get filterHits(){if(this.filterHitsDirty_&&(this.filterHitsDirty_=!1,this.filterHits_.clear(),this.currentHitIndex_=-1,this.timeline_&&this.filterText.length)){var a=new tracing.TitleFilter(this.filterText);this.timeline.addAllObjectsMatchingFilterToSelection(a,this.filterHits_)}return this.filterHits_},get currentHitIndex(){return this.currentHitIndex_},showHits_:function(a,b,d){this.timeline&&(this.timeline.selection=a,b?this.timeline.zoomToSelection():d&&this.timeline.panToSelection())},find_:function(a){var b=
511 base.exportTo("ui",function(){var d=ui.define("x-drag-handle");d.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.lastMousePos_=0;this.onMouseMove_=this.onMouseMove_.bind(this);this.onMouseUp_=this.onMouseUp_.bind(this);this.addEventListener("mousedown",this.onMouseDown_);this.target_=void 0;this.horizontal=!0;this.observer_=new WebKitMutationObserver(this.didTargetMutate_.bind(this));this.targetSizesByModeKey_={}},get modeKey_(){return""==this.target_.className?".":this.target_.className},
512 get target(){return this.target_},set target(b){this.observer_.disconnect();(this.target_=b)&&this.observer_.observe(this.target_,{attributes:!0,attributeFilter:["class"]})},get horizontal(){return this.horizontal_},set horizontal(b){this.className=(this.horizontal_=b)?"horizontal-drag-handle":"vertical-drag-handle"},get vertical(){return!this.horizontal_},set vertical(b){this.horizontal=!b},forceMutationObserverFlush_:function(){var b=this.observer_.takeRecords();b.length&&this.didTargetMutate_(b)},
513 didTargetMutate_:function(b){b=this.targetSizesByModeKey_[this.modeKey_];void 0!==b?this.setTargetSize_(b):this.target_.style[this.targetStyleKey_]=""},get targetStyleKey_(){return this.horizontal_?"height":"width"},getTargetSize_:function(){var b=this.targetStyleKey_;this.target_.style[b]||(this.target_.style[b]=window.getComputedStyle(this.target_)[b]);b=parseInt(this.target_.style[b]);return this.targetSizesByModeKey_[this.modeKey_]=b},setTargetSize_:function(b){this.target_.style[this.targetStyleKey_]=
524 ": "+k)}c.textContent=a.join("\n")}.bind(this));b=function(){a.style.display=this.model&&this.model.metadata.length?"":"none"}.bind(this);b();this.addEventListener("modelChange",b);return a},get leftControls(){return this.leftControlsEl_},get rightControls(){return this.rightControlsEl_},get viewTitle(){return this.titleEl_.textContent.substring(this.titleEl_.textContent.length-2)},set viewTitle(b){void 0===b?(this.titleEl_.textContent="",this.titleEl_.hidden=!0):(this.titleEl_.hidden=!1,this.titleEl_.textContent=
525 b)},set traceData(b){this.model=new tracing.TraceModel(b)},get model(){if(this.timeline_)return this.timeline_.model},set model(b){var a=b!=this.model,c=b&&!b.bounds.isEmpty;a&&(this.timelineContainer_.textContent="",this.timeline_&&(this.timeline_.removeEventListener("selectionChange",this.onSelectionChanged_),this.timeline_.detach(),this.timeline_=void 0,this.findCtl_.controller.timeline=void 0));c&&!this.timeline_&&(this.timeline_=new tracing.TimelineTrackView,this.timeline_.focusElement=this.focusElement_?
526 this.focusElement_:this.parentElement,this.timelineContainer_.appendChild(this.timeline_),this.findCtl_.controller.timeline=this.timeline_,this.timeline_.addEventListener("selectionChange",this.onSelectionChanged_),this.analysisEl_.clearSelectionHistory());c&&(this.timeline_.model=b);base.dispatchSimpleEvent(this,"modelChange");if(a)this.onSelectionChanged_()},get timeline(){return this.timeline_},get settings(){this.settings_||(this.settings_=new base.Settings);return this.settings_},set focusElement(b){this.focusElement_=
527 b;this.timeline_&&(this.timeline_.focusElement=b)},get focusElement(){return this.focusElement_?this.focusElement_:this.parentElement},get isAttachedToDocument_(){for(var b=this;b.parentNode;)b=b.parentNode;return b==this.ownerDocument},get listenToKeys_(){if(this.isAttachedToDocument_)return this.focusElement_?0<=this.focusElement.tabIndex?document.activeElement==this.focusElement:!0:!0},onKeypress_:function(b){this.listenToKeys_&&(47==event.keyCode?(this.findCtl_.focus(),event.preventDefault()):