tools/cygprofile/process_profiles.py
def GetDumpOffsetToSymboInfolIncludingWhitelist(self):
    """Computes an array mapping each word in .text to a symbol.

    This list includes symbols with size 0. It considers all offsets till the
    next symbol to map to the symbol of size 0.

    Returns:
      [symbol_extractor.SymbolInfo or None] For every 4 bytes of the .text
        section, maps it to a symbol, or None.
    """
    if self._whitelist is None:
      self._whitelist = set()
      symbols = self.SymbolInfos()
      start_syms = [s for s in symbols
                    if s.name == symbol_extractor.START_OF_TEXT_SYMBOL]
      assert len(start_syms) == 1, 'Can\'t find unique start of text symbol'
      start_of_text = start_syms[0].offset
      self.GetDumpOffsetToSymbolInfo()
      max_idx = len(self._offset_to_symbol_info)
      for sym in symbols:
        if sym.size != 0 or sym.offset == start_of_text:
          continue
        self._whitelist.add(sym.name)
        idx = (sym.offset - start_of_text) // 2
        assert self._offset_to_symbol_info[idx] == sym, (
            'Unexpected unset offset')
        idx += 1
        while idx < max_idx and self._offset_to_symbol_info[idx] is None:
          self._offset_to_symbol_info[idx] = sym
          idx += 1
    return self._offset_to_symbol_info
Computes an array mapping each word in .text to a symbol.

    This list includes symbols with size 0. It considers all offsets till the
    next symbol to map to the symbol of size 0.

    Returns:
      [symbol_extractor.SymbolInfo or None] For every 4 bytes of the .text
        section, maps it to a symbol, or None.
    
Computes an array mapping each word in .text to a symbol.
This list includes symbols with size 0. It considers all offsets till the
next symbol to map to the symbol of size 0.
Computes an array mapping each word in . text to a symbol . This list includes symbols with size 0 . It considers all offsets till the next symbol to map to the symbol of size 0 .
def GetDumpOffsetToSymboInfolIncludingWhitelist(self):
    if self._whitelist is None:
      self._whitelist = set()
      symbols = self.SymbolInfos()
      start_syms = [s for s in symbols
                    if s.name == symbol_extractor.START_OF_TEXT_SYMBOL]
      assert len(start_syms) == 1, 'Can\'t find unique start of text symbol'
      start_of_text = start_syms[0].offset
      self.GetDumpOffsetToSymbolInfo()
      max_idx = len(self._offset_to_symbol_info)
      for sym in symbols:
        if sym.size != 0 or sym.offset == start_of_text:
          continue
        self._whitelist.add(sym.name)
        idx = (sym.offset - start_of_text) // 2
        assert self._offset_to_symbol_info[idx] == sym, (
            'Unexpected unset offset')
        idx += 1
        while idx < max_idx and self._offset_to_symbol_info[idx] is None:
          self._offset_to_symbol_info[idx] = sym
          idx += 1
    return self._offset_to_symbol_info
def GetDumpOffsetToSymboInfolIncludingWhitelist ( self ) : if self . _whitelist is None : self . _whitelist = set ( ) symbols = self . SymbolInfos ( ) start_syms = [ s for s in symbols if s . name == symbol_extractor . START_OF_TEXT_SYMBOL ] assert len ( start_syms ) == 1 , 'Can\'t find unique start of text symbol' start_of_text = start_syms [ 0 ] . offset self . GetDumpOffsetToSymbolInfo ( ) max_idx = len ( self . _offset_to_symbol_info ) for sym in symbols : if sym . size != 0 or sym . offset == start_of_text : continue self . _whitelist . add ( sym . name ) idx = ( sym . offset - start_of_text ) // 2 assert self . _offset_to_symbol_info [ idx ] == sym , ( 'Unexpected unset offset' ) idx += 1 while idx < max_idx and self . _offset_to_symbol_info [ idx ] is None : self . _offset_to_symbol_info [ idx ] = sym idx += 1 return self . _offset_to_symbol_info
Computes an array mapping each word in .text to a symbol.
Computes an array mapping each word in . text to a symbol .
"""Computes an array mapping each word in .text to a symbol.

    This list includes symbols with size 0. It considers all offsets till the
    next symbol to map to the symbol of size 0.

    Returns:
      [symbol_extractor.SymbolInfo or None] For every 4 bytes of the .text
        section, maps it to a symbol, or None.
    """
[symbol_extractor.SymbolInfo or None] For every 4 bytes of the .text
section, maps it to a symbol, or None.
[ symbol_extractor . SymbolInfo or None ] For every 4 bytes of the . text section maps it to a symbol or None .
self