summaryrefslogtreecommitdiffstats
path: root/tools/find_runtime_symbols
diff options
context:
space:
mode:
authordmikurube@chromium.org <dmikurube@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-20 09:55:43 +0000
committerdmikurube@chromium.org <dmikurube@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-20 09:55:43 +0000
commit8d90103c6e593e38f9eab5894e98a66b8b96cde4 (patch)
treede7f30c12d1a3b378b4900593b8570fb779f9411 /tools/find_runtime_symbols
parente786e4d5d19e927297da731693b389dc6e65a903 (diff)
downloadchromium_src-8d90103c6e593e38f9eab5894e98a66b8b96cde4.zip
chromium_src-8d90103c6e593e38f9eab5894e98a66b8b96cde4.tar.gz
chromium_src-8d90103c6e593e38f9eab5894e98a66b8b96cde4.tar.bz2
Estimates a path in host from a corresponding path in Android device.
For Android, dmprof.py should find symbol information from binaries in the host instead of the Android device because dmprof.py doesn't run on the Android device. They are in different directories. This change estimates a path in the host from a corresponding path in the Android device. BUG=231800 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/15035009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201062 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/find_runtime_symbols')
-rwxr-xr-xtools/find_runtime_symbols/prepare_symbol_info.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/find_runtime_symbols/prepare_symbol_info.py b/tools/find_runtime_symbols/prepare_symbol_info.py
index b5c32af..2e82876 100755
--- a/tools/find_runtime_symbols/prepare_symbol_info.py
+++ b/tools/find_runtime_symbols/prepare_symbol_info.py
@@ -55,7 +55,7 @@ def _dump_command_result(command, output_dir_path, basename, suffix):
def prepare_symbol_info(maps_path,
output_dir_path=None,
- fake_directories=None,
+ alternative_dirs=None,
use_tempdir=False,
use_source_file_name=False):
"""Prepares (collects) symbol information files for find_runtime_symbols.
@@ -76,7 +76,7 @@ def prepare_symbol_info(maps_path,
Args:
maps_path: A path to a file which contains '/proc/<pid>/maps'.
- fake_directories: A mapping from a directory '/path/on/target' where the
+ alternative_dirs: A mapping from a directory '/path/on/target' where the
target process runs to a directory '/path/on/host' where the script
reads the binary. Considered to be used for Android binaries.
output_dir_path: A path to a directory where files are prepared.
@@ -89,7 +89,7 @@ def prepare_symbol_info(maps_path,
A pair of a path to the prepared directory and a boolean representing
if it created a temporary directory or not.
"""
- fake_directories = fake_directories or {}
+ alternative_dirs = alternative_dirs or {}
if not output_dir_path:
matched = re.match('^(.*)\.maps$', os.path.basename(maps_path))
if matched:
@@ -145,7 +145,7 @@ def prepare_symbol_info(maps_path,
LOGGER.debug(' %016x-%016x +%06x %s' % (
entry.begin, entry.end, entry.offset, entry.name))
binary_path = entry.name
- for target_path, host_path in fake_directories.iteritems():
+ for target_path, host_path in alternative_dirs.iteritems():
if entry.name.startswith(target_path):
binary_path = entry.name.replace(target_path, host_path, 1)
nm_filename = _dump_command_result(
@@ -194,7 +194,7 @@ def main():
handler.setFormatter(formatter)
LOGGER.addHandler(handler)
- # TODO(dmikurube): Specify |fake_directories| from command line.
+ # TODO(dmikurube): Specify |alternative_dirs| from command line.
if len(sys.argv) < 2:
sys.stderr.write("""Usage:
%s /path/to/maps [/path/to/output_data_dir/]