tools/cygprofile/symbol_extractor.py
def SymbolNamesFromLlvmBitcodeFile(filename):
  """Extracts all defined symbols names from an LLVM bitcode file.

  Args:
    filename: (str) File to parse.

  Returns:
    [str] A list of symbol names, can be empty.
  """
  command = (_NM_PATH, '--defined-only', filename)
  p = subprocess.Popen(command, shell=False, stdout=subprocess.PIPE,
                       stderr=subprocess.PIPE)
  try:
    result = _SymbolInfosFromLlvmNm(p.stdout)
    if not result:
      file_size = os.stat(filename).st_size
      logging.warning('No symbols for %s (size %d)', filename, file_size)
    return result
  finally:
    _, _ = p.communicate()
    p.stdout.close()
    assert p.wait() == 0
Extracts all defined symbols names from an LLVM bitcode file.

  Args:
    filename: (str) File to parse.

  Returns:
    [str] A list of symbol names, can be empty.
  
Extracts all defined symbols names from an LLVM bitcode file.
Extracts all defined symbols names from an LLVM bitcode file .
def SymbolNamesFromLlvmBitcodeFile(filename):
  command = (_NM_PATH, '--defined-only', filename)
  p = subprocess.Popen(command, shell=False, stdout=subprocess.PIPE,
                       stderr=subprocess.PIPE)
  try:
    result = _SymbolInfosFromLlvmNm(p.stdout)
    if not result:
      file_size = os.stat(filename).st_size
      logging.warning('No symbols for %s (size %d)', filename, file_size)
    return result
  finally:
    _, _ = p.communicate()
    p.stdout.close()
    assert p.wait() == 0
def SymbolNamesFromLlvmBitcodeFile ( filename ) : command = ( _NM_PATH , '--defined-only' , filename ) p = subprocess . Popen ( command , shell = False , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) try : result = _SymbolInfosFromLlvmNm ( p . stdout ) if not result : file_size = os . stat ( filename ) . st_size logging . warning ( 'No symbols for %s (size %d)' , filename , file_size ) return result finally : _ , _ = p . communicate ( ) p . stdout . close ( ) assert p . wait ( ) == 0
Extracts all defined symbols names from an LLVM bitcode file.
Extracts all defined symbols names from an LLVM bitcode file .
"""Extracts all defined symbols names from an LLVM bitcode file.

  Args:
    filename: (str) File to parse.

  Returns:
    [str] A list of symbol names, can be empty.
  """
[str] A list of symbol names, can be empty.
[ str ] A list of symbol names can be empty .
filename
(str) File to parse.
( str ) File to parse .