Parses i915 driver events and sets up state in the importer.
322844
function(eventName, cpuNumber, pid, ts, eventBase) {
      var event = /obj=(\w+), size=(\d+)/.exec(eventBase.details);
      if (!event)
        return false;

      var obj = event[1];
      var size = parseInt(event[2]);
      this.i915GemObjectSlice(ts, eventName, obj,
          {
            obj: obj,
            size: size
          });
      return true;
    }
168301
@Override
    public final void init(Driver d, Properties properties) {
        this.driver = d;
        this.driver.getEventManager().register(EventManager.EVENT_FRAGMENT_PRE, this);
        this.driver.getEventManager().register(EventManager.EVENT_FRAGMENT_POST, this);
        loginUrl = CAS_LOGIN_URL.getValue(properties);
    }
497794
@Override
  protected void parseRootElement() {

    List<ProcessEngineXml> processEngines = new ArrayList<ProcessEngineXml>();
    List<ProcessArchiveXml> processArchives = new ArrayList<ProcessArchiveXml>();

    for (Element element : rootElement.elements()) {

      if(PROCESS_ENGINE.equals(element.getTagName())) {
        parseProcessEngine(element, processEngines);

      } else if(PROCESS_ARCHIVE.equals(element.getTagName())) {
        parseProcessArchive(element, processArchives);

      }

    }

    processesXml = new ProcessesXmlImpl(processEngines, processArchives);

  }
794349
def init_drivers(enable_debug_driver=False):
    """"""
    for driver in DRIVERS:
        try:
            if driver != DebugDriver or enable_debug_driver:
                CLASSES.append(driver)
        except Exception:  # pylint: disable=W0703
            continue
1032497
function(eventName, cpuNumber, pid, ts, eventBase) {
      var data = splitData(eventBase.details);
      this.cpufreqSlice(ts, eventName, data.cpu, data);
      return true;
    }
756858
function IrqParser(importer) {
    Parser.call(this, importer);

    importer.registerEventHandler('irq_handler_entry',
        IrqParser.prototype.irqHandlerEntryEvent.bind(this));
    importer.registerEventHandler('irq_handler_exit',
        IrqParser.prototype.irqHandlerExitEvent.bind(this));
    importer.registerEventHandler('softirq_raise',
        IrqParser.prototype.softirqRaiseEvent.bind(this));
    importer.registerEventHandler('softirq_entry',
        IrqParser.prototype.softirqEntryEvent.bind(this));
    importer.registerEventHandler('softirq_exit',
        IrqParser.prototype.softirqExitEvent.bind(this));
    importer.registerEventHandler('ipi_entry',
        IrqParser.prototype.ipiEntryEvent.bind(this));
    importer.registerEventHandler('ipi_exit',
        IrqParser.prototype.ipiExitEvent.bind(this));
  }
964139
function KernelFuncParser(importer) {
    LinuxPerfParser.call(this, importer);

    importer.registerEventHandler('graph_ent',
        KernelFuncParser.prototype.traceKernelFuncEnterEvent.
            bind(this));
    importer.registerEventHandler('graph_ret',
        KernelFuncParser.prototype.traceKernelFuncReturnEvent.
            bind(this));

    this.model_ = importer.model_;
    this.ppids_ = {};
  }
1325758
function Importer(opts) {
  var self = this;
  opts = opts || {};
  EventEmitter.call(this);
  this.cwd = opts.cwd ? path.resolve(opts.cwd) : process.cwd();
  this.file = opts.file ? path.resolve(opts.cwd, opts.file) : this.cwd;
  this.data = opts.data;
  this.includePaths = opts.includePaths || [];

  // Map all include paths to configured working directory:
  this.includePaths = this.includePaths.map(function(includePath) {
    return path.resolve(self.cwd, includePath);
  });
}
833826
private DynamicImportTree parseDynamicImportExpression() {
    SourcePosition start = getTreeStartLocation();
    eat(TokenType.IMPORT);
    eat(TokenType.OPEN_PAREN);
    ParseTree argument = parseAssignmentExpression();
    eat(TokenType.CLOSE_PAREN);
    recordFeatureUsed(Feature.DYNAMIC_IMPORT);
    return new DynamicImportTree(getTreeLocation(start), argument);
  }
1072730
function SyncParser(importer) {
    Parser.call(this, importer);

    importer.registerEventHandler(
        'sync_timeline',
        SyncParser.prototype.timelineEvent.bind(this));
    importer.registerEventHandler(
        'sync_wait',
        SyncParser.prototype.syncWaitEvent.bind(this));
    importer.registerEventHandler(
        'sync_pt',
        SyncParser.prototype.syncPtEvent.bind(this));
    this.model_ = importer.model_;
  }
1101478
function() {
      var csr = new tr.ClockSyncRecord('ftrace_importer', 0, {});
      this.model_.clockSyncRecords.push(csr);
      if (this.stackFrameEvents_) {
        this.importStackFrames_(
            this.stackFrameEvents_, 'g', false /* addRootFrame */);
      }

      if (this.traceAnnotations_)
        this.importAnnotations_();

      var events = this.events_;
      for (var eI = 0; eI < events.length; eI++) {
        var event = events[eI];
        if (event.args === '__stripped__') {
          event.argsStripped = true;
          event.args = undefined;
        }

        if (event.ph === 'B' || event.ph === 'E') {
          this.processDurationEvent(event);

        } else if (event.ph === 'X') {
          var slice = this.processCompleteEvent(event);
          // TODO(yuhaoz): If Chrome supports creating other events with flow,
          // we will need to call processFlowEvent for them also.
          // https://github.com/catapult-project/catapult/issues/1259
          if (slice !== undefined && event.bind_id !== undefined)
            this.processFlowEvent(event, slice);

        } else if (event.ph === 'b' || event.ph === 'e' || event.ph === 'n' ||
                   event.ph === 'S' || event.ph === 'F' || event.ph === 'T' ||
                   event.ph === 'p') {
          this.processAsyncEvent(event);

        // Note, I is historic. The instant event marker got changed, but we
        // want to support loading old trace files so we have both I and i.
        } else if (event.ph === 'I' || event.ph === 'i' || event.ph === 'R') {
          this.processInstantEvent(event);

        } else if (event.ph === 'P') {
          this.processTraceSampleEvent(event);

        } else if (event.ph === 'C') {
          this.processCounterEvent(event);

        } else if (event.ph === 'M') {
          this.processMetadataEvent(event);

        } else if (event.ph === 'N' || event.ph === 'D' || event.ph === 'O') {
          this.processObjectEvent(event);

        } else if (event.ph === 's' || event.ph === 't' || event.ph === 'f') {
          this.processFlowEvent(event);

        } else if (event.ph === 'v') {
          this.processMemoryDumpEvent(event);

        } else {
          this.model_.importWarning({
            type: 'parse_error',
            message: 'Unrecognized event phase: ' +
                event.ph + ' (' + event.name + ')'
          });
        }
      }

      // Remove all the root stack frame children as they should
      // already be added.
      tr.b.iterItems(this.v8ProcessRootStackFrame_, function(name, frame) {
        frame.removeAllChildren();
      });
    }
1205791
protected void parseRootElement() {

    JobExecutorXmlImpl jobExecutor = new JobExecutorXmlImpl();
    List<ProcessEngineXml> processEngines = new ArrayList<ProcessEngineXml>();

    for (Element element : rootElement.elements()) {

      if(JOB_EXECUTOR.equals(element.getTagName())) {
        parseJobExecutor(element, jobExecutor);

      } else if(PROCESS_ENGINE.equals(element.getTagName())) {
        parseProcessEngine(element, processEngines);

      }

    }

    bpmPlatformXml = new BpmPlatformXmlImpl(jobExecutor, processEngines);
  }
1234900
function(eventName, cpuNumber, pid, ts, eventBase) {
      var event = workqueueExecuteStartRE.exec(eventBase.details);
      if (!event)
        return false;

      var kthread = this.importer.getOrCreateKernelThread(eventBase.threadName,
          pid, pid);
      kthread.openSliceTS = ts;
      kthread.openSlice = event[2];
      return true;
    }
41192
function() {
      // Instantiate the parsers; this will register handlers for known events
      var allTypeInfos = tr.e.importer.linux_perf.
          Parser.getAllRegisteredTypeInfos();
      var parsers = allTypeInfos.map(
          function(typeInfo) {
            return new typeInfo.constructor(this);
          }, this);

      return parsers;
    }
296712
def read_cz_lsm_event_list(fd, byte_order):
    """"""
    count = struct.unpack(byte_order+'II', fd.read(8))[1]
    events = []
    while count > 0:
        esize, etime, etype = struct.unpack(byte_order+'IdI', fd.read(16))
        etext = stripnull(fd.read(esize - 16))
        events.append((etime, etype, etext))
        count -= 1
    return events
1188402
protected void parseRootElement() {
    collectElementIds();
    parseDefinitionsAttributes();
    parseImports();
    parseMessages();
    parseSignals();
    parseErrors();
    parseEscalations();
    parseProcessDefinitions();
    parseCollaboration();

    // Diagram interchange parsing must be after parseProcessDefinitions,
    // since it depends and sets values on existing process definition objects
    parseDiagramInterchangeElements();

    for (BpmnParseListener parseListener : parseListeners) {
      parseListener.parseRootElement(rootElement, getProcessDefinitions());
    }
  }
184292
private static void setImportInfo(Catalog catalog, ImportType importType) {
        if (importType == null) {
            return;
        }
        List<String> streamList = new ArrayList<>();
        List<ImportConfigurationType> kafkaConfigs = new ArrayList<>();

        for (ImportConfigurationType importConfiguration : importType.getConfiguration()) {

            boolean connectorEnabled = importConfiguration.isEnabled();
            if (!connectorEnabled) {
                continue;
            }

            if (importConfiguration.getType().equals(ServerImportEnum.KAFKA)) {
                kafkaConfigs.add(importConfiguration);
            }

            if (!streamList.contains(importConfiguration.getModule())) {
                streamList.add(importConfiguration.getModule());
            }

            buildImportProcessorConfiguration(importConfiguration, true);
        }
        validateKafkaConfig(kafkaConfigs);
    }