| OLD | NEW |
| 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 Loading... |
| 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)) |
| OLD | NEW |