lib/third_party/tracing/extras/importer/linux_perf/ftrace_importer.js
function(eventName, cpuNumber, pid, ts, eventBase) {
      // Check for new-style clock sync records.
      var event = /name=(\w+?)\s(.+)/.exec(eventBase.details);
      if (event) {
        var name = event[1];
        var pieces = event[2].split(' ');
        var args = {
          perfTS: ts
        };
        for (var i = 0; i < pieces.length; i++) {
          var parts = pieces[i].split('=');
          if (parts.length != 2)
            throw new Error('omgbbq');
          args[parts[0]] = parts[1];
        }
        this.addClockSyncRecord(new ClockSyncRecord(name, ts, args));
        return true;
      }

      // Old-style clock sync records from chromium
      event = /parent_ts=(\d+\.?\d*)/.exec(eventBase.details);
      if (!event)
        return false;

      this.addClockSyncRecord(new ClockSyncRecord('monotonic', ts, {
        perfTS: ts,
        parentTS: event[1] * 1000
      }));
      return true;
    }
function(eventName, cpuNumber, pid, ts, eventBase) {
      // Check for new-style clock sync records.
      var event = /name=(\w+?)\s(.+)/.exec(eventBase.details);
      if (event) {
        var name = event[1];
        var pieces = event[2].split(' ');
        var args = {
          perfTS: ts
        };
        for (var i = 0; i < pieces.length; i++) {
          var parts = pieces[i].split('=');
          if (parts.length != 2)
            throw new Error('omgbbq');
          args[parts[0]] = parts[1];
        }
        this.addClockSyncRecord(new ClockSyncRecord(name, ts, args));
        return true;
      }

      // Old-style clock sync records from chromium
      event = /parent_ts=(\d+\.?\d*)/.exec(eventBase.details);
      if (!event)
        return false;

      this.addClockSyncRecord(new ClockSyncRecord('monotonic', ts, {
        perfTS: ts,
        parentTS: event[1] * 1000
      }));
      return true;
    }
function ( eventName , cpuNumber , pid , ts , eventBase ) { // Check for new-style clock sync records. var event = / name=(\w+?)\s(.+) / . exec ( eventBase . details ) ; if ( event ) { var name = event [ 1 ] ; var pieces = event [ 2 ] . split ( ' ' ) ; var args = { perfTS : ts } ; for ( var i = 0 ; i < pieces . length ; i ++ ) { var parts = pieces [ i ] . split ( '=' ) ; if ( parts . length != 2 ) throw new Error ( 'omgbbq' ) ; args [ parts [ 0 ] ] = parts [ 1 ] ; } this . addClockSyncRecord ( new ClockSyncRecord ( name , ts , args ) ) ; return true ; } // Old-style clock sync records from chromium event = / parent_ts=(\d+\.?\d*) / . exec ( eventBase . details ) ; if ( ! event ) return false ; this . addClockSyncRecord ( new ClockSyncRecord ( 'monotonic' , ts , { perfTS : ts , parentTS : event [ 1 ] * 1000 } ) ) ; return true ; }
Processes a trace_event_clock_sync event.
Processes a trace_event_clock_sync event .