Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Unified Diff: tools/deep_memory_profiler/lib/subcommand.py

Issue 467563002: Refactor dmprof: remove no_dump flag for 'buckets' in load_basic_files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/deep_memory_profiler/subcommands/buckets.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/deep_memory_profiler/lib/subcommand.py
diff --git a/tools/deep_memory_profiler/lib/subcommand.py b/tools/deep_memory_profiler/lib/subcommand.py
index 39241092afaa2945aa0513d12c6b47d3bb68b635..36d0fe3e3d10fec333e09e3e112bc606a5759cc4 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)
« no previous file with comments | « no previous file | tools/deep_memory_profiler/subcommands/buckets.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698