lib/third_party/tracing/extras/importer/linux_perf/ftrace_importer.js
function(eventName, cpuNumber, pid, ts, eventBase,
                                     threadName) {

      // Some profiles end up with a \n\ on the end of each line. Strip it
      // before we do the comparisons.
      eventBase.details = eventBase.details.replace(/\\n.*$/, '');

      var event = /^\s*(\w+):\s*(.*)$/.exec(eventBase.details);
      if (!event) {
        // Check if the event matches events traced by the Android framework
        var tag = eventBase.details.substring(0, 2);
        if (tag == 'B|' || tag == 'E' || tag == 'E|' || tag == 'X|' ||
            tag == 'C|' || tag == 'S|' || tag == 'F|') {
          eventBase.subEventName = 'android';
        } else {
          return false;
        }
      } else {
        eventBase.subEventName = event[1];
        eventBase.details = event[2];
      }

      var writeEventName = eventName + ':' + eventBase.subEventName;
      var handler = this.eventHandlers_[writeEventName];
      if (!handler) {
        this.model_.importWarning({
          type: 'parse_error',
          message: 'Unknown trace_marking_write event ' + writeEventName
        });
        return true;
      }
      return handler(writeEventName, cpuNumber, pid, ts, eventBase, threadName);
    }
function(eventName, cpuNumber, pid, ts, eventBase,
                                     threadName) {

      // Some profiles end up with a \n\ on the end of each line. Strip it
      // before we do the comparisons.
      eventBase.details = eventBase.details.replace(/\\n.*$/, '');

      var event = /^\s*(\w+):\s*(.*)$/.exec(eventBase.details);
      if (!event) {
        // Check if the event matches events traced by the Android framework
        var tag = eventBase.details.substring(0, 2);
        if (tag == 'B|' || tag == 'E' || tag == 'E|' || tag == 'X|' ||
            tag == 'C|' || tag == 'S|' || tag == 'F|') {
          eventBase.subEventName = 'android';
        } else {
          return false;
        }
      } else {
        eventBase.subEventName = event[1];
        eventBase.details = event[2];
      }

      var writeEventName = eventName + ':' + eventBase.subEventName;
      var handler = this.eventHandlers_[writeEventName];
      if (!handler) {
        this.model_.importWarning({
          type: 'parse_error',
          message: 'Unknown trace_marking_write event ' + writeEventName
        });
        return true;
      }
      return handler(writeEventName, cpuNumber, pid, ts, eventBase, threadName);
    }
function ( eventName , cpuNumber , pid , ts , eventBase , threadName ) { // Some profiles end up with a \n\ on the end of each line. Strip it // before we do the comparisons. eventBase . details = eventBase . details . replace ( / \\n.*$ / , '' ) ; var event = / ^\s*(\w+):\s*(.*)$ / . exec ( eventBase . details ) ; if ( ! event ) { // Check if the event matches events traced by the Android framework var tag = eventBase . details . substring ( 0 , 2 ) ; if ( tag == 'B|' || tag == 'E' || tag == 'E|' || tag == 'X|' || tag == 'C|' || tag == 'S|' || tag == 'F|' ) { eventBase . subEventName = 'android' ; } else { return false ; } } else { eventBase . subEventName = event [ 1 ] ; eventBase . details = event [ 2 ] ; } var writeEventName = eventName + ':' + eventBase . subEventName ; var handler = this . eventHandlers_ [ writeEventName ] ; if ( ! handler ) { this . model_ . importWarning ( { type : 'parse_error' , message : 'Unknown trace_marking_write event ' + writeEventName } ) ; return true ; } return handler ( writeEventName , cpuNumber , pid , ts , eventBase , threadName ) ; }
Processes a trace_marking_write event.
Processes a trace_marking_write event .