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

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

Issue 148133003: Better grouping of data in Deep Memory Profiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/deep_memory_profiler/policy.linux.browser.json » ('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
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 dmprof json [-p POLICY] <first-dump> 54 dmprof json [-p POLICY] <first-dump>
55 dmprof list [-p POLICY] <first-dump> 55 dmprof list [-p POLICY] <first-dump>
56 dmprof map <first-dump> <policy> 56 dmprof map <first-dump> <policy>
57 dmprof pprof [-c COMPONENT] <dump> <policy> 57 dmprof pprof [-c COMPONENT] <dump> <policy>
58 dmprof stacktrace <dump> 58 dmprof stacktrace <dump>
59 dmprof upload [--gsutil path/to/gsutil] <first-dump> <destination-gs-path> 59 dmprof upload [--gsutil path/to/gsutil] <first-dump> <destination-gs-path>
60 """) 60 """)
61 sys.exit(1) 61 sys.exit(1)
62 action = sys.argv.pop(1) 62 action = sys.argv.pop(1)
63 63
64 LOGGER.setLevel(logging.DEBUG) 64 logging.basicConfig()
Dai Mikurube (NOT FULLTIME) 2014/01/28 01:49:29 No. Here, I name LOGGER as 'dmprof' at line 17. Th
65 handler = logging.StreamHandler()
66 handler.setLevel(logging.INFO)
67 formatter = logging.Formatter('%(message)s')
68 handler.setFormatter(formatter)
69 LOGGER.addHandler(handler)
70 65
71 try: 66 try:
72 errorcode = COMMANDS[action]().do(sys.argv) 67 errorcode = COMMANDS[action]().do(sys.argv)
73 except ParsingException, e: 68 except ParsingException, e:
74 errorcode = 1 69 errorcode = 1
75 sys.stderr.write('Exit by parsing error: %s\n' % e) 70 sys.stderr.write('Exit by parsing error: %s\n' % e)
76 71
77 return errorcode 72 return errorcode
78 73
79 74
80 if __name__ == '__main__': 75 if __name__ == '__main__':
81 sys.exit(main()) 76 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | tools/deep_memory_profiler/policy.linux.browser.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698