tools/android/native_lib_memory/java_code_pages_pss.py
def _GetPssInKb(mappings, app_package, verbose):
  """Returns the total PSS from mappings.

  Args:
    mappings: ([parse_smaps.Mapping]) List of mappings.
    app_package: (str) App package to look for.
    verbose: (bool) Verbose output or not.

  Returns:
    (executable_pss (int), other_pss (int)) Executable mappings and others,
                                            in kB.
  """
  executable_pss, other_pss = (0, 0)
  for mapping in mappings:
    if app_package in mapping.pathname:
      if mapping.permissions == 'r-xp':
        executable_pss += mapping.fields['Pss']
      else:
        other_pss += mapping.fields['Pss']
      if verbose:
        print(mapping.ToString())
  return (executable_pss, other_pss)
Returns the total PSS from mappings.

  Args:
    mappings: ([parse_smaps.Mapping]) List of mappings.
    app_package: (str) App package to look for.
    verbose: (bool) Verbose output or not.

  Returns:
    (executable_pss (int), other_pss (int)) Executable mappings and others,
                                            in kB.
  
Returns the total PSS from mappings.
Returns the total PSS from mappings .
def _GetPssInKb(mappings, app_package, verbose):
  executable_pss, other_pss = (0, 0)
  for mapping in mappings:
    if app_package in mapping.pathname:
      if mapping.permissions == 'r-xp':
        executable_pss += mapping.fields['Pss']
      else:
        other_pss += mapping.fields['Pss']
      if verbose:
        print(mapping.ToString())
  return (executable_pss, other_pss)
def _GetPssInKb ( mappings , app_package , verbose ) : executable_pss , other_pss = ( 0 , 0 ) for mapping in mappings : if app_package in mapping . pathname : if mapping . permissions == 'r-xp' : executable_pss += mapping . fields [ 'Pss' ] else : other_pss += mapping . fields [ 'Pss' ] if verbose : print ( mapping . ToString ( ) ) return ( executable_pss , other_pss )
Returns the total PSS from mappings.
Returns the total PSS from mappings .
"""Returns the total PSS from mappings.

  Args:
    mappings: ([parse_smaps.Mapping]) List of mappings.
    app_package: (str) App package to look for.
    verbose: (bool) Verbose output or not.

  Returns:
    (executable_pss (int), other_pss (int)) Executable mappings and others,
                                            in kB.
  """
(executable_pss (int), other_pss (int)) Executable mappings and others,
in kB.
( executable_pss ( int ) other_pss ( int )) Executable mappings and others in kB .
mappings
([parse_smaps.Mapping]) List of mappings.
( [ parse_smaps . Mapping ] ) List of mappings .
app_package
(str) App package to look for.
( str ) App package to look for .
verbose
(bool) Verbose output or not.
( bool ) Verbose output or not .