tools/android/native_lib_memory/extract_symbols.py
def CodePagesToObjectFiles(symbols_to_object_files, code_pages_to_symbols):
  """From symbols in object files and symbols in pages, gives code page to
  object files.

  Args:
    symbols_to_object_files: (dict) as returned by _GetSymbolNameToFilename()
    code_pages_to_symbols: (dict) as returned by CodePagesToMangledSymbols()

  Returns:
    {page_offset: {object_filename: size_in_page}}
  """
  result = {}
  unmatched_symbols_count = 0
  unmatched_symbols_size = 0
  for page_address in code_pages_to_symbols:
    result[page_address] = {}
    for name, size_in_page in code_pages_to_symbols[page_address]:
      if name not in symbols_to_object_files:
        unmatched_symbols_count += 1
        unmatched_symbols_size += size_in_page
        continue
      object_filename = symbols_to_object_files[name]
      if object_filename not in result[page_address]:
        result[page_address][object_filename] = 0
      result[page_address][object_filename] += size_in_page
  logging.warning('%d unmatched symbols (total size %d).',
                  unmatched_symbols_count, unmatched_symbols_size)
  return result
From symbols in object files and symbols in pages, gives code page to
  object files.

  Args:
    symbols_to_object_files: (dict) as returned by _GetSymbolNameToFilename()
    code_pages_to_symbols: (dict) as returned by CodePagesToMangledSymbols()

  Returns:
    {page_offset: {object_filename: size_in_page}}
  
From symbols in object files and symbols in pages, gives code page to
object files.
From symbols in object files and symbols in pages gives code page to object files .
def CodePagesToObjectFiles(symbols_to_object_files, code_pages_to_symbols):
  result = {}
  unmatched_symbols_count = 0
  unmatched_symbols_size = 0
  for page_address in code_pages_to_symbols:
    result[page_address] = {}
    for name, size_in_page in code_pages_to_symbols[page_address]:
      if name not in symbols_to_object_files:
        unmatched_symbols_count += 1
        unmatched_symbols_size += size_in_page
        continue
      object_filename = symbols_to_object_files[name]
      if object_filename not in result[page_address]:
        result[page_address][object_filename] = 0
      result[page_address][object_filename] += size_in_page
  logging.warning('%d unmatched symbols (total size %d).',
                  unmatched_symbols_count, unmatched_symbols_size)
  return result
def CodePagesToObjectFiles ( symbols_to_object_files , code_pages_to_symbols ) : result = { } unmatched_symbols_count = 0 unmatched_symbols_size = 0 for page_address in code_pages_to_symbols : result [ page_address ] = { } for name , size_in_page in code_pages_to_symbols [ page_address ] : if name not in symbols_to_object_files : unmatched_symbols_count += 1 unmatched_symbols_size += size_in_page continue object_filename = symbols_to_object_files [ name ] if object_filename not in result [ page_address ] : result [ page_address ] [ object_filename ] = 0 result [ page_address ] [ object_filename ] += size_in_page logging . warning ( '%d unmatched symbols (total size %d).' , unmatched_symbols_count , unmatched_symbols_size ) return result
From symbols in object files and symbols in pages, gives code page to
object files.
From symbols in object files and symbols in pages gives code page to object files .
"""From symbols in object files and symbols in pages, gives code page to
  object files.

  Args:
    symbols_to_object_files: (dict) as returned by _GetSymbolNameToFilename()
    code_pages_to_symbols: (dict) as returned by CodePagesToMangledSymbols()

  Returns:
    {page_offset: {object_filename: size_in_page}}
  """
None
{page_offset
symbols_to_object_files
(dict) as returned by _GetSymbolNameToFilename()
( dict ) as returned by _GetSymbolNameToFilename ()
code_pages_to_symbols
(dict) as returned by CodePagesToMangledSymbols()
( dict ) as returned by CodePagesToMangledSymbols ()