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

Lines Matching refs:tid

28 "saveTraceFileComplete")},onSaveTraceFileCanceled:function(){cr.dispatchSimpleEvent(this,"saveTraceFileCanceled")},selfTest:function(){this.beginTracing();window.setTimeout(this.endTracing.bind(This),500)}};return{TracingController:g}});cr.define("tracing",function(){function g(a,b,d,c,f){this.title=a;this.start=d;this.colorId=b;this.args=c;this.didNotFinish=!1;void 0!==f&&(this.duration=f)}function e(a,b,d,c,f){g.call(this,a,b,d,c,f);this.subSlices=[]}function c(a,b,d,c){g.call(this,a,b,d,c)}function f(a,b){if(!a)throw"Parent must be provided.";this.parent=a;this.tid=b;this.subRows=[[]];this.asyncSlices=new d(this.ptid)}function h(a,b,d){this.parent=a;this.id=b;this.name=d;this.seriesNames=[];this.seriesColors=[];this.timestamps=
30 this.duration}};e.prototype={__proto__:g.prototype};c.prototype={__proto__:g.prototype,id:void 0,startThread:void 0,endThread:void 0,subSlices:void 0};var l={};f.getPTIDFromPidAndTid=function(a,b){l[a]||(l[a]={});l[a][b]||(l[a][b]=a+":"+b);return l[a][b]};f.prototype={name:void 0,get ptid(){return f.getPTIDFromPidAndTid(this.tid,this.parent.pid)},getSubrow:function(a){for(;a>=this.subRows.length;)this.subRows.push([]);return this.subRows[a]},shiftSubRow_:function(a,b){for(var d=0;d<a.length;d++){var c=
32 (this.minTimestamp=Math.min.apply(Math,a),this.maxTimestamp=Math.max.apply(Math,a)):this.maxTimestamp=this.minTimestamp=void 0},get userFriendlyName(){return this.parent.pid+": "+(this.name||this.tid)},get userFriendlyDetails(){return"pid: "+this.parent.pid+", tid: "+this.tid+(this.name?", name: "+this.name:"")}};f.compare=function(b,d){if(b.parent.pid!=d.parent.pid)return a.compare(b.parent,d.parent.pid);if(b.name&&d.name){var c=b.name.localeCompare(d.name);return 0==c?b.tid-d.tid:c}return b.name?
33 -1:d.name?1:b.tid-d.tid};h.prototype={__proto__:Object.prototype,get numSeries(){return this.seriesNames.length},get numSamples(){return this.timestamps.length},shiftTimestampsForward:function(a){for(var b=0;b<this.timestamps.length;b++)this.timestamps[b]+=a},updateBounds:function(){if(this.seriesNames.length!=this.seriesColors.length)throw"seriesNames.length must match seriesColors.length";if(this.numSeries*this.numSamples!=this.samples.length)throw"samples.length must be a multiple of numSamples.";
35 c?b.tid-d.tid:c};a.prototype={get numThreads(){var a=0,b;for(b in this.threads)a++;return a},shiftTimestampsForward:function(a){for(var b in this.threads)this.threads[b].shiftTimestampsForward(a);for(var d in this.counters)this.counters[d].shiftTimestampsForward(a)},getOrCreateThread:function(a){this.threads[a]||(this.threads[a]=new f(this,a));return this.threads[a]},getOrCreateCounter:function(a,b){var d=a+"."+b;this.counters[d]||(this.counters[d]=new h(this,d,b));return this.counters[d]}};a.compare=
40 var c=b.name.localeCompare(d.name);return 0==c?b.tid-d.tid:c};var o=[{r:138,g:113,b:152},{r:175,g:112,b:133},{r:127,g:135,b:225},{r:93,g:81,b:137},{r:116,g:143,b:119},{r:178,g:214,b:122},{r:87,g:109,b:147},{r:119,g:155,b:95},{r:114,g:180,b:160},{r:132,g:85,b:103},{r:157,g:210,b:150},{r:148,g:94,b:86},{r:164,g:108,b:138},{r:139,g:191,b:150},{r:110,g:99,b:145},{r:80,g:129,b:109},{r:125,g:140,b:149},{r:93,g:124,b:132},{r:140,g:85,b:140},{r:104,g:163,b:162},{r:132,g:141,b:178},{r:131,g:105,b:147},{r:135,
50 a.userFriendlyName:this.lastActiveComm;this.cpu.slices.push(new tracing.TimelineSlice(name,tracing.getStringColorId(name),this.lastActiveTs,{comm:this.lastActiveComm,tid:this.lastActivePid,prio:this.lastActivePrio,stateWhenDescheduled:b},h))}this.lastActiveTs=d;this.lastActivePid=c;this.lastActiveComm=f;this.lastActivePrio=e}};TestExports={};var f=/^\s*(.+?)\s+\[(\d+)\]\s*([d.][N.][sh.][\d.])?\s*(\d+\.\d+):\s+(\S+):\s(.*)$/;TestExports.lineRE=f;var h=/trace_event_clock_sync: parent_ts=(\d+\.?\d*)/;
51 TestExports.traceEventClockSyncRE=h;c.canImport=function(a){if(!("string"===typeof a||a instanceof String))return!1;if(/^# tracer:/.exec(a))return!0;var b=/^(.+)\n/.exec(a);b&&(a=b[1]);return f.exec(a)?!0:!1};c.prototype={__proto__:Object.prototype,buildMapFromLinuxPidsToTimelineThreads:function(){this.threadsByLinuxPid={};this.model_.getAllThreads().forEach(function(a){this.threadsByLinuxPid[a.tid]=a}.bind(this))},getOrCreateCpuState:function(a){if(!this.cpuStates_[a]){var b=this.model_.getOrCreateCpu(a);
53 importEvents:function(){this.importCpuData();this.alignClocks()&&this.buildPerThreadCpuSlicesFromCpuState()},finalizeImport:function(){},buildPerThreadCpuSlicesFromCpuState:function(){for(var a in this.cpuStates_)for(var b=this.cpuStates_[a].cpu,d=0;d<b.slices.length;d++){var c=b.slices[d],f=this.threadsByLinuxPid[c.args.tid];f&&(f.tempCpuSlices||(f.tempCpuSlices=[]),c.index=d,f.tempCpuSlices.push(c))}var e=tracing.getColorIdByName("running"),h=tracing.getColorIdByName("runnable"),g=tracing.getColorIdByName("sleeping"),
58 a}}for(var h in this.kernelThreadStates_){b=this.kernelThreadStates_[h].thread;for(c=0;c<b.subRows[0].length;c++)b.subRows[0][c].start+=a}return!0},abortImport:function(){if(this.pushedEventsToThreads)throw"Cannot abort, have alrady pushedCpuDataToThreads.";for(var a in this.cpuStates_)delete this.model_.cpus[a];for(var b in this.kernelThreadStates_){a=this.kernelThreadStates_[b].thread;var d=a.parent;delete d.threads[a.tid];delete this.model_.processes[d.pid]}this.model_.importErrors.push("Cannot import kernel trace without a clock sync.")},
61 c.threadName=this.parseThreadName(a),c.tid
76 f.args["ui-nest"])this.model_.importErrors.push("ui-nest no longer supported.");else if(0!=c.openSlices.length){var e=c.openSlices.pop().slice;e.duration=f.ts/1E3-e.start;f.uts&&(e.durationInUserTime=f.uts/1E3-e.startInUserTime);for(var a in f.args)e.args[a]=f.args[a];this.model_.getOrCreateProcess(f.pid).getOrCreateThread(f.tid).getSubrow(c.openSlices.length).push(e);c.openSlices.length&&c.openSlices[c.openSlices.length-1].slice.subSlices.push(e)}},processAsyncEvent:function(c,f,e){c=this.model_.getOrCreateProcess(e.pid).getOrCreateThread(e.tid);
78 this.threadStateByPTID_[f];0<e.openSlices.length;)b=e.openSlices.pop(),b.slice.duration=c-b.slice.start,b.slice.didNotFinish=!0,a=this.events_[b.index],this.model_.getOrCreateProcess(a.pid).getOrCreateThread(a.tid).getSubrow(e.openSlices.length).push(b.slice),e.openSlices.length&&e.openSlices[e.openSlices.length-1].slice.subSlices.push(b.slice)},processCounterEvent:function(c){var f;f=void 0!==c.id?c.name+"["+c.id+"]":c.name;f=this.model_.getOrCreateProcess(c.pid).getOrCreateCounter(c.cat,f);if(0==
80 a=tracing.TimelineThread.getPTIDFromPidAndTid(e.pid,e.tid);a in this.threadStateByPTID_||(this.threadStateByPTID_[a]=new g);var b=this.threadStateByPTID_[a];"B"==e.ph?this.processBeginEvent(f,b,e):"E"==e.ph?this.processEndEvent(b,e):"S"==e.ph?this.processAsyncEvent(f,b,e):"F"==e.ph?this.processAsyncEvent(f,b,e):"T"==e.ph?this.processAsyncEvent(f,b,e):"I"==e.ph?(this.processBeginEvent(f,b,e),this.processEndEvent(b,e)):"C"==e.ph?this.processCounterEvent(e):"M"==e.ph?"thread_name"==e.name?this.model_.getOrCreateProcess(e.pid).getOrCreateThread(e.tid).name=