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

Lines Matching refs:Args

33 openAsyncSlice:function(a,e,f,b,h){e=new tracing.trace_model.AsyncSlice(e,f,tracing.getStringColorId(f),h);e.id=b;e.startThread=a;this.openAsyncSlices||(this.openAsyncSlices={});this.openAsyncSlices[f+":"+b]=e},closeAsyncSlice:function(a,e,f,b){this.openAsyncSlices&&(e=e+":"+f,f=this.openAsyncSlices[e])&&(f.endThread=a,f.duration=b-f.start,f.startThread.asyncSliceGroup.push(f),f.subSlices=[new tracing.trace_model.Slice(f.category,f.title,f.colorId,f.start,f.args,f.duration)],delete this.openAsyncSlices[e])},
35 f=m.sliceGroup.endSlice(g);h=b(a[3]);for(d in h)void 0!==f.args[d]&&this.model_.importErrors.push("Both the B and E events of "+f.title+"provided values for argument "+d+". The value of the E event will be used."),f.args[d]=h[d];break;case "C":e=parseInt(a[1]);var l=a[2],n=parseInt(a[3]),d=a[4];f=this.model_.getOrCreateProcess(e).getOrCreateCounter(d,l);0===f.numSeries&&f.addSeries(new tracing.trace_model.CounterSeries(n,tracing.getStringColorId(f.name+".value")));f.series.forEach(function(a){a.addSample(g,
49 openAsyncSlice:function(a,c,e,f,b,h){e=this.importer.getOrCreateKernelThread(c+":"+e,f);a=new tracing.trace_model.AsyncSlice(c,h,tracing.getStringColorId(h),a);a.startThread=e.thread;e.openAsyncSlices||(e.openAsyncSlices={});e.openAsyncSlices[b]=a},closeAsyncSlice:function(a,c,e,f,b,h){e=this.importer.getOrCreateKernelThread(c+":"+e,f);e.openAsyncSlices&&(f=e.openAsyncSlices[b])&&(f.duration=a-f.start,f.args=h,f.endThread=e.thread,f.subSlices=[new tracing.trace_model.Slice(c,f.title,f.colorId,f.start,
50 f.args,f.duration)],e.thread.asyncSliceGroup.push(f),delete e.openAsyncSlices[b])},f2fsWriteBeginEvent:function(a,c,e,b,g){var h=/dev = \((\d+,\d+)\), ino = (\d+), pos = (\d+), len = (\d+), flags = (\d+)/.exec(g.details);if(!h)return!1;a=h[1];c=parseInt(h[2]);e=parseInt(h[3]);h=parseInt(h[4]);this.openAsyncSlice(b,"f2fs",g.threadName,g.pid,a+"-"+c+"-"+e+"-"+h,"f2fs_write");return!0},f2fsWriteEndEvent:function(a,c,e,b,g){var h=/dev = \((\d+,\d+)\), ino = (\d+), pos = (\d+), len = (\d+), copied = (\d+)/.exec(g.details);
104 d.prototype.maliDDKEvent.bind(this));this.model_=a.model_}var b=tracing.importer.linux_perf.Parser;d.prototype={__proto__:b.prototype,maliDDKOpenSlice:function(a,c,e,b,g){a=this.importer.model_.getOrCreateProcess(a).getOrCreateThread(c);b=/^([\w\d_]*)(?:\(\))?:?\s*(.*)$/.exec(b);a.sliceGroup.beginSlice("gpu-driver",b[1],e,{args:b[2],blockinfo:g})},maliDDKCloseSlice:function(a,c,e,b,g){a=this.importer.model_.getOrCreateProcess(a).getOrCreateThread(c);a.sliceGroup.openSliceCount&&a.sliceGroup.endSlice(e)},
117 e.start,e.args=m,e.endThread=b.thread,e.subSlices=[new tracing.trace_model.Slice(c,e.title,e.colorId,e.start,e.args,e.duration)],b.thread.asyncSliceGroup.push(e),delete b.openAsyncSlices[d])},kswapdWake:function(c,e,b,d,l){c=a.exec(l.details);if(!c)return!1;parseInt(c[1]);c=parseInt(c[2]);b=this.importer.getOrCreateKernelThread("kswapd: "+l.threadName,b,b);b.openSliceTS?c>b.order&&(b.order=c):(b.openSliceTS=d,b.order=c);return!0},kswapdSleep:function(a,c,b,e,d){a=this.importer.getOrCreateKernelThread("kswapd: "+
147 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");
157 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]?
185 new this.sliceConstructor(a.category,a.title,a.colorId,a.start,a.args,a.duration);c.didNotFinish=a.didNotFinish;return c}};d.merge=function(a,c){if(0<a.openPartialSlices_.length)throw Error("groupA has open partial slices");if(0<c.openPartialSlices_.length)throw Error("groupB has open partial slices");for(var b=new d,f=a.slices,g=c.slices,h=f.length-1,k=g.length-1,l=[],m=[],n=function(a){for(var c=0;c<m.length;c++){var f=m[c],g=f.end;if(a<f.start||g<a)throw Error("slice should not be split");var d=
228 importEvents:function(a){this.createParsers();this.importCpuData();this.alignClocks(a)&&(this.buildMapFromLinuxPidsToThreads(),this.buildPerThreadCpuSlicesFromCpuState())},finalizeImport:function(){},joinRefs:function(){},buildPerThreadCpuSlicesFromCpuState:function(){for(var a in this.cpuStates_)for(var c=this.cpuStates_[a].cpu,b=0;b<c.slices.length;b++){var e=c.slices[b],f=this.threadsByLinuxPid[e.args.tid];f&&(f.tempCpuSlices||(f.tempCpuSlices=[]),f.tempCpuSlices.push(e))}for(b in this.wakeups_)if(a=
231 {},p));void 0!==k&&(e.push(new tracing.trace_model.Slice("","Runnable",g,k.ts,{"wakeup from tid":k.fromTid},n.start-k.ts)),k=void 0)};"S"==m.args.stateWhenDescheduled?q("Sleeping",h):"R"==m.args.stateWhenDescheduled||"R+"==m.args.stateWhenDescheduled?e.push(new tracing.trace_model.Slice("","Runnable",g,m.end,{},p)):"D"==m.args.stateWhenDescheduled?q("Uninterruptible Sleep",l):"T"==m.args.stateWhenDescheduled?e.push(new tracing.trace_model.Slice("","__TASK_STOPPED",l,m.end,{},p)):"t"==m.args.stateWhenDescheduled?
232 e.push(new tracing.trace_model.Slice("","debug",l,m.end,{},p)):"Z"==m.args.stateWhenDescheduled?e.push(new tracing.trace_model.Slice("","Zombie",l,m.end,{},p)):"X"==m.args.stateWhenDescheduled?e.push(new tracing.trace_model.Slice("","Exit Dead",l,m.end,{},p)):"x"==m.args.stateWhenDescheduled?e.push(new tracing.trace_model.Slice("","Task Dead",l,m.end,{},p)):"K"==m.args.stateWhenDescheduled?e.push(new tracing.trace_model.Slice("","Wakekill",l,m.end,{},p)):"W"==m.args.stateWhenDescheduled?e.push(new tracing.trace_model.Slice("",
233 "Waking",l,m.end,{},p)):"D|K"==m.args.stateWhenDescheduled?q("Uninterruptible Sleep | WakeKill",l):"D|W"==m.argsargs.stateWhenDescheduled));e.push(new tracing.trace_model.Slice("","Running",d,n.start,{},n.duration))}a.cpuSlices=e}},this)},alignClocks:function(a){if(0==this.clockSyncRecords_.length){if(!a)return!0;
255 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=
256 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=
257 c.sliceGroup.endSlice(a.ts/1E3),b;for(b in a.args)void 0!==c.args[b]&&this.model_.importErrors.push("Both the B and E phases of "+c.name+"provided values for argument "+b+". The value of the E phase event will be used."),c.args[b]=this.deepCopyIfNeeded_(a.args[b])}else this.model_.importErrors.push("E phase event without a matching B phase event.");else this.model_.importErrors.push("Timestamps are moving backward.")},processMetadataEvent:function(a){if("process_name"==a.name){var c=this.model_.getOrCreateProcess(a.pid);
258 c.name=a.args.name}else"process_labels"==a.name?(c=this.model_.getOrCreateProcess(a.pid),c.labels.push.apply(c.labels,a.args.labels.split(","))):"process_sort_index"==a.name?(c=this.model_.getOrCreateProcess(a.pid),c.sortIndex=a.args.sort_index):"thread_name"==a.name?(c=this.model_.getOrCreateProcess(a.pid).getOrCreateThread(a.tid),c.name=a.args.name):"thread_sort_index"==a.name?(c=this.model_.getOrCreateProcess(a.pid).getOrCreateThread(a.tid),c.sortIndex=a.args.sort_index):this.model_.importErrors.push("Unrecognized metadata name: "+
259 a.name)},processInstantEvent:function(a){var c;switch(a.s){case "g":c=tracing.trace_model.GlobalInstantEvent;break;case "p":c=tracing.trace_model.ProcessInstantEvent;break;default:c=tracing.trace_model.ThreadInstantEvent}var b=tracing.getStringColorId(a.name);c=new c(a.cat,a.name,b,a.ts/1E3,this.deepCopyIfNeeded_(a.args));switch(c.type){case tracing.trace_model.InstantEventType.GLOBAL:this.model_.pushInstantEvent(c);break;case tracing.trace_model.InstantEventType.PROCESS:this.model_.getOrCreateProcess(a.pid).pushInstantEvent(c);
260 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):
264 1E3);m.duration=d.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=h;"T"==l[f-1].event.ph&&(n=h+":"+l[f-1].event.args.step);n=new tracing.trace_model.AsyncSlice(l[0].event.cat,n,tracing.getStringColorId(h+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);
265 m.subSlices.push(n)}var l=m.subSlices[m.subSlices.length-1],p;for(p in d.args)l.args[p]=this.deepCopyIfNeeded_(d.args[p]);m.startThread.asyncSliceGroup.push(m);delete a[h][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.");
266 args.snapshot){this.model_.importErrors.push("While processing "+c.id+" at ts="+b+": Snapshots must have args: {snapshot: ...}");return}var d;try{d=a.objects.addSnapshot(c.id,c.cat,c.name,b,this.deepCopyIfNeeded_(c.args.snapshot))}catch(g){this.model_.importErrors.push("While processing snapshot of "+
269 l+" at ts="+d.ts+": "+q);return}p.objectInstance.hasImplicitSnapshots=!0;p.containingSnapshot=d;c[b]=p;if(!(p instanceof tracing.trace_model.ObjectSnapshot))throw Error("Created object must be instanceof snapshot");return p.args}}function b(a,c,d,k){if(a instanceof Object)if(a instanceof Array)for(var l=0;l<a.length;l++){var m=c.call(k,a,l,a[l],d);m?b(m,c,d,k):b(a[l],c,d,k)}else for(l in a)(m=c.call(k,a,l,a[l],d))?b(m,c,d,k):b(a[l],c,d,k)}a.objects.iterObjectInstances(function(a){a.snapshots.forEach(function(a){if(void 0!==
270 a.args.id)throw Error("args cannot have an id field inside it");b(a.args,c,a,this)},this)},this)},joinObjectRefs_:function(){base.iterItems(this.model_.processes,function(a,c){this.joinObjectRefsForProcess_(c)},this)},joinObjectRefsForProcess_:function(a){var c=[];base.iterItems(a.threads,function(b,f){f.asyncSliceGroup.slices.forEach(function(b){this.searchItemForIDRefs_(c,a.objects,"start",b)},this);f.sliceGroup.slices.forEach(function(b){this.searchItemForIDRefs_(c,a.objects,"start",b)},this)},
272 Array)for(var c=0;c<a.length;c++)d(a,c,a[c]),h(a[c]);else for(c in a){var b=a[c];d(a,c,b);h(b)}}if(!f.args)throw Error("");h(f.args)}};tracing.TraceModel.registerImporter(b);return{TraceEventImporter:b}});"use strict";
294 parseInt,parseInt,parseInt,null],processor:this.processCodeCreateEvent_.bind(this)},"code-move":{parsers:[parseInt,parseInt],processor:this.processCodeMoveEvent_.bind(this)},"code-delete":{parsers:[parseInt],processor:this.processCodeDeleteEvent_.bind(this)},tick:{parsers:[parseInt,parseInt,parseInt,null,null,parseInt,"var-args"],processor:this.processTickEvent_.bind(this)},distortion:{parsers:[parseInt],processor:this.processDistortion_.bind(this)},"plot-range":{parsers:[parseInt,parseInt],processor:this.processPlotRange_.bind(this)}});
327 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 f=0,d;for(d in c.args)f+=1;if(0<f)for(d in b.appendSummaryRow(e,"Args"),
328 c.args)b.appendSummaryRow(e," "+d,c.args[d])}return{analyzeSingleSliceHit:d,analyzeMultipleSliceHits:function(b,a){var c=a.bounds.min,e=a.bounds.max;a.map(function(a){return a.slice.title});for(var f=0,g={},h=0;h<a.length;h++){var k=a[h].slice;g[k.title]||(g[k.title]={hits:[]},f++);g[k.title].hits.push(a[h])}var l;l=b.appendTable("analysis-slices-table",3);b.appendTableHeader(l,"Slices:");var m=0;base.iterItems(g,function(a,c){for(var e=0,g=0,h=Number.MAX_VALUE,k=-Number.MAX_VALUE,t=Number.MAX_VALUE,
341 d(a.ts)+"ms</div>\n");f+="<table><tr>";f+='<tr><td>args:</td><td id="args"></td></tr>\n';this.innerHTML=f+="</table>";f=new tracing.analysis.ObjectInstanceLink;f.objectInstance=b;b=this.querySelector("#instance-link");b.parentElement.replaceChild(f,b);this.querySelector("#args").textContent=JSON.stringify(a.args,null,2)}else this.textContent=""}};var a=ui.define("default-object-instance-view",tracing.analysis.ObjectInstanceView);a.prototype={__proto__:tracing.analysis.ObjectInstanceView.prototype,