Lines Matching refs:CPU
2 window.FLATTENED["tracks.slice_track"]=!0;window.FLATTENED.guid=!0;window.FLATTENED["model.slice"]=!0;window.FLATTENED["model.slice_group"]=!0;window.FLATTENED["model.async_slice_group"]=!0;window.FLATTENED["model.sample"]=!0;window.FLATTENED["model.thread"]=!0;window.FLATTENED["model.counter"]=!0;window.FLATTENED["model.process_base"]=!0;window.FLATTENED["model.process"]=!0;window.FLATTENED["model.kernel"]=!0;window.FLATTENED["model.cpu"]=!0;window.FLATTENED.model=!0;
101 this.slices.length&&(this.bounds.addValue(this.slices[0].start),this.bounds.addValue(this.slices[this.slices.length-1].end));for(var a in this.counters)this.counters[a].updateBounds(),this.bounds.addRange(this.counters[a].bounds)},addCategoriesToDict:function(a){for(var b=0;b<this.slices.length;b++)a[this.slices[b].category]=!0;for(var f in this.counters)a[this.counters[f].category]=!0}};d.compare=function(a,b){return a.cpuNumber-b.cpuNumber};return{Cpu:d}});"use strict";base.require("range");base.require("event_target");
102 base.require("model.process");base.require("model.kernel");base.require("model.cpu");base.require("filter");
103 base.exportTo("tracing",function(){function d(a,f){this.kernel=new b;this.cpus={};this.processes={};this.importErrors=[];this.metadata=[];this.categories=[];this.bounds=new base.Range;a&&this.importTraces([a],f)}function c(){this.importPriority=0}var a=tracing.model.Process,b=tracing.model.Kernel,f=tracing.model.Cpu,e=[];d.registerImporter=function(b){e.push(b)};d.prototype={__proto__:base.EventTarget.prototype,get numProcesses(){var b=0,a;for(a in this.processes)b++;return b},getOrCreateCpu:function(b){this.cpus[b]||
110 base.exportTo("tracing.tracks",function(){var d=tracing.ui.define(tracing.tracks.ContainerTrack);d.prototype={__proto__:tracing.tracks.ContainerTrack.prototype,decorate:function(){this.classList.add("cpu-track")},get cpu(){return this.cpu_},set cpu(c){this.cpu_=c;this.updateChildTracks_()},get tooltip(){return this.tooltip_},set tooltip(c){this.tooltip_=c;this.updateChildTracks_()},get heading(){return this.heading_},set heading(c){this.heading_=c;this.updateChildTracks_()},applyCategoryFilter_:function(){this.categoryFilter.matchCpu(this.cpu_)?
111 this.updateChildTracks_():this.visible=!1},updateChildTracks_:function(){this.detach();if(this.cpu_){var c=tracing.filterSliceArray(this.categoryFilter_,this.cpu_.slices);if(c.length){var a=new tracing.tracks.SliceTrack;a.slices=c;a.heading=this.heading_;a.tooltip=this.tooltip_;this.addTrack_(a)}for(var b in this.cpu_.counters)c=this.cpu_.counters[b],a=new tracing.tracks.CounterTrack,a.heading="CPU "+this.cpu_.cpuNumber+" "+c.name+":",a.counter=c,this.addTrack_(a)}this.addControlButtonElements_(!1)}};
135 updateHeadingWidth_:function(){var c=[];this.model.getAllThreads().forEach(function(b){c.push(b.userFriendlyName)});this.model.getAllCounters().forEach(function(b){c.push(b.name)});this.model.getAllCpus().forEach(function(b){c.push("CPU "+b.cpuNumber)});var a=0,b=document.createElement("div");b.style.position="fixed";b.className="canvas-based-track-title";for(var f=0;f<c.length;f++){b.textContent=c[f]+":__";var e=this.measuringStick_.measure(b).width;300<e&&(e=300);e>a&&(a=e)}this.headingWidth=a+
136 "px"},updateChildTracks_:function(){this.detachAllChildren();if(this.model_){var c=this.model_.getAllCpus();c.sort(tracing.model.Cpu.compare);for(var a=0;a<c.length;++a){var b=c[a],f=new tracing.tracks.CpuTrack;f.heading="CPU "+b.cpuNumber+":";f.cpu=b;this.addTrack_(f)}c=this.model_.getAllProcesses();c.sort(tracing.model.Process.compare);for(a=0;a<c.length;++a)b=c[a],f=new tracing.tracks.ProcessTrack,f.process=b,this.addTrack_(f)}}};return{ModelTrack:d}});"use strict";base.requireStylesheet("tracks.ruler_track");
215 this.cpufreqSlice(d,a,f.cpu,f);return!0},cpufreqTargetEvent:function(a,f,e,d,j){f=c(j.details);this.cpufreqSlice(d,a,f.cpu,f);return!0},cpufreqBoostUnboostEvent:function(a,f,c,d,j){this.cpufreqBoostSlice(d,a,{type:j.details});return!0}};a.registerSubtype(d);return{CpufreqParser:d}});base.require("importer.linux_perf.parser");
225 a?this.exynosFlipOpenSlice(e,b):this.exynosFlipCloseSlice(e,{pipe:b});return!0},exynosBusfreqSample:function(a,b,c){a=this.importer.getOrCreateCpuState(0).cpu.getOrCreateCounter("",a);0==a.numSeries&&(a.seriesNames.push("frequency"),a.seriesColors.push(tracing.getStringColorId(a.name+".frequency")));a.timestamps.push(b);a.samples.push(c)},busfreqTargetIntEvent:function(a,b,c,e,d){a=/frequency=(\d+)/.exec(d.details);if(!a)return!1;this.exynosBusfreqSample("INT Frequency",e,parseInt(a[1]));return!0},
273 c,e){b=this.importer.getOrCreateCpuState(b);"1"!=c?this.importer.importError("Don't understand power_start events of type "+c):(c=b.cpu.getOrCreateCounter("","C-State"),0==c.numSeries&&(c.seriesNames.push("state"),c.seriesColors.push(tracing.getStringColorId(c.name+".state"))),c.timestamps.push(a),c.samples.push(e))},cpuIdleSlice:function(a,b,c){b=this.importer.getOrCreateCpuState(b).cpu.getOrCreateCounter("","C-State");0==b.numSeries&&(b.seriesNames.push("state"),b.seriesColors.push(tracing.getStringColorId(b.name)));
274 4294967295!=c?b.samples.push(c):b.samples.push(0);b.timestamps.push(a)},cpuFrequencySlice:function(a,b,c){b=this.importer.getOrCreateCpuState(b).cpu.getOrCreateCounter("","Clock Frequency");0==b.numSeries&&(b.seriesNames.push("state"),b.seriesColors.push(tracing.getStringColorId(b.name+".state")));b.timestamps.push(a);b.samples.push(c)},powerStartEvent:function(a,b,c,e,d){a=/type=(\d+) state=(\d) cpu_id=(\d)+/.exec(d.details);if(!a)return!1;b=parseInt(a[3]);c=parseInt(a[2]);this.cpuStateSlice(e,b,
291 base.exportTo("tracing.importer",function(){function d(a){this.cpu=a}function c(a,b){this.importPriority=2;this.model_=a;this.events_=b;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 b.test(a)?f:e.test(a)?g:j.test(a)?h:null}d.prototype={__proto__:Object.prototype,switchRunningLinuxPid:function(a,
292 b,c,e,d,f){if(void 0!==this.lastActivePid&&0!=this.lastActivePid){var g=c-this.lastActiveTs;a=(a=a.threadsByLinuxPid[this.lastActivePid])?a.userFriendlyName:this.lastActiveComm;b=new tracing.model.Slice("",a,tracing.getStringColorId(a),this.lastActiveTs,{comm:this.lastActiveComm,tid:this.lastActivePid,prio:this.lastActivePrio,stateWhenDescheduled:b},g);this.cpu.slices.push(b)}this.lastActiveTs=c;this.lastActivePid=e;this.lastActiveComm=d;this.lastActivePrio=f}};TestExports={};var b=RegExp("^\\s*(.+)-(\\d+)\\s+\\(\\s*(\\d+|-+)\\)\\s\\[(\\d+)\\]\\s+[dX.][N.][Hhs.][0-9a-f.]\\s+(\\d+\\.\\d+):\\s+(\\S+):\\s(.*)$"),
298 this.importCpuData();this.alignClocks(a)&&(this.buildMapFromLinuxPidsToThreads(),this.buildPerThreadCpuSlicesFromCpuState())},finalizeImport:function(){},buildPerThreadCpuSlicesFromCpuState:function(){for(var a in this.cpuStates_)for(var b=this.cpuStates_[a].cpu,c=0;c<b.slices.length;c++){var e=b.slices[c],d=this.threadsByLinuxPid[e.args.tid];d&&(d.tempCpuSlices||(d.tempCpuSlices=[]),d.tempCpuSlices.push(e))}for(c in this.wakeups_)if(a=this.wakeups_[c],d=this.threadsByLinuxPid[a.tid])d.tempWakeups=
303 l.args.stateWhenDescheduled;d.push(new tracing.model.Slice("","Running",f,m.start,{},m.duration))}a.cpuSlices=d}})},alignClocks:function(a){if(0==this.clockSyncRecords_.length){if(!a)return!0;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 b in this.cpuStates_){for(var c=this.cpuStates_[b].cpu,d=0;d<c.slices.length;d++){var e=c.slices[d];e.start+=a;e.duration=e.duration}for(var f in c.counters){d=c.counters[f];for(e=