tools/cygprofile/orderfile_generator_backend.py
def _GenerateAndProcessProfile(self):
    """Invokes a script to merge the per-thread traces into one file.

    The produced list of offsets is saved in
    self._GetUnpatchedOrderfileFilename().
    """
    self._step_recorder.BeginStep('Generate Profile Data')
    files = []
    logging.getLogger().setLevel(logging.DEBUG)

    if self._options.profile_save_dir:
      # The directory must not preexist, to ensure purity of data. Check
      # before profiling to save time.
      if os.path.exists(self._options.profile_save_dir):
        raise Exception('Profile save directory must not pre-exist')
      os.makedirs(self._options.profile_save_dir)

    if self._options.system_health_orderfile:
      files = self._profiler.CollectSystemHealthProfile(
          self._compiler.chrome_apk)
      self._MaybeSaveProfile(files)
      try:
        self._ProcessPhasedOrderfile(files)
      except Exception:
        for f in files:
          self._SaveForDebugging(f)
        self._SaveForDebugging(self._compiler.lib_chrome_so)
        raise
      finally:
        self._profiler.Cleanup()
    else:
      self._CollectLegacyProfile()
    logging.getLogger().setLevel(logging.INFO)
Invokes a script to merge the per-thread traces into one file.

    The produced list of offsets is saved in
    self._GetUnpatchedOrderfileFilename().
    
Invokes a script to merge the per-thread traces into one file.
The produced list of offsets is saved in
self._GetUnpatchedOrderfileFilename().
Invokes a script to merge the per - thread traces into one file . The produced list of offsets is saved in self . _GetUnpatchedOrderfileFilename () .
def _GenerateAndProcessProfile(self):
    self._step_recorder.BeginStep('Generate Profile Data')
    files = []
    logging.getLogger().setLevel(logging.DEBUG)
    if self._options.profile_save_dir:
      if os.path.exists(self._options.profile_save_dir):
        raise Exception('Profile save directory must not pre-exist')
      os.makedirs(self._options.profile_save_dir)
    if self._options.system_health_orderfile:
      files = self._profiler.CollectSystemHealthProfile(
          self._compiler.chrome_apk)
      self._MaybeSaveProfile(files)
      try:
        self._ProcessPhasedOrderfile(files)
      except Exception:
        for f in files:
          self._SaveForDebugging(f)
        self._SaveForDebugging(self._compiler.lib_chrome_so)
        raise
      finally:
        self._profiler.Cleanup()
    else:
      self._CollectLegacyProfile()
    logging.getLogger().setLevel(logging.INFO)
def _GenerateAndProcessProfile ( self ) : self . _step_recorder . BeginStep ( 'Generate Profile Data' ) files = [ ] logging . getLogger ( ) . setLevel ( logging . DEBUG ) if self . _options . profile_save_dir : if os . path . exists ( self . _options . profile_save_dir ) : raise Exception ( 'Profile save directory must not pre-exist' ) os . makedirs ( self . _options . profile_save_dir ) if self . _options . system_health_orderfile : files = self . _profiler . CollectSystemHealthProfile ( self . _compiler . chrome_apk ) self . _MaybeSaveProfile ( files ) try : self . _ProcessPhasedOrderfile ( files ) except Exception : for f in files : self . _SaveForDebugging ( f ) self . _SaveForDebugging ( self . _compiler . lib_chrome_so ) raise finally : self . _profiler . Cleanup ( ) else : self . _CollectLegacyProfile ( ) logging . getLogger ( ) . setLevel ( logging . INFO )
Invokes a script to merge the per-thread traces into one file.
Invokes a script to merge the per - thread traces into one file .
"""Invokes a script to merge the per-thread traces into one file.

    The produced list of offsets is saved in
    self._GetUnpatchedOrderfileFilename().
    """ # The directory must not preexist, to ensure purity of data. Check # before profiling to save time.
self