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

Side by Side Diff: tools/deep_memory_profiler/dmprof.py

Issue 700773002: Add a new command to summarize memory usage by function addresses in dmprof (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/deep_memory_profiler/subcommands/__init__.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """The Deep Memory Profiler analyzer script. 5 """The Deep Memory Profiler analyzer script.
6 6
7 See http://dev.chromium.org/developers/deep-memory-profiler for details. 7 See http://dev.chromium.org/developers/deep-memory-profiler for details.
8 """ 8 """
9 9
10 import logging 10 import logging
11 import sys 11 import sys
12 12
13 from lib.exceptions import ParsingException 13 from lib.exceptions import ParsingException
14 import subcommands 14 import subcommands
15 15
16 16
17 LOGGER = logging.getLogger('dmprof') 17 LOGGER = logging.getLogger('dmprof')
18 18
19 19
20 def main(): 20 def main():
21 COMMANDS = { 21 COMMANDS = {
22 'addr': subcommands.AddrCommand,
22 'buckets': subcommands.BucketsCommand, 23 'buckets': subcommands.BucketsCommand,
23 'cat': subcommands.CatCommand, 24 'cat': subcommands.CatCommand,
24 'csv': subcommands.CSVCommand, 25 'csv': subcommands.CSVCommand,
25 'expand': subcommands.ExpandCommand, 26 'expand': subcommands.ExpandCommand,
26 'json': subcommands.JSONCommand, 27 'json': subcommands.JSONCommand,
27 'list': subcommands.ListCommand, 28 'list': subcommands.ListCommand,
28 'map': subcommands.MapCommand, 29 'map': subcommands.MapCommand,
29 'pprof': subcommands.PProfCommand, 30 'pprof': subcommands.PProfCommand,
30 'stacktrace': subcommands.StacktraceCommand, 31 'stacktrace': subcommands.StacktraceCommand,
31 'upload': subcommands.UploadCommand, 32 'upload': subcommands.UploadCommand,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 errorcode = COMMANDS[action]().do(sys.argv) 73 errorcode = COMMANDS[action]().do(sys.argv)
73 except ParsingException, e: 74 except ParsingException, e:
74 errorcode = 1 75 errorcode = 1
75 sys.stderr.write('Exit by parsing error: %s\n' % e) 76 sys.stderr.write('Exit by parsing error: %s\n' % e)
76 77
77 return errorcode 78 return errorcode
78 79
79 80
80 if __name__ == '__main__': 81 if __name__ == '__main__':
81 sys.exit(main()) 82 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | tools/deep_memory_profiler/subcommands/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698