tools/binary_size/libsupersize/obj_analyzer.py
def _RunNm(self, paths_by_type):
    """Calls nm to get symbols and (for non-BC files) string addresses."""
    # Downstream functions rely upon .a not being grouped.
    batches = self._MakeBatches(paths_by_type.arch, None)
    # Combine object files and Bitcode files for nm.
    BATCH_SIZE = 50  # Arbitrarily chosen.
    batches.extend(
        self._MakeBatches(paths_by_type.obj + paths_by_type.bc, BATCH_SIZE))
    results = self._DoBulkFork(nm.RunNmOnIntermediates, batches)

    # Names are still mangled.
    all_paths_by_name = self._paths_by_name
    total_no_symbols = 0
    for encoded_syms, encoded_strs, num_no_symbols in results:
      total_no_symbols += num_no_symbols
      symbol_names_by_path = parallel.DecodeDictOfLists(encoded_syms)
      for path, names in symbol_names_by_path.items():
        for name in names:
          all_paths_by_name[name].append(path)

      if encoded_strs != parallel.EMPTY_ENCODED_DICT:
        self._encoded_string_addresses_by_path_chunks.append(encoded_strs)
    if total_no_symbols:
      logging.warn('nm found no symbols in %d objects.', total_no_symbols)
Calls nm to get symbols and (for non-BC files) string addresses.
Calls nm to get symbols and (for non-BC files) string addresses.
Calls nm to get symbols and ( for non - BC files ) string addresses .
def _RunNm(self, paths_by_type):
    batches = self._MakeBatches(paths_by_type.arch, None)
    BATCH_SIZE = 50  
    batches.extend(
        self._MakeBatches(paths_by_type.obj + paths_by_type.bc, BATCH_SIZE))
    results = self._DoBulkFork(nm.RunNmOnIntermediates, batches)
    all_paths_by_name = self._paths_by_name
    total_no_symbols = 0
    for encoded_syms, encoded_strs, num_no_symbols in results:
      total_no_symbols += num_no_symbols
      symbol_names_by_path = parallel.DecodeDictOfLists(encoded_syms)
      for path, names in symbol_names_by_path.items():
        for name in names:
          all_paths_by_name[name].append(path)
      if encoded_strs != parallel.EMPTY_ENCODED_DICT:
        self._encoded_string_addresses_by_path_chunks.append(encoded_strs)
    if total_no_symbols:
      logging.warn('nm found no symbols in %d objects.', total_no_symbols)
def _RunNm ( self , paths_by_type ) : batches = self . _MakeBatches ( paths_by_type . arch , None ) BATCH_SIZE = 50 batches . extend ( self . _MakeBatches ( paths_by_type . obj + paths_by_type . bc , BATCH_SIZE ) ) results = self . _DoBulkFork ( nm . RunNmOnIntermediates , batches ) all_paths_by_name = self . _paths_by_name total_no_symbols = 0 for encoded_syms , encoded_strs , num_no_symbols in results : total_no_symbols += num_no_symbols symbol_names_by_path = parallel . DecodeDictOfLists ( encoded_syms ) for path , names in symbol_names_by_path . items ( ) : for name in names : all_paths_by_name [ name ] . append ( path ) if encoded_strs != parallel . EMPTY_ENCODED_DICT : self . _encoded_string_addresses_by_path_chunks . append ( encoded_strs ) if total_no_symbols : logging . warn ( 'nm found no symbols in %d objects.' , total_no_symbols )
Calls nm to get symbols and (for non-BC files) string addresses.
Calls nm to get symbols and ( for non - BC files ) string addresses .
"""Calls nm to get symbols and (for non-BC files) string addresses.""" # Downstream functions rely upon .a not being grouped. # Combine object files and Bitcode files for nm. # Arbitrarily chosen. # Names are still mangled.
self
paths_by_type