| Index: tracing/tracing/extras/importer/linux_perf/sched_parser.html
|
| diff --git a/tracing/tracing/extras/importer/linux_perf/sched_parser.html b/tracing/tracing/extras/importer/linux_perf/sched_parser.html
|
| index 14ca1fcbc0bc8c49159f5fbb89d01f035bb397ef..6f7076a80b6a70a5e6b825d1f018d07b24469004 100644
|
| --- a/tracing/tracing/extras/importer/linux_perf/sched_parser.html
|
| +++ b/tracing/tracing/extras/importer/linux_perf/sched_parser.html
|
| @@ -59,8 +59,7 @@ tr.exportTo('tr.e.importer.linux_perf', function() {
|
| */
|
| schedSwitchEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
|
| var event = schedSwitchRE.exec(eventBase.details);
|
| - if (!event)
|
| - return false;
|
| + if (!event) return false;
|
|
|
| var prevState = event[4];
|
| var nextComm = event[5];
|
| @@ -78,10 +77,11 @@ tr.exportTo('tr.e.importer.linux_perf', function() {
|
|
|
| var nextThread = this.importer.threadsByLinuxPid[nextPid];
|
| var nextName;
|
| - if (nextThread)
|
| + if (nextThread) {
|
| nextName = nextThread.userFriendlyName;
|
| - else
|
| + } else {
|
| nextName = nextComm;
|
| + }
|
|
|
| var cpu = this.importer.getOrCreateCpu(cpuNumber);
|
| cpu.switchActiveThread(
|
| @@ -100,8 +100,7 @@ tr.exportTo('tr.e.importer.linux_perf', function() {
|
|
|
| schedWakeupEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
|
| var event = schedWakeupRE.exec(eventBase.details);
|
| - if (!event)
|
| - return false;
|
| + if (!event) return false;
|
|
|
| var fromPid = pid;
|
| var comm = event[1];
|
| @@ -113,8 +112,7 @@ tr.exportTo('tr.e.importer.linux_perf', function() {
|
|
|
| schedCpuHotplugEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
|
| var event = /cpu (\d+) (.+) error=(\d+)/.exec(eventBase.details);
|
| - if (!event)
|
| - return false;
|
| + if (!event) return false;
|
|
|
| var cpuNumber = event[1];
|
| var state = event[2];
|
| @@ -127,16 +125,16 @@ tr.exportTo('tr.e.importer.linux_perf', function() {
|
| powerCounter.name + '.' + 'State')));
|
| }
|
| powerCounter.series.forEach(function(series) {
|
| - if (series.name === 'State')
|
| + if (series.name === 'State') {
|
| series.addCounterSample(ts, state.localeCompare('offline') ? 0 : 1);
|
| + }
|
| });
|
| return true;
|
| },
|
|
|
| schedBlockedEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
|
| var event = schedBlockedRE.exec(eventBase.details);
|
| - if (!event)
|
| - return false;
|
| + if (!event) return false;
|
|
|
| var pid = parseInt(event[1]);
|
| var iowait = parseInt(event[2]);
|
|
|