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

Side by Side Diff: tools/multi_process_rss.py

Issue 108073002: Error handling and refactoring in tools/linux/procfs.py, and rename multi-process-rss.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 | Annotate | Revision Log
« no previous file with comments | « tools/multi-process-rss.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # Counts a resident set size (RSS) of multiple processes without double-counts. 6 # Counts a resident set size (RSS) of multiple processes without double-counts.
7 # If they share the same page frame, the page frame is counted only once. 7 # If they share the same page frame, the page frame is counted only once.
8 # 8 #
9 # Usage: 9 # Usage:
10 # ./multi-process-rss.py <pid>|<pid>r [...] 10 # ./multi-process-rss.py <pid>|<pid>r [...]
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 return 1 134 return 1
135 135
136 # TODO(dmikurube): Classify this total RSS. 136 # TODO(dmikurube): Classify this total RSS.
137 print len(pageframes) * 4096 137 print len(pageframes) * 4096
138 138
139 return 0 139 return 0
140 140
141 141
142 if __name__ == '__main__': 142 if __name__ == '__main__':
143 sys.exit(main(sys.argv)) 143 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « tools/multi-process-rss.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698