tools/cygprofile/orderfile_generator_backend.py
def Build(self, instrumented, use_call_graph, target):
    """Builds the provided ninja target with or without order_profiling on.

    Args:
      instrumented: (bool) Whether we want to build an instrumented binary.
      use_call_graph: (bool) Whether to use the call graph instrumentation.
      target: (str) The name of the ninja target to build.
    """
    self._step_recorder.BeginStep('Compile %s' % target)
    assert not use_call_graph or instrumented, ('You can not enable call graph '
                                                'without instrumentation!')

    # Set the "Release Official" flavor, the parts affecting performance.
    args = [
        'enable_resource_allowlist_generation=false',
        'is_chrome_branded=' + str(not self._public).lower(),
        'is_debug=false',
        'is_official_build=true',
        'symbol_level=1',  # to fit 30 GiB RAM on the bot when LLD is running
        'target_os="android"',
        'use_goma=' + str(self._use_goma).lower(),
        'use_order_profiling=' + str(instrumented).lower(),
        'use_call_graph=' + str(use_call_graph).lower(),
    ]
    args += _ARCH_GN_ARGS[self._arch]
    if self._goma_dir:
      args += ['goma_dir="%s"' % self._goma_dir]
    if self._system_health_profiling:
      args += ['devtools_instrumentation_dumping = ' +
               str(instrumented).lower()]

    if self._public and os.path.exists(self._orderfile_location):
      # GN needs the orderfile path to be source-absolute.
      src_abs_orderfile = os.path.relpath(self._orderfile_location,
                                          constants.DIR_SOURCE_ROOT)
      args += ['chrome_orderfile="//{}"'.format(src_abs_orderfile)]

    self._step_recorder.RunCommand(
        ['gn', 'gen', os.path.join(self._out_dir, 'Release'),
         '--args=' + ' '.join(args)])

    self._step_recorder.RunCommand(
        ['autoninja', '-C',
         os.path.join(self._out_dir, 'Release'), target])
Builds the provided ninja target with or without order_profiling on.

    Args:
      instrumented: (bool) Whether we want to build an instrumented binary.
      use_call_graph: (bool) Whether to use the call graph instrumentation.
      target: (str) The name of the ninja target to build.
    
Builds the provided ninja target with or without order_profiling on.
Builds the provided ninja target with or without order_profiling on .
def Build(self, instrumented, use_call_graph, target):
    self._step_recorder.BeginStep('Compile %s' % target)
    assert not use_call_graph or instrumented, ('You can not enable call graph '
                                                'without instrumentation!')
    args = [
        'enable_resource_allowlist_generation=false',
        'is_chrome_branded=' + str(not self._public).lower(),
        'is_debug=false',
        'is_official_build=true',
        'symbol_level=1',  
        'target_os="android"',
        'use_goma=' + str(self._use_goma).lower(),
        'use_order_profiling=' + str(instrumented).lower(),
        'use_call_graph=' + str(use_call_graph).lower(),
    ]
    args += _ARCH_GN_ARGS[self._arch]
    if self._goma_dir:
      args += ['goma_dir="%s"' % self._goma_dir]
    if self._system_health_profiling:
      args += ['devtools_instrumentation_dumping = ' +
               str(instrumented).lower()]
    if self._public and os.path.exists(self._orderfile_location):
      src_abs_orderfile = os.path.relpath(self._orderfile_location,
                                          constants.DIR_SOURCE_ROOT)
      args += ['chrome_orderfile="//{}"'.format(src_abs_orderfile)]
    self._step_recorder.RunCommand(
        ['gn', 'gen', os.path.join(self._out_dir, 'Release'),
         '--args=' + ' '.join(args)])
    self._step_recorder.RunCommand(
        ['autoninja', '-C',
         os.path.join(self._out_dir, 'Release'), target])
def Build ( self , instrumented , use_call_graph , target ) : self . _step_recorder . BeginStep ( 'Compile %s' % target ) assert not use_call_graph or instrumented , ( 'You can not enable call graph ' 'without instrumentation!' ) args = [ 'enable_resource_allowlist_generation=false' , 'is_chrome_branded=' + str ( not self . _public ) . lower ( ) , 'is_debug=false' , 'is_official_build=true' , 'symbol_level=1' , 'target_os="android"' , 'use_goma=' + str ( self . _use_goma ) . lower ( ) , 'use_order_profiling=' + str ( instrumented ) . lower ( ) , 'use_call_graph=' + str ( use_call_graph ) . lower ( ) , ] args += _ARCH_GN_ARGS [ self . _arch ] if self . _goma_dir : args += [ 'goma_dir="%s"' % self . _goma_dir ] if self . _system_health_profiling : args += [ 'devtools_instrumentation_dumping = ' + str ( instrumented ) . lower ( ) ] if self . _public and os . path . exists ( self . _orderfile_location ) : src_abs_orderfile = os . path . relpath ( self . _orderfile_location , constants . DIR_SOURCE_ROOT ) args += [ 'chrome_orderfile="//{}"' . format ( src_abs_orderfile ) ] self . _step_recorder . RunCommand ( [ 'gn' , 'gen' , os . path . join ( self . _out_dir , 'Release' ) , '--args=' + ' ' . join ( args ) ] ) self . _step_recorder . RunCommand ( [ 'autoninja' , '-C' , os . path . join ( self . _out_dir , 'Release' ) , target ] )
Builds the provided ninja target with or without order_profiling on.
Builds the provided ninja target with or without order_profiling on .
"""Builds the provided ninja target with or without order_profiling on.

    Args:
      instrumented: (bool) Whether we want to build an instrumented binary.
      use_call_graph: (bool) Whether to use the call graph instrumentation.
      target: (str) The name of the ninja target to build.
    """ # Set the "Release Official" flavor, the parts affecting performance. # to fit 30 GiB RAM on the bot when LLD is running # GN needs the orderfile path to be source-absolute.
self
instrumented
(bool) Whether we want to build an instrumented binary.
( bool ) Whether we want to build an instrumented binary .
use_call_graph
(bool) Whether to use the call graph instrumentation.
( bool ) Whether to use the call graph instrumentation .
target
(str) The name of the ninja target to build.
( str ) The name of the ninja target to build .