lib/third_party/tracing/extras/importer/linux_perf/ftrace_importer.js
function(timeShift) {
      this.forEachLine(function(text, eventBase, cpuNumber, pid, ts) {
        var eventName = eventBase.eventName;
        var handler = this.eventHandlers_[eventName];
        if (!handler) {
          this.model_.importWarning({
            type: 'parse_error',
            message: 'Unknown event ' + eventName + ' (' + text + ')'
          });
          return;
        }
        ts += timeShift;
        if (!handler(eventName, cpuNumber, pid, ts, eventBase)) {
          this.model_.importWarning({
            type: 'parse_error',
            message: 'Malformed ' + eventName + ' event (' + text + ')'
          });
        }
      }.bind(this));
    }
function(timeShift) {
      this.forEachLine(function(text, eventBase, cpuNumber, pid, ts) {
        var eventName = eventBase.eventName;
        var handler = this.eventHandlers_[eventName];
        if (!handler) {
          this.model_.importWarning({
            type: 'parse_error',
            message: 'Unknown event ' + eventName + ' (' + text + ')'
          });
          return;
        }
        ts += timeShift;
        if (!handler(eventName, cpuNumber, pid, ts, eventBase)) {
          this.model_.importWarning({
            type: 'parse_error',
            message: 'Malformed ' + eventName + ' event (' + text + ')'
          });
        }
      }.bind(this));
    }
function ( timeShift ) { this . forEachLine ( function ( text , eventBase , cpuNumber , pid , ts ) { var eventName = eventBase . eventName ; var handler = this . eventHandlers_ [ eventName ] ; if ( ! handler ) { this . model_ . importWarning ( { type : 'parse_error' , message : 'Unknown event ' + eventName + ' (' + text + ')' } ) ; return ; } ts += timeShift ; if ( ! handler ( eventName , cpuNumber , pid , ts , eventBase ) ) { this . model_ . importWarning ( { type : 'parse_error' , message : 'Malformed ' + eventName + ' event (' + text + ')' } ) ; } } . bind ( this ) ) ; }
Walks the this.events_ structure and creates Cpu objects.
Walks the this . events_ structure and creates Cpu objects .