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

Lines Matching refs:THREAD

5 window.FLATTENED["tracing.trace_model.time_to_object_instance_map"]=!0;window.FLATTENED["tracing.trace_model.object_collection"]=!0;window.FLATTENED["tracing.trace_model.async_slice"]=!0;window.FLATTENED["tracing.trace_model.async_slice_group"]=!0;window.FLATTENED["tracing.trace_model.sample"]=!0;window.FLATTENED["tracing.trace_model.slice_group"]=!0;window.FLATTENED["tracing.trace_model.thread"]=!0;window.FLATTENED["base.settings"]=!0;window.FLATTENED["tracing.trace_model_settings"]=!0;
44 d.prototype={__proto__:a.prototype,cpufreqSlice:function(a,e,b,g){b=this.importer.getOrCreatePseudoThread("cpufreq");b.openSlice=e;a=new tracing.trace_model.Slice("",b.openSlice,tracing.getStringColorId(b.openSlice),a,g,0);b.thread.sliceGroup.pushSlice(a)},cpufreqBoostSlice:function(a,e,b){var g=this.importer.getOrCreatePseudoThread("cpufreq_boost");g.openSlice=e;a=new tracing.trace_model.Slice("",g.openSlice,tracing.getStringColorId(g.openSlice),a,b,0);g.thread.sliceGroup.pushSlice(a)},cpufreqUpDownEvent:function(a,
47 openAsyncSlice:function(a,c,e,b,g,h){e=this.importer.getOrCreateKernelThread(c+":"+e,b);a=new tracing.trace_model.AsyncSlice(c,h,tracing.getStringColorId(h),a);a.startThread=e.thread;e.openAsyncSlices||(e.openAsyncSlices={});e.openAsyncSlices[g]=a},closeAsyncSlice:function(a,c,e,b,g,h){e=this.importer.getOrCreateKernelThread(c+":"+e,b);e.openAsyncSlices&&(b=e.openAsyncSlices[g])&&(b.duration=a-b.start,b.args=h,b.endThread=e.thread,b.subSlices=[new tracing.trace_model.Slice(c,b.title,b.colorId,b.start,
48 b.args,b.duration)],e.thread.asyncSliceGroup.push(b),delete e.openAsyncSlices[g])},ext4SyncFileEnterEvent:function(a,c,e,b,g){a=/dev (\d+,\d+) ino (\d+) parent (\d+) datasync (\d+)/.exec(g.details);if(!a)return!1;c=a[1];e=parseInt(a[2]);this.openAsyncSlice(b,"ext4",g.threadName,g.pid,c+"-"+e,1==a[4]?"fdatasync":"fsync");return!0},ext4SyncFileExitEvent:function(a,c,e,b,g){e=/dev (\d+,\d+) ino (\d+) ret (\d+)/.exec(g.details);if(!e)return!1;a=e[1];c=parseInt(e[2]);e=parseInt(e[3]);this.closeAsyncSlice(b,
51 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 exynosFlipOpenSlice:function(a,c){var e=this.importer.getOrCreatePseudoThread("exynos_flip");e.openSliceTS=a;e.openSlice="flip:"+c},exynosFlipCloseSlice:function(a,c){var e=this.importer.getOrCreatePseudoThread("exynos_flip");if(e.openSlice){var b=new tracing.trace_model.Slice("",e.openSlice,tracing.getStringColorId(e.openSlice),e.openSliceTS,c,a-e.openSliceTS);e.thread.sliceGroup.pushSlice(b)}e.openSlice=void 0},flipEvent:function(a,c,e,b,g){c=/pipe=(\d+)/.exec(g.details);if(!c)return!1;c=parseInt(c[1]);
57 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",
58 a,c,e)},gestureCloseSlice:function(a,c){var e=this.importer.getOrCreatePseudoThread("gesture").thread;if(e.sliceGroup.openSliceCount){var b=e.sliceGroup.mostRecentlyOpenedPartialSlice;b.title!=a?this.importer.importError("Titles do not match. Title is "+b.title+" in openSlice, and is "+a+" in endSlice"):e.sliceGroup.endSlice(c)}},logEvent:function(a,c,e,b,g){a=/^\s*(\w+):\s*(\w+)$/.exec(g.details);switch(a[1]){case "start":this.gestureOpenSlice("GestureLog",b,{name:a[2]});break;case "end":this.gestureCloseSlice("GestureLog",
65 tracing.importer.linux_perf.Parser;d.prototype={__proto__:b.prototype,i915FlipOpenSlice:function(a,c,e){var b=this.importer.getOrCreatePseudoThread("i915_flip");b.openSliceTS=a;b.openSlice="flip:"+c+"/"+e},i915FlipCloseSlice:function(a,c){var e=this.importer.getOrCreatePseudoThread("i915_flip");if(e.openSlice){var b=new tracing.trace_model.Slice("",e.openSlice,tracing.getStringColorId(e.openSlice),e.openSliceTS,c,a-e.openSliceTS);e.thread.sliceGroup.pushSlice(b)}e.openSlice=void 0},i915GemObjectSlice:function(a,
66 c,e,b){var g=this.importer.getOrCreatePseudoThread("i915_gem");g.openSlice=c+":"+e;a=new tracing.trace_model.Slice("",g.openSlice,tracing.getStringColorId(g.openSlice),a,b,0);g.thread.sliceGroup.pushSlice(a)},i915GemRingSlice:function(a,c,e,b,g){var h=this.importer.getOrCreatePseudoThread("i915_gem_ring");h.openSlice=c+":"+e+"."+b;a=new tracing.trace_model.Slice("",h.openSlice,tracing.getStringColorId(h.openSlice),a,g,0);h.thread.sliceGroup.pushSlice(a)},i915RegSlice:function(a,c,e,b){var g=this.importer.getOrCreatePseudoThread("i915_reg");
67 g.openSlice=c+":"+e;a=new tracing.trace_model.Slice("",g.openSlice,tracing.getStringColorId(g.openSlice),a,b,0);g.thread.sliceGroup.pushSlice(a)},gemObjectCreateEvent:function(a,c,e,b,g){e=/obj=(\w+), size=(\d+)/.exec(g.details);if(!e)return!1;c=e[1];e=parseInt(e[2]);this.i915GemObjectSlice(b,a,c,{obj:c,size:e});return!0},gemObjectBindEvent:function(a,c,e,b,g){g=/obj=(\w+), offset=(\w+), size=(\d+)/.exec(g.details);if(!g)return!1;c=g[1];e=g[2];g=parseInt(g[3]);this.i915ObjectGemSlice(b,a+":"+c,{obj:c,
114 b,e,d,l){c=a.exec(l.details);if(!c)return!1;b=this.importer.getOrCreatePseudoThread(c[1]);void 0!==b.lastActiveTs&&(e=d-b.lastActiveTs,l=b.lastActiveValue,void 0==l&&(l=" "),e=new tracing.trace_model.Slice("",l,tracing.getStringColorId(l),b.lastActiveTs,{},e),b.thread.sliceGroup.pushSlice(e));b.lastActiveTs=d;b.lastActiveValue=c[2];return!0},syncWaitEvent:function(a,b,e,d,l){a=c.exec(l.details);if(!a||void 0===l.tgid)return!1;b=parseInt(l.tgid);e=this.model_.getOrCreateProcess(b).getOrCreateThread(e);
117 c=/work struct (.+)/;d.prototype={__proto__:b.prototype,executeStartEvent:function(c,b,g,d,k){c=a.exec(k.details);if(!c)return!1;g=this.importer.getOrCreateKernelThread(k.threadName,g,g);g.openSliceTS=d;g.openSlice=c[2];return!0},executeEndEvent:function(a,b,g,d,k){if(!c.exec(k.details))return!1;a=this.importer.getOrCreateKernelThread(k.threadName,g,g);a.openSlice&&(d=new tracing.trace_model.Slice("",a.openSlice,tracing.getStringColorId(a.openSlice),a.openSliceTS,{},d-a.openSliceTS),a.thread.sliceGroup.pushSlice(d));
178 this.name:"")},getSettingsKey:function(){if(this.name){var a=this.parent.getSettingsKey();return a?a+"."+this.name:void 0}}};b.compare=function(a,c){var b=a.parent.compareTo(c.parent);return b||(b=a.sortIndex-c.sortIndex)?b:(b=base.comparePossiblyUndefinedValues(a.name,c.name,function(a,c){return a.localeCompare(c)}))?b:a.tid-c.tid};return{ThreadSlice:d,Thread:b}});"use strict";
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++;
210 this.cpuStates_[a]=new d(c)}return this.cpuStates_[a]},getOrCreateKernelThread:function(a,c,b){this.kernelThreadStates_[a]||(b=this.model_.getOrCreateProcess(c).getOrCreateThread(b),b.name=a,this.kernelThreadStates_[a]={pid:c,thread:b,openSlice:void 0,openSliceTS:void 0},this.threadsByLinuxPid[c]=b);return this.kernelThreadStates_[a]},getOrCreatePseudoThread:function(a){var c=this.kernelThreadStates_[a];c||(c=this.getOrCreateKernelThread(a,0,this.pseudoThreadCounter),this.pseudoThreadCounter++);return c},
217 this.abortImport();return!1}a=this.clockSyncRecords_[0];if(0==a.parentTS||a.parentTS==a.perfTS)return!0;a=a.parentTS-a.perfTS;for(var c in this.cpuStates_){for(var b=this.cpuStates_[c].cpu,e=0;e<b.slices.length;e++){var f=b.slices[e];f.start+=a;f.duration=f.duration}for(var g in b.counters)for(e=b.counters[g],f=0;f<e.timestamps.length;f++)e.timestamps[f]+=a}for(var d in this.kernelThreadStates_)this.kernelThreadStates_[d].thread.shiftTimestampsForward(a);return!0},abortImport:function(){if(this.pushedEventsToThreads)throw Error("Cannot abort, have alrady pushedCpuDataToThreads.");
218 for(var a in this.cpuStates_)delete this.model_.kernel.cpus[a];for(var c in this.kernelThreadStates_){a=this.kernelThreadStates_[c].thread;var b=a.parent;delete b.threads[a.tid];delete this.model_.processes[b.pid]}this.model_.importErrors.push("Cannot import kernel trace without a clock sync.")},createParsers:function(){for(var a=tracing.importer.linux_perf.Parser.getSubtypeConstructors(),c=0;c<a.length;++c)this.parsers_.push(new a[c](this));this.registerEventHandler("tracing_mark_write:trace_event_clock_sync",
233 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};
238 this.allAsyncEvents_.push({event:a,thread:c})},processCounterEvent:function(a){var c;c=void 0!==a.id?a.name+"["+a.id+"]":a.name;c=this.model_.getOrCreateProcess(a.pid).getOrCreateCounter(a.cat,c);if(0===c.numSeries){for(var b in a.args)c.addSeries(new tracing.trace_model.CounterSeries(b,tracing.getStringColorId(c.name+"."+b)));if(0===c.numSeries){this.model_.importErrors.push("Expected counter "+a.name+" to have at least one argument to use as a value.");delete c.parent.counters[c.name];return}}var f=
239 a.ts/1E3;c.series.forEach(function(c){c.addSample(f,a.args[c.name]?a.args[c.name]:0)})},processObjectEvent:function(a){var c=this.model_.getOrCreateProcess(a.pid).getOrCreateThread(a.tid);this.allObjectEvents_.push({event:a,thread:c})},processDurationEvent:function(a){var c=this.model_.getOrCreateProcess(a.pid).getOrCreateThread(a.tid);if(c.sliceGroup.isTimestampValidForBeginOrEnd(a.ts/1E3))if("B"==a.ph)c.sliceGroup.beginSlice(a.cat,a.name,a.ts/1E3,this.deepCopyIfNeeded_(a.args));else if(c.sliceGroup.openSliceCount){var c=
243 break;case tracing.trace_model.InstantEventType.THREAD:this.model_.getOrCreateProcess(a.pid).getOrCreateThread(a.tid).sliceGroup.pushInstantEvent(c);break;default:throw Error("Unknown instant event type: "+a.s);}},processSampleEvent:function(a){this.model_.getOrCreateProcess(a.pid).getOrCreateThread(a.tid).addSample(a.cat,a.name,a.ts/1E3,this.deepCopyIfNeeded_(a.args))},importEvents:function(){for(var a=this.events_,c=0;c<a.length;c++){var b=a[c];"B"===b.ph||"E"===b.ph?this.processDurationEvent(b):
247 1E3);m.duration=g.ts/1E3-l[0].event.ts/1E3;m.startThread=l[0].thread;m.endThread=f.thread;m.id=k;m.args=this.deepCopyIfNeeded_(l[0].event.args);m.subSlices=[];for(f=1;f<l.length;++f){var n=d;"T"==l[f-1].event.ph&&(n=d+":"+l[f-1].event.args.step);n=new tracing.trace_model.AsyncSlice(l[0].event.cat,n,tracing.getStringColorId(d+f),l[f-1].event.ts/1E3);n.duration=l[f].event.ts/1E3-l[f-1].event.ts/1E3;n.startThread=l[f-1].thread;n.endThread=l[f].thread;n.id=k;n.args=this.deepCopyIfNeeded_(l[f-1].event.args);
248 m.subSlices.push(n)}var l=m.subSlices[m.subSlices.length-1],p;for(p in g.args)l.args[p]=this.deepCopyIfNeeded_(g.args[p]);m.startThread.asyncSliceGroup.push(m);delete a[d][k]}}}}}},createExplicitObjects_:function(){function a(a){var c=a.event;a=a.thread;void 0===c.name&&this.model_.importErrors.push("While processing "+JSON.stringify(c)+": Object events require an name parameter.");void 0===c.id&&this.model_.importErrors.push("While processing "+JSON.stringify(c)+": Object events require an id parameter.");
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+
438 ": ";this.tooltip=this.thread_.userFriendlyDetails;if(this.thread_.asyncSliceGroup.length){var b=new tracing.tracks.AsyncSliceGroupTrack(this.viewport);b.categoryFilter=this.categoryFilter;b.decorateHit=function(a){};b.group=this.thread_.asyncSliceGroup;b.hasVisibleContent&&this.appendChild(b)}this.thread_.samples.length&&(b=new tracing.tracks.SliceTrack(this.viewport),b.categoryFilter=b,b.group=this.thread_,b.slices=this.thread_.samples,b.decorateHit=function(a){a.thread=this.thread_},this.appendChild(b));
439 this.thread_.cpuSlices&&(b=new tracing.tracks.SliceTrack(this.viewport),b.categoryFilter=this.categoryFilter,b.heading="",b.height="4px",b.decorateHit=function(a){a.thread=this.thread_},b.slices=this.thread_.cpuSlices,b.hasVisibleContent&&this.appendChild(b));this.thread_.sliceGroup.length&&(b=new tracing.tracks.SliceGroupTrack(this.viewport),b.categoryFilter=this.categoryFilter,b.heading=this.thread_.userFriendlyName,b.tooltip=this.thread_.userFriendlyDetails,b.decorateHit=function(a){a.thread=this.thread_},
452 new tracing.tracks.CounterTrack(this.viewport);b.categoryFilter=this.categoryFilter_;b.counter=a;this.appendChild(b);this.appendChild(new c(this.viewport))}.bind(this))},appendThreadTracks_:function(){var a=base.dictionaryValues(this.processBase.threads).filter(function(a){return this.categoryFilter_.matchThread(a)},this);a.sort(tracing.trace_model.Thread.compare);a.forEach(function(a){var b=new tracing.tracks.ThreadTrack(this.viewport);b.categoryFilter=this.categoryFilter_;b.thread=a;b.hasVisibleContent&&