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

Lines Matching refs:exportTo

23 !r[a]){r[a]=!0;a=a.replace(/\./g,"/")+".html";a=l+"/"+a;var c=document.createElement("link");c.setAttribute("rel","import");c.setAttribute("href",a)}},exportTo:function(a,c){var e;e=a.split(".");for(var f=global,b;e.length&&(b=e.shift());)f=b in f?f[b]:f[b]={};e=f;try{var g=c()}catch(h){console.log("While running exports for ",a,":");console.log(h.stack||h);return}for(var d in g)(f=Object.getOwnPropertyDescriptor(g,d))&&Object.defineProperty(e,d,f)}}}();base.initialize();"use strict";
24 base.exportTo
27 base.exportTo("tracing.importer.linux_perf",function(){function d(a){this.importer=a;this.model=a.model}var b=[];d.registerSubtype=function(a){b.push(a)};d.getSubtypeConstructors=function(){return b};d.prototype={__proto__:Object.prototype};return{Parser:d}});"use strict";base.exportTo("base",function(){var d=1;return{GUID:{allocate:function(){return d++}}}});"use strict";base.require("base.guid");
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 f=c[e];"function"!=typeof this[f]&&(a[f]="parent"==f?this[f].guid:this[f])}return a}};
32 base.exportTo("tracing.importer.linux_perf",function(){function d(c){a.call(this,c);c.registerEventHandler("tracing_mark_write:android",d.prototype.traceMarkWriteAndroidEvent.bind(this));c.registerEventHandler("0:android",d.prototype.traceMarkWriteAndroidEvent.bind(this));this.model_=c.model_;this.ppids_={}}function b(a){var e={};if(a){a=a.split(";");for(var f=0;f<a.length;++f){var b=a[f].split("=");b[0]&&(e[b.shift()]=b.join("="))}}return e}var a=tracing.importer.linux_perf.Parser;d.prototype={__proto__:a.prototype,
38 base.exportTo("tracing.importer.linux_perf",function(){function d(a){b.call(this,a);a.registerEventHandler("memory_bus_usage",d.prototype.traceMarkWriteBusEvent.bind(this));this.model_=a.model_;this.ppids_={}}var b=tracing.importer.linux_perf.Parser;d.prototype={__proto__:b.prototype,traceMarkWriteBusEvent:function(a,c,e,f,b,h){e=/bus=(\S+) rw_bytes=(\d+) r_bytes=(\d+) w_bytes=(\d+) cycles=(\d+) ns=(\d+)/.exec(b.details);a=e[1];parseInt(e[2]);c=parseInt(e[3]);parseInt(e[4]);parseInt(e[5]);e=parseInt(e[6]);
41 base.exportTo("tracing.importer.linux_perf",function(){function d(a){b.call(this,a);a.registerEventHandler("clock_set_rate",d.prototype.traceMarkWriteClockEvent.bind(this));this.model_=a.model_;this.ppids_={}}var b=tracing.importer.linux_perf.Parser;d.prototype={__proto__:b.prototype,traceMarkWriteClockEvent:function(a,c,e,f,b,h){a=/(\S+) state=(\d+) cpu_id=(\d+)/.exec(b.details);c=a[1];var d=parseInt(a[2]);a=this.model_.getOrCreateProcess(0).getOrCreateCounter(null,c);0===a.numSeries&&a.addSeries(new tracing.trace_model.CounterSeries("value",
43 base.exportTo("tracing.importer.linux_perf",function(){function d(c){a.call(this,c);c.registerEventHandler("cpufreq_interactive_up",d.prototype.cpufreqUpDownEvent.bind(this));c.registerEventHandler("cpufreq_interactive_down",d.prototype.cpufreqUpDownEvent.bind(this));c.registerEventHandler("cpufreq_interactive_already",d.prototype.cpufreqTargetEvent.bind(this));c.registerEventHandler("cpufreq_interactive_notyet",d.prototype.cpufreqTargetEvent.bind(this));c.registerEventHandler("cpufreq_interactive_setspeed",
47 base.exportTo("tracing.importer.linux_perf",function(){function d(a){b.call(this,a);a.registerEventHandler("ext4_sync_file_enter",d.prototype.ext4SyncFileEnterEvent.bind(this));a.registerEventHandler("ext4_sync_file_exit",d.prototype.ext4SyncFileExitEvent.bind(this));a.registerEventHandler("block_rq_issue",d.prototype.blockRqIssueEvent.bind(this));a.registerEventHandler("block_rq_complete",d.prototype.blockRqCompleteEvent.bind(this))}var b=tracing.importer.linux_perf.Parser;d.prototype={__proto__:b.prototype,
52 base.exportTo("tracing.importer.linux_perf",function(){function d(a){b.call(this,a);a.registerEventHandler("drm_vblank_event",d.prototype.vblankEvent.bind(this))}var b=tracing.importer.linux_perf.Parser;d.prototype={__proto__:b.prototype,drmVblankSlice:function(a,c,e){var b=this.importer.getOrCreatePseudoThread("drm_vblank");b.openSlice=c;a=new tracing.trace_model.Slice("",b.openSlice,tracing.getStringColorId(b.openSlice),a,e,0);b.thread.sliceGroup.pushSlice(a)},vblankEvent:function(a,c,e,b,g){c=
54 base.exportTo("tracing.importer.linux_perf",function(){function d(a){b.call(this,a);a.registerEventHandler("exynos_flip_request",d.prototype.flipEvent.bind(this));a.registerEventHandler("exynos_flip_complete",d.prototype.flipEvent.bind(this));a.registerEventHandler("exynos_busfreq_target_int",d.prototype.busfreqTargetIntEvent.bind(this));a.registerEventHandler("exynos_busfreq_target_mif",d.prototype.busfreqTargetMifEvent.bind(this))}var b=tracing.importer.linux_perf.Parser;d.prototype={__proto__:b.prototype,
58 base.exportTo("tracing.importer.linux_perf",function(){function d(a){b.call(this,a);a.registerEventHandler("tracing_mark_write:log",d.prototype.logEvent.bind(this));a.registerEventHandler("tracing_mark_write:SyncInterpret",d.prototype.syncEvent.bind(this));a.registerEventHandler("tracing_mark_write:HandleTimer",d.prototype.timerEvent.bind(this))}var b=tracing.importer.linux_perf.Parser;d.prototype={__proto__:b.prototype,gestureOpenSlice:function(a,c,e){this.importer.getOrCreatePseudoThread("gesture").thread.sliceGroup.beginSlice("touchpad_gesture",
62 base.exportTo("tracing.importer.linux_perf",function(){function d(a){b.call(this,a);a.registerEventHandler("i915_gem_object_create",d.prototype.gemObjectCreateEvent.bind(this));a.registerEventHandler("i915_gem_object_bind",d.prototype.gemObjectBindEvent.bind(this));a.registerEventHandler("i915_gem_object_unbind",d.prototype.gemObjectBindEvent.bind(this));a.registerEventHandler("i915_gem_object_change_domain",d.prototype.gemObjectChangeDomainEvent.bind(this));a.registerEventHandler("i915_gem_object_pread",
74 base.exportTo("tracing.importer.linux_perf",function(){function d(a){b.call(this,a);a.registerEventHandler("irq_handler_entry",d.prototype.irqHandlerEntryEvent.bind(this));a.registerEventHandler("irq_handler_exit",d.prototype.irqHandlerExitEvent.bind(this));a.registerEventHandler("softirq_raise",d.prototype.softirqRaiseEvent.bind(this));a.registerEventHandler("softirq_entry",d.prototype.softirqEntryEvent.bind(this));a.registerEventHandler("softirq_exit",d.prototype.softirqExitEvent.bind(this))}var b=
78 base.exportTo("tracing.importer.linux_perf",function(){function d(a){b.call(this,a);a.registerEventHandler("graph_ent",d.prototype.traceKernelFuncEnterEvent.bind(this));a.registerEventHandler("graph_ret",d.prototype.traceKernelFuncReturnEvent.bind(this));this.model_=a.model_;this.ppids_={}}var b=tracing.importer.linux_perf.Parser,a=/func=(.+)/;d.prototype={__proto__:b.prototype,traceKernelFuncEnterEvent:function(c,e,b,g,h){c=a.exec(h.details);if(!c||void 0===h.tgid)return!1;e=parseInt(h.tgid);c=c[1];
81 base.exportTo("tracing.importer.linux_perf",function(){function d(a){b.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",
110 base.exportTo("tracing.importer.linux_perf",function(){function d(a){b.call(this,a);a.registerEventHandler("mm_vmscan_kswapd_wake",d.prototype.kswapdWake.bind(this));a.registerEventHandler("mm_vmscan_kswapd_sleep",d.prototype.kswapdSleep.bind(this));a.registerEventHandler("mm_vmscan_direct_reclaim_begin",d.prototype.reclaimBegin.bind(this));a.registerEventHandler("mm_vmscan_direct_reclaim_end",d.prototype.reclaimEnd.bind(this))}var b=tracing.importer.linux_perf.Parser,a=/nid=(\d+) order=(\d+)/,c=
116 base.exportTo("tracing.importer.linux_perf",function(){function d(a){b.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 b=tracing.importer.linux_perf.Parser;d.prototype={__proto__:b.prototype,cpuStateSlice:function(a,c,
121 base.exportTo("tracing.importer.linux_perf",function(){function d(a){b.call(this,a);a.registerEventHandler("sched_switch",d.prototype.schedSwitchEvent.bind(this));a.registerEventHandler("sched_wakeup",d.prototype.schedWakeupEvent.bind(this))}var b=tracing.importer.linux_perf.Parser,a={},c=RegExp("prev_comm=(.+) prev_pid=(\\d+) prev_prio=(\\d+) prev_state=(\\S\\+?|\\S\\|\\S) ==> next_comm=(.+) next_pid=(\\d+) next_prio=(\\d+)");a.schedSwitchRE=c;var e=/comm=(.+) pid=(\d+) prio=(\d+) success=(\d+) target_cpu=(\d+)/;
124 base.exportTo("tracing.importer.linux_perf",function(){function d(a){b.call(this,a);a.registerEventHandler("sync_timeline",d.prototype.timelineEvent.bind(this));a.registerEventHandler("sync_wait",d.prototype.syncWaitEvent.bind(this));a.registerEventHandler("sync_pt",d.prototype.syncPtEvent.bind(this));this.model_=a.model_}var b=tracing.importer.linux_perf.Parser,a=/name=(\S+) value=(\S*)/,c=/(\S+) name=(\S+) state=(\d+)/,e=/name=(\S+) value=(\S*)/;d.prototype={__proto__:b.prototype,timelineEvent:function(c,
127 base.exportTo("tracing.importer.linux_perf",function(){function d(a){b.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 b=tracing.importer.linux_perf.Parser,a=/work struct (.+): function (\S+)/,
130 base.exportTo("base",function(){function d(){}d.prototype={addEventListener:function(a,c){this.listeners_||(this.listeners_=Object.create(null));if(a in this.listeners_){var b=this.listeners_[a];0>b.indexOf(c)&&b.push(c)}else this.listeners_[a]=[c]},removeEventListener:function(a,c){if(this.listeners_&&a in this.listeners_){var b=this.listeners_[a],f=b.indexOf(c);0<=f&&(1==b.length?delete this.listeners_[a]:b.splice(f,1))}},dispatchEvent:function(a){if(!this.listeners_)return!0;var c=this;a.__defineGetter__("target",
133 base.exportTo("base",function(){function d(b,a,c){var e=base.doc.createEvent("Event");e.initEvent(b,!!a,!!c);e.__proto__=global.Event.prototype;return e}d.prototype={__proto__:global.Event.prototype};return{Event:d,dispatchSimpleEvent:function(b,a,c,e){a=new d(a,c,e);return b.dispatchEvent(a)}}});"use strict";
134 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_?
136 base.exportTo("tracing",function(){function d(){}function b(a){this.text_=a.toLowerCase()}function a(a){this.categories_={};a=a||[];for(var b=0;b<a.length;b++)this.addCategory(a[b])}d.prototype={__proto__:Object.prototype,matchCounter:function(a){return!0},matchCpu:function(a){return!0},matchProcess:function(a){return!0},matchSlice:function(a){return!0},matchThread:function(a){return!0}};b.prototype={__proto__:d.prototype,matchCounter:function(a){return 0===this.text_.length||void 0===a.name?!1:-1!==
139 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.");
142 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");
143 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");
144 base.exportTo("tracing.trace_model",function(){function d(a){this.cpuNumber=a;this.slices=[];this.counters={};this.bounds=new base.Range}var b=tracing.trace_model.Counter;d.prototype={getOrCreateCounter:function(a,c){var e;e=a.length?a+"."+c:c;this.counters[e]||(this.counters[e]=new b(this,e,a,c));return this.counters[e]},shiftTimestampsForward:function(a){for(var c=0;c<this.slices.length;c++)this.slices[c].start+=a;for(var b in this.counters)this.counters[b].shiftTimestampsForward(a)},updateBounds:function(){this.bounds.reset();
146 base.exportTo("base",function(){function d(a,c,b){if(0==a.length)return 1;for(var f=0,g=a.length-1,d,k,l=-1;f<=g;)d=Math.floor((f+g)/2),k=c(a[d])-b,0>k?f=d+1:(0<k||(l=d),g=d-1);return-1!=l?l:f}function b(a,c,b,f,g,h){if(0!=a.length&&!(f>g)){var k=d(a,c,f);if(-1!=k&&(0<k&&c(a[k-1])+b(a[k-1],k-1)>=f&&h(a[k-1]),k!=a.length))for(b=a.length;k<b&&!(c(a[k])>=g);k++)h(a[k])}}return{findLowIndexInSortedArray:d,findLowIndexInSortedIntervals:function(a,c,b,f){var g=d(a,c,f);return 0==g?f>=c(a[0])&&f<c(a[0])+
148 base.exportTo("base",function(){function d(b,a){if(b instanceof Object)if(b instanceof Array)for(var c=0;c<b.length;c++)a(b,c,b[c]),d(b[c],a);else for(c in b){var e=b[c];a(b,c,e);d(e,a)}}return{asArray:function(b){for(var a=[],c=0;c<b.length;c++)a.push(b[c]);return a},concatenateArrays:function(){for(var b=[],a=0;a<arguments.length;a++){if(!(arguments[a]instanceof Array))throw Error("Arguments "+a+"is not an array");b.push.apply(b,arguments[a])}return b},compareArrays:function(b,a,c){for(var e=Math.min(b.length,
150 base.exportTo("base",function(){return{addSingletonGetter:function(d){d.getInstance=function(){return d.instance_||(d.instance_=new d)}},tracedFunction:function(d,b,a){return function(){console.time(b);try{d.apply(a,arguments)}finally{console.timeEnd(b)}}},normalizeException:function(d){return"string"==typeof d?{message:d,stack:["<unknown>"]}:{message:d.message,stack:d.stack?d.stack:["<unknown>"]}},instantiateTemplate:function(d){return document.querySelector(d).content.cloneNode(!0)},stackTrace:function(){var d=
152 base.exportTo("tracing.trace_model",function(){function d(b,a,c){this.objectInstance=b;this.ts=a;this.args=c;this.selected=!1}d.prototype={__proto__:Object.prototype,preInitialize:function(){},initialize:function(){}};d.nameToConstructorMap_={};d.register=function(b,a){if(d.nameToConstructorMap_[b])throw Error("Constructor already registerd for "+b);d.nameToConstructorMap_[b]=a};d.unregister=function(b){delete d.nameToConstructorMap_[b]};d.getConstructor=function(b){return d.nameToConstructorMap_[b]?
154 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");
160 base.exportTo("tracing.trace_model",function(){function d(b,a,c){this.createObjectInstanceFunction_=b;this.parent=a;this.id=c;this.instances=[]}d.prototype={idWasCreated:function(b,a,c){if(0==this.instances.length)return this.instances.push(this.createObjectInstanceFunction_(this.parent,this.id,b,a,c)),this.instances[0].creationTsWasExplicit=!0,this.instances[0];var e=this.instances[this.instances.length-1];if(c<e.deletionTs)throw Error("Mutation of the TimeToObjectInstanceMap must be done in ascending timestamp order.");
166 base.exportTo
172 base.exportTo("tracing.trace_model",function(){function d(b,a,c,e,f){tracing.trace_model.Slice.apply(this,arguments)}d.prototype={__proto__:tracing.trace_model.Slice.prototype,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]="startThread"==e||"endThread"==e?this[e].guid:this[e])}return b},id:void 0,startThread:void 0,endThread:void 0,subSlices:void 0};return{AsyncSlice:d}});"use strict";base.require("base.range");base.require("tracing.trace_model.async_slice");
173 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),
175 base.exportTo("tracing.trace_model",function(){function d(b,a,c,e,f){tracing.trace_model.TraceModelEvent.apply(this,arguments)}d.prototype={__proto__:tracing.trace_model.TraceModelEvent.prototype};return{Sample:d}});"use strict";base.require("base.range");base.require("tracing.trace_model.slice");base.require("tracing.color_scheme");base.require("tracing.filter");
176 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-
183 base.exportTo("tracing.trace_model",function(){function d(c,b,e,d,l,m){a.call(this,c,b,e,d,l,m);this.subSlices=[]}function b(a,b){this.guid_=base.GUID.allocate();if(!a)throw Error("Parent must be provided.");this.parent=a;this.sortIndex=0;this.tid=b;this.sliceGroup=new c(d);this.cpuSlices=void 0;this.samples_=[];this.kernelSliceGroup=new c;this.asyncSliceGroup=new e;this.bounds=new base.Range;this.ephemeralSettings={}}var a=tracing.trace_model.Slice,c=tracing.trace_model.SliceGroup,e=tracing.trace_model.AsyncSliceGroup;
190 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)&&
192 base.exportTo("tracing",function(){function d(a){this.model=a;this.objectsByKey_=[];this.nonuniqueKeys_=[];this.buildObjectsByKeyMap_();this.removeNonuniqueKeysFromSettings_()}var b=base.Settings;d.prototype={buildObjectsByKeyMap_:function(){var a=[this.model.kernel];a.push.apply(a,base.dictionaryValues(this.model.processes));a.push.apply(a,this.model.getAllThreads());for(var c={},b=0;b<a.length;b++){var f=a[b],g=f.getSettingsKey();g&&(c[g]=void 0===c[g]?f:"nonuniqueKey")}var d={};base.dictionaryKeys(c).forEach(function(a){"nonuniqueKey"===
196 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++;
201 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);
203 base.exportTo("tracing.trace_model",function(){function d(b,a){if(void 0===b)throw Error("model must be provided");if(void 0===a)throw Error("pid must be provided");tracing.trace_model.ProcessBase.call(this,b);this.pid=a;this.name=void 0;this.labels=[];this.instantEvents=[]}d.compare=function(b,a){var c=tracing.trace_model.ProcessBase.compare(b,a);return c||(c=base.comparePossiblyUndefinedValues(b.name,a.name,function(a,c){return a.localeCompare(c)}))?c:(c=base.compareArrays(b.labels,a.labels,function(a,
206 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++;
216 base.exportTo("tracing.importer",function(){function d(a){this.cpu=a}function b(a,c){this.importPriority=2;this.model_=a;this.events_=c;this.clockSyncRecords_=[];this.cpuStates_={};this.wakeups_=[];this.kernelThreadStates_={};this.buildMapFromLinuxPidsToThreads();this.lineNumberBase=0;this.lineNumber=-1;this.pseudoThreadCounter=1;this.parsers_=[];this.eventHandlers_={}}function a(a){return"{"==a[0]?!1:e.test(a)?f:g.test(a)?h:k.test(a)?l:null}d.prototype={__proto__:Object.prototype,switchRunningLinuxPid:function(a,
236 base.exportTo("base",function(){var d=vec2.create(),b=vec2.create(),a=vec4.create();mat2d.create();vec2.createFromArray=function(a){if(2!=a.length)throw Error("Should be length 2");var b=vec2.create();vec2.set(b,a[0],a[1]);return b};vec2.createXY=function(a,b){var f=vec2.create();vec2.set(f,a,b);return f};vec2.toString=function(a){return"["+a[0]+", "+a[1]+"]"};vec2.addTwoScaledUnitVectors=function(a,e,f,g,h){vec2.scale(d,e,f);vec2.scale(b,g,h);vec2.add(a,d,b)};vec3.createXYZ=function(a,b,f){var d=
238 base.exportTo("base",function(){function d(a,c,b,e){vec2.scale(h,c,e);vec2.scale(k,b,1-e);vec2.add(a,h,k);vec2.normalize(a,a);return a}function b(){this.p1=vec2.create();this.p2=vec2.create();this.p3=vec2.create();this.p4=vec2.create()}function a(a,c,b){return(a[0]-b[0])*(c[1]-b[1])-(c[0]-b[0])*(a[1]-b[1])}function c(c,b,e,f){var d=0>a(c,b,e);e=0>a(c,e,f);c=0>a(c,f,b);return d==e&&e==c}for(var e=[],f=0;8>f;f++)e[f]=vec2.create();var g=vec4.create();vec4.create();vec4.create();mat4.create();mat4.create();
245 base.exportTo("tracing.trace_model",function(){function d(a,c,b,e,d){tracing.trace_model.TraceModelEvent.apply(this,arguments);this.type=void 0}function b(a,c,b,k,l){d.apply(this,arguments);this.type=e.GLOBAL}function a(a,c,b,k,l){d.apply(this,arguments);this.type=e.PROCESS}function c(a,c,b,k,l){d.apply(this,arguments);this.type=e.THREAD}var e={GLOBAL:1,PROCESS:2,THREAD:3};d.prototype={__proto__:tracing.trace_model.TraceModelEvent.prototype};b.prototype={__proto__:d.prototype};a.prototype={__proto__:d.prototype};
247 base.exportTo("tracing.importer",function(){function d(a){if(!(a instanceof Object)){if(void 0===a||null===a)return a;if("string"==typeof a)return a.substring();if("boolean"==typeof a||"number"==typeof a)return a;throw Error("Unrecognized: "+typeof a);}if(a instanceof Array){for(var c=Array(a.length),b=0;b<a.length;b++)c[b]=d(a[b]);return c}if(a.__proto__!=Object.prototype)throw Error("Can only clone simple types");c={};for(b in a)c[b]=d(a[b]);return c}function b(a,c){this.importPriority=1;this.model_=
268 base.exportTo("tracing.importer.v8",function(){function d(){}d.prototype.root_=null;d.prototype.isEmpty=function(){return!this.root_};d.prototype.insert=function(b,a){if(this.isEmpty())this.root_=new d.Node(b,a);else if(this.splay_(b),this.root_.key!=b){var c=new d.Node(b,a);b>this.root_.key?(c.left=this.root_,c.right=this.root_.right,this.root_.right=null):(c.right=this.root_,c.left=this.root_.left,this.root_.left=null);this.root_=c}};d.prototype.remove=function(b){if(this.isEmpty())throw Error("Key not found: "+
273 base.exportTo("tracing.importer.v8",function(){function d(){this.dynamics_=new tracing.importer.v8.SplayTree;this.dynamicsNameGen_=new tracing.importer.v8.CodeMap.NameGenerator;this.statics_=new tracing.importer.v8.SplayTree;this.libraries_=new tracing.importer.v8.SplayTree;this.pages_=[]}d.PAGE_ALIGNMENT=12;d.PAGE_SIZE=1<<d.PAGE_ALIGNMENT;d.prototype.addCode=function(b,a){this.deleteAllCoveredNodes_(this.dynamics_,b,b+a.size);this.dynamics_.insert(b,a)};d.prototype.moveCode=function(b,a){var c=this.dynamics_.remove(b);
279 base.exportTo("tracing.importer.v8",function(){function d(){}function b(a){this.dispatchTable_=a;this.lineNum_=0;this.csvParser_=new d}d.CSV_FIELD_RE_=/^"((?:[^"]|"")*)"|([^,]*)/;d.DOUBLE_QUOTE_RE_=/""/g;d.prototype.parseLine=function(a){var c=d.CSV_FIELD_RE_,b=d.DOUBLE_QUOTE_RE_,f=0,g=a.length,h=[];if(0<g){do{var k=c.exec(a.substr(f));"string"===typeof k[1]?(k=k[1],f+=k.length+3,h.push(k.replace(b,'"'))):(k=k[2],f+=k.length+1,h.push(k))}while(f<=g)}return h};b.prototype.printError=function(a){};
283 base.exportTo("tracing.importer",function(){function d(a,b){this.importPriority=3;this.model_=a;this.logData_=b;this.code_map_=new tracing.importer.v8.CodeMap;this.v8_samples_thread_=this.v8_stack_thread_=this.v8_timer_thread_=void 0}var b=["/d8","/libv8.so"],a={"V8.Execute":{pause:!1,no_execution:!1},"V8.External":{pause:!1,no_execution:!0},"V8.CompileFullCode":{pause:!0,no_execution:!0},"V8.RecompileSynchronous":{pause:!0,no_execution:!0},"V8.RecompileParallel":{pause:!1,no_execution:!1},"V8.CompileEval":{pause:!0,
291 return{V8LogImporter:d}});"use strict";base.require("tracing.importer.linux_perf_importer");base.require("tracing.importer.trace_event_importer");base.require("tracing.importer.v8_log_importer");"use strict";base.exportTo("tracing.analysis",function(){return{tsRound:function(d){return Math.round(1E3*d)/1E3}}});"use strict";base.require("base.events");base.require("base.guid");base.require("base.range");
292 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=
301 base.exportTo
304 base.exportTo("tracing.analysis",function(){var d=tracing.analysis.tsRound,b=base.Event.bind(void 0,"requestSelectionChange",!0,!1),a=ui.define("a");a.prototype={__proto__:HTMLAnchorElement.prototype,decorate:function(){this.classList.add("analysis-link");this.selectionGenerator;this.addEventListener("click",this.onClicked_.bind(this))},onClicked_:function(){var a=new b;a.selection=this.selectionGenerator();this.dispatchEvent(a)}};var c=ui.define("object-snapshot-link",a);c.prototype={__proto__:a.prototype,
307 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,
312 base.exportTo("tracing.analysis",function(){var d=ui.define("div");d.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.className="analysis-results"},clear:function(){this.textContent=""},createSelectionChangingLink:function(b,a,c){var e=this.ownerDocument.createElement("a");tracing.analysis.AnalysisLink.decorate(e);e.textContent=b;e.selectionGenerator=a;c&&(e.title=c);return e},appendElement_:function(b,a,c){a=b.ownerDocument.createElement(a);b.appendChild(a);void 0!=c&&(a.textContent=
319 base.exportTo("tracing.analysis",function(){return{analyzeSingleCounterSampleHit:function(d,b){for(var a=b.counter,c=b.sampleIndex,e=[],f=0;f<a.numSeries;++f)e.push(a.getSeries(f).getSample(c).value);var g=d.appendTable("analysis-counter-table",2);d.appendTableHeader(g,"Selected counter:");d.appendSummaryRow(g,"Title",a.name);d.appendSummaryRowTime(g,"Timestamp",a.timestamps[c]);for(f=0;f<a.numSeries;f++)d.appendSummaryRow(g,a.getSeries(f).name,e[f])},analyzeMultipleCounterSampleHits:function(d,b){for(var a=
322 base.exportTo("tracing.analysis",function(){function d(b,a){var c=a.slice,e=b.appendTable("analysis-slice-table",2);b.appendTableHeader(e,"Selected slice:");b.appendSummaryRow(e,"Title",c.title);c.category&&b.appendSummaryRow(e,"Category",c.category);b.appendSummaryRowTime(e,"Start",c.start);b.appendSummaryRowTime(e,"Duration",c.duration);c.durationInUserTime&&b.appendSummaryRowTime(e,"Duration (U)",c.durationInUserTime);var d=0,g;for(g in c.args)d+=1;if(0<d)for(g in b.appendSummaryRow(e,"Args"),
327 base.exportTo("tracing.analysis",function(){function d(a,c){var e=c.slices,d=c.counterSamples,g=new tracing.Selection;g.addSelection(c.objectSnapshots);g.addSelection(c.objectInstances);1==e.length?tracing.analysis.analyzeSingleSliceHit(a,e[0]):1<e.length&&tracing.analysis.analyzeMultipleSliceHits(a,e);1==d.length?tracing.analysis.analyzeSingleCounterSampleHit(a,d[0]):1<d.length&&tracing.analysis.analyzeMultipleCounterSampleHits(a,d);g.length&&b(a,g)}function b(a,c){c=base.asArray(c).sort(base.Range.compareByMinTimes);
330 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 "+
332 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 "+
335 base.exportTo("tracing.analysis",function(){var d=tracing.analysis.tsRound,b=ui.define("default-object-snapshot-view",tracing.analysis.ObjectSnapshotView);b.prototype={__proto__:tracing.analysis.ObjectSnapshotView.prototype,decorate:function(){tracing.analysis.ObjectSnapshotView.prototype.decorate.apply(this);this.classList.add("default-object-view");this.classList.add("default-object-snapshot-view")},updateContents:function(){var a=this.objectSnapshot;if(a){var b=a.objectInstance,f;f=""+('<div class="title">Snapshot of <a id="instance-link"></a> @ '+
339 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 "+
342 base.exportTo("tracing.analysis",function(){var d=ui.define("div");d.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.className="analysis-view";this.currentSelection_=this.currentView_=void 0;this.selections_=[];this.guid_=base.GUID.allocate();window.addEventListener("popstate",this.onPopState.bind(this))},changeViewType:function(b){if(!(this.currentView_ instanceof b)){this.textContent="";try{this.currentView_=new b,this.appendChild(this.currentView_)}catch(a){throw this.currentView_=
347 base.exportTo("base",function(){function d(a,c,b,e,d,m){d=new base.Event(c+"Change",d,m);d.propertyName=c;d.newValue=b;d.oldValue=e;var n;d.throwError=function(a){n=a};a.dispatchEvent(d);if(n)throw n;}function b(a){return a.replace(/([A-Z])/g,"-$1").toLowerCase()}function a(a,c){switch(c){case e.JS:var d=a+"_base_";return function(){return this[d]};case e.ATTR:var k=b(a);return function(){return this.getAttribute(k)};case e.BOOL_ATTR:return k=b(a),function(){return this.hasAttribute(k)}}}function c(a,
351 base.exportTo("ui",function(){var d=ui.define("div");d.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.classList.add("overlay-root");this.createToolBar_();this.contentHost=this.ownerDocument.createElement("div");this.contentHost.classList.add("content-host");this.tabCatcher=this.ownerDocument.createElement("span");this.tabCatcher.tabIndex=0;this.appendChild(this.contentHost);this.onKeydown_=this.onKeydown_.bind(this);this.onFocusIn_=this.onFocusIn_.bind(this);this.addEventListener("mousedown",
360 base.exportTo("tracing",function(){var d=ui.define("div");d.prototype={__proto__:ui.Overlay.prototype,decorate:function(){ui.Overlay.prototype.decorate.call(this);this.className="view-category-filter-overlay";this.obeyCloseEvents=!0;var b=base.instantiateTemplate("#view-category-filter-dialog-template");this.appendChild(b);this.formEl_=this.querySelector("form");this.categoriesEl_=this.querySelector(".categories");this.addEventListener("visibleChange",this.onVisibleChange_.bind(this))},set categories(b){this.categories_=
362 var d=document.createElement("label");d.textContent=c;d.setAttribute("for",c);c=document.createElement("div");c.appendChild(e);c.appendChild(d);this.categoriesEl_.appendChild(c)}},updateSetting_:function(b){void 0!==this.settingUpdatedCallback_&&this.settingUpdatedCallback_(this.unselectedCategories_())}};return{CategoryFilterDialog:d}});"use strict";base.exportTo("tracing",function(){return{mouseModeConstants:{MOUSE_MODE_SELECTION:1,MOUSE_MODE_PANSCAN:2,MOUSE_MODE_ZOOM:3}}});"use strict";base.require("base.events");
363 base.exportTo("tracing",function(){function d(a){this.parentEl_=a;this.modelTrackContainer_=null;this.scaleX_=1;this.gridTimebase_=this.panY_=this.panX_=0;this.gridStep_=1E3/60;this.hasCalledSetupFunction_=this.gridEnabled_=!1;this.onResize_=this.onResize_.bind(this);this.onModelTrackControllerScroll_=this.onModelTrackControllerScroll_.bind(this);this.checkForAttachInterval_=setInterval(this.checkForAttach_.bind(this),250);this.markers=[]}function b(a,c){this.viewport_=a;this.positionWorld_=c;this.selected_=
375 base.exportTo("base",function(){function d(a){try{a.callback.call(a.context)}catch(c){base.onAnimationFrameError(c,a.stack)}}function b(){k=!1;var a=f;h=g;f=[];g=[];for(var c=0;c<a.length;c++)d(a[c]);for(;0<h.length;)d(h.shift());h=void 0}function a(){if(!e)return"";var a=base.stackTrace();a.shift();return a.join("\n")}function c(c,e){g.push({callback:c,context:e||window,stack:a()});k||(k=!0,window.webkitRequestAnimationFrame(b))}var e=!1,f=[],g=[],h=void 0,k=!1;return{onAnimationFrameError:function(a,
377 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,
381 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.");
386 base.exportTo("tracing.tracks",function(){var d={SLICE:1,INSTANT_EVENT:2},b=ui.define("drawing-container",tracing.tracks.Track);b.prototype={__proto__:tracing.tracks.Track.prototype,decorate:function(a){tracing.tracks.Track.prototype.decorate.call(this,a);this.classList.add("drawing-container");this.canvas_=document.createElement("canvas");this.canvas_.className="drawing-container-canvas";this.canvas_.style.left=tracing.constants.HEADING_WIDTH+"px";this.appendChild(this.canvas_);this.ctx_=this.canvas_.getContext("2d");
390 "px")},visibleFilter_:function(a){return a instanceof tracing.tracks.Track?"none"!==window.getComputedStyle(a).display:!1}};return{DrawingContainer:b,DrawType:d}});"use strict";base.exportTo("tracing",function(){return{constants:{HEADING_WIDTH:250}}});"use strict";base.requireStylesheet("tracing.tracks.heading_track");base.require("tracing.constants");base.require("tracing.tracks.track");base.require("ui");
391 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=
393 base.exportTo("tracing.tracks",function(){var d=ui.define("ruler-track",tracing.tracks.HeadingTrack),b=Math.log(10);d.prototype={__proto__:tracing.tracks.HeadingTrack.prototype,decorate:function(a){tracing.tracks.HeadingTrack.prototype.decorate.call(this,a);this.classList.add("ruler-track");this.strings_secs_=[];this.strings_msecs_=[];this.addEventListener("mousedown",this.onMouseDown);this.viewportMarkersChange_=this.viewportMarkersChange_.bind(this);a.addEventListener("markersChange",this.viewportMarkersChange_)},
401 base.exportTo("base",function(){function d(){this.iframe_=void 0}d.prototype={__proto__:Object.prototype,measure:function(b){this.iframe_.contentDocument.body.appendChild(b);var a=this.iframe_.contentWindow.getComputedStyle(b),c=parseInt(a.width,10),a=parseInt(a.height,10);this.iframe_.contentDocument.body.removeChild(b);return{width:c,height:a}},attach:function(){var b=document.createElement("iframe");b.style.cssText="position:absolute;width:100%;height:0;border:0;visibility:hidden";document.body.appendChild(b);
404 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&&
407 base.exportTo
410 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_=
418 base.exportTo("tracing.tracks",function(){var d=ui.define("cpu-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("cpu-track")},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},
421 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!=
429 base.exportTo("tcmalloc",function(){var d=tracing.getColorPalette(),b=tracing.getColorPaletteHighlightIdBoost(),a=ui.define("heap-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("heap-instance-track");this.objectInstance_=null},set objectInstances(a){if(a){if(1!=a.length)throw Error("Bad object instance count.");this.objectInstance_=a[0];this.maxBytes_=
435 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_},
440 base.exportTo("tracing.tracks",function(){var d=ui.define("spacing-track",tracing.tracks.HeadingTrack);d.prototype={__proto__:tracing.tracks.HeadingTrack.prototype,decorate:function(b){tracing.tracks.HeadingTrack.prototype.decorate.call(this,b);this.classList.add("spacing-track")},draw:function(b,a,c){},addAllObjectsMatchingFilterToSelection:function(b,a){}};return{SpacingTrack:d}});"use strict";base.require("base.sorted_array_utils");base.require("tracing.tracks.container_track");base.require("ui");
441 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_()},
446 base.exportTo("tracing.tracks",function(){var d=ui.define("async-slice-group-track",tracing.tracks.SliceGroupTrack);d.prototype={__proto__:tracing.tracks.SliceGroupTrack.prototype,decorate:function(b){tracing.tracks.SliceGroupTrack.prototype.decorate.call(this,b);this.classList.add("async-slice-group-track")},addSliceTrack_:function(b){b=tracing.tracks.SliceGroupTrack.prototype.addSliceTrack_.call(this,b);b.asyncStyle=!0;return b},buildSubRows_:function(){var b=tracing.filterSliceArray(this.categoryFilter,
449 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+
453 base.exportTo("ui",function(){function d(a){var b=document.createElement("span");a&&(a.className&&(b.className=a.className),a.textContent&&(b.textContent=a.textContent),a.parent&&a.parent.appendChild(b));return b}var b=1;return{createSpan:d,createDiv:function(a){var b=document.createElement("div");a&&(a.className&&(b.className=a.className),a.parent&&a.parent.appendChild(b));return b},createScopedStyle:function(a){var b=document.createElement("style");b.scoped=!0;b.innerHTML=a;return b},createSelector:function(a,
458 base.exportTo("tracing.tracks",function(){var d=tracing.analysis.ObjectSnapshotView,b=tracing.analysis.ObjectInstanceView,a=tracing.TraceModelSettings,c=tracing.tracks.SpacingTrack,e=ui.define("process-track-base",tracing.tracks.ContainerTrack);e.prototype={__proto__:tracing.tracks.ContainerTrack.prototype,decorate:function(a){tracing.tracks.ContainerTrack.prototype.decorate.call(this,a);this.processBase_=void 0;this.classList.add("process-track-base");this.classList.add("expanded");this.expandEl_=
466 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,e=base.dictionaryValues(this.kernel.cpus);e.sort(tracing.trace_model.Cpu.compare);for(var d=!1,g=0;g<e.length;++g){var h=
468 base.exportTo("tracing.tracks",function(){var d=tracing.tracks.ProcessTrackBase,b=ui.define("process-track",d);b.prototype={__proto__:d.prototype,decorate:function(a){tracing.tracks.ProcessTrackBase.prototype.decorate.call(this,a)},drawTrack:function(a){switch(a){case tracing.tracks.DrawType.INSTANT_EVENT:if(!this.processBase.instantEvents||0===this.processBase.instantEvents.length)break;var b=this.context();if(void 0===b)break;b.save();var e=this.setupCanvasForDraw_();this.drawInstantEvents_(this.processBase.instantEvents,
471 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},
476 base.exportTo("ui",function(){var d=ui.define("div");d.prototype={__proto__:HTMLDivElement.prototype,decorate:function(b){this.classList.add("mouse-mode-selector");this.parentEl_=b;b=base.instantiateTemplate("#mouse-mode-selector-template");this.appendChild(b);this.buttonsEl_=this.querySelector(".buttons");this.dragHandleEl_=this.querySelector(".drag-handle");this.panScanModeButton_=this.buttonsEl_.querySelector(".pan-scan-mode-button");this.selectionModeButton_=this.buttonsEl_.querySelector(".selection-mode-button");
489 base.exportTo("tracing",function(){var d=tracing.Selection,b=tracing.TimelineViewport,a=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 b(this);this.viewportStateAtMouseDown_=null;this.rulerTrackContainer_=new tracing.tracks.DrawingContainer(this.viewport_);this.appendChild(this.rulerTrackContainer_);this.rulerTrackContainer_.invalidate();this.rulerTrack_=
516 base.exportTo("tracing",function(){function d(){this.model_=this.timeline_=void 0;this.filterText_="";this.filterHits_=new tracing.Selection;this.filterHitsDirty_=!0;this.currentHitIndex_=-1}var b=ui.define("div");b.prototype={__proto__:ui.Overlay.prototype,decorate:function(){ui.Overlay.prototype.decorate.call(this);this.className="find-control";this.hitCountEl_=document.createElement("div");this.hitCountEl_.className="hit-count-label";this.hitCountEl_.textContent="1 of 7";var a=document.createElement("div");
523 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},
529 base.exportTo("tracing",function(){var d=ui.define("div");d.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.classList.add("timeline-view");var b=base.instantiateTemplate("#timeline-view-template");this.appendChild(b);this.titleEl_=this.querySelector(".title");this.leftControlsEl_=this.querySelector("#left-controls");this.rightControlsEl_=this.querySelector("#right-controls");this.timelineContainer_=this.querySelector(".container");this.categoryFilterButton_=this.createCategoryFilterButton_();