diff options
author | dmikurube@chromium.org <dmikurube@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-13 10:23:26 +0000 |
---|---|---|
committer | dmikurube@chromium.org <dmikurube@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-13 10:25:18 +0000 |
commit | 5e4502a01e59231bf056b81d7bf95a90a9f11cd3 (patch) | |
tree | 238271a3165f80db06a88cf3b6722f9b4621bf20 | |
parent | 9648b65b8803649570c80f79dcc69f7ef62d4d08 (diff) | |
download | chromium_src-5e4502a01e59231bf056b81d7bf95a90a9f11cd3.zip chromium_src-5e4502a01e59231bf056b81d7bf95a90a9f11cd3.tar.gz chromium_src-5e4502a01e59231bf056b81d7bf95a90a9f11cd3.tar.bz2 |
Refactor dmprof: remove no_dump flag for 'buckets' in load_basic_files.
It's the third step to accept Android's heap profiler discussed in http://crbug.com/382489.
BUG=391212
NOTRY=True
Review URL: https://codereview.chromium.org/467563002
Cr-Commit-Position: refs/heads/master@{#289255}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289255 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | tools/deep_memory_profiler/lib/subcommand.py | 16 | ||||
-rw-r--r-- | tools/deep_memory_profiler/subcommands/buckets.py | 2 |
2 files changed, 7 insertions, 11 deletions
diff --git a/tools/deep_memory_profiler/lib/subcommand.py b/tools/deep_memory_profiler/lib/subcommand.py index 3924109..36d0fe3 100644 --- a/tools/deep_memory_profiler/lib/subcommand.py +++ b/tools/deep_memory_profiler/lib/subcommand.py @@ -31,8 +31,7 @@ class SubCommand(object): self._parser = optparse.OptionParser(usage) @staticmethod - def load_basic_files( - dump_path, multiple, no_dump=False, alternative_dirs=None): + def load_basic_files(dump_path, multiple, alternative_dirs=None): prefix = SubCommand._find_prefix(dump_path) # If the target process is estimated to be working on Android, converts # a path in the Android device to a path estimated to be corresponding in @@ -46,11 +45,10 @@ class SubCommand(object): symbol_data_sources.prepare() bucket_set = BucketSet() bucket_set.load(prefix) - if not no_dump: - if multiple: - dump_list = DumpList.load(SubCommand._find_all_dumps(dump_path)) - else: - dump = Dump.load(dump_path) + if multiple: + dump_list = DumpList.load(SubCommand._find_all_dumps(dump_path)) + else: + dump = Dump.load(dump_path) symbol_mapping_cache = SymbolMappingCache() with open(prefix + '.cache.function', 'a+') as cache_f: symbol_mapping_cache.update( @@ -65,9 +63,7 @@ class SubCommand(object): SOURCEFILE_SYMBOLS, bucket_set, SymbolFinder(SOURCEFILE_SYMBOLS, symbol_data_sources), cache_f) bucket_set.symbolize(symbol_mapping_cache) - if no_dump: - return bucket_set - elif multiple: + if multiple: return (bucket_set, dump_list) else: return (bucket_set, dump) diff --git a/tools/deep_memory_profiler/subcommands/buckets.py b/tools/deep_memory_profiler/subcommands/buckets.py index 4ea8640..c5b6556 100644 --- a/tools/deep_memory_profiler/subcommands/buckets.py +++ b/tools/deep_memory_profiler/subcommands/buckets.py @@ -18,7 +18,7 @@ class BucketsCommand(SubCommand): def do(self, sys_argv, out=sys.stdout): _, args = self._parse_args(sys_argv, 1) dump_path = args[1] - bucket_set = SubCommand.load_basic_files(dump_path, True, True) + (bucket_set, _) = SubCommand.load_basic_files(dump_path, True) BucketsCommand._output(bucket_set, out) return 0 |