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

Side by Side Diff: tools/android/memdump/memreport.py

Issue 16514009: Add dlmalloc from Bionic to the Chromium tree (DO NOT REVIEW). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | « third_party/android_debug_dlmalloc/dlmalloc.gyp ('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 # 2 #
3 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 import re 7 import re
8 import sys 8 import sys
9 9
10 from sets import Set 10 from sets import Set
11 11
12 12
13 _ENTRIES = [ 13 _ENTRIES = [
14 ('Total', '.* r... .*'), 14 ('Total', '.* r... .*'),
15 ('Read-only', '.* r--. .*'), 15 ('Read-only', '.* r--. .*'),
16 ('Read-write', '.* rw-. .*'), 16 ('Read-write', '.* rw-. .*'),
17 ('Executable', '.* ..x. .*'), 17 ('Executable', '.* ..x. .*'),
18 ('File read-write', '.* rw.. .* /.*'), 18 ('File read-write', '.* rw.. .* /.*'),
19 ('Anonymous read-write', '.* rw.. .* .*other=[0-9]+ ($|.*chromium:.*)'), 19 ('Anonymous read-write', '.* rw.. .* .*other=[0-9]+ ($|.*chromium:.*)'),
20 ('File executable', '.* ..x. .* /.*'), 20 ('File executable', '.* ..x. .* /.*'),
21 ('Anonymous executable (JIT\'ed code)', '.* ..x. .* shared_other=[0-9]+ $'), 21 ('Anonymous executable (JIT\'ed code)', '.* ..x. .* shared_other=[0-9]+ $'),
22 ('chromium mmap', '.* r... .*chromium:.*'), 22 ('chromium mmap', '.* r... .*chromium:.*'),
23 ('chromium TransferBuffer', '.* r... .*chromium:.*CreateTransferBuffer.*'), 23 ('chromium TransferBuffer', '.* r... .*chromium:.*CreateTransferBuffer.*'),
24 ('Galaxy Nexus GL driver', '.* r... .*pvrsrvkm.*'), 24 ('Galaxy Nexus GL driver', '.* r... .*pvrsrvkm.*'),
25 ('Dalvik', '.* rw.. .* /.*dalvik.*'), 25 ('Dalvik', '.* rw.. .* /.*dalvik.*'),
26 ('Dalvik heap', '.* rw.. .* /.*dalvik-heap.*'), 26 ('Dalvik heap', '.* rw.. .* /.*dalvik-heap.*'),
27 ('Native heap (jemalloc)', '.* r... .* /.*jemalloc.*'), 27 ('Native heap (jemalloc)', '.* r... .* /.*jemalloc.*'),
28 ('Native heap (dlmalloc)', '.* r... .* /.*dlmalloc.*'),
28 ('System heap', '.* r... .* \\[heap\\]'), 29 ('System heap', '.* r... .* \\[heap\\]'),
29 ('Ashmem', '.* rw.. .* /dev/ashmem .*'), 30 ('Ashmem', '.* rw.. .* /dev/ashmem .*'),
30 ('libchromeview.so total', '.* r... .* /.*libchromeview.so'), 31 ('libchromeview.so total', '.* r... .* /.*libchromeview.so'),
31 ('libchromeview.so read-only', '.* r--. .* /.*libchromeview.so'), 32 ('libchromeview.so read-only', '.* r--. .* /.*libchromeview.so'),
32 ('libchromeview.so read-write', '.* rw-. .* /.*libchromeview.so'), 33 ('libchromeview.so read-write', '.* rw-. .* /.*libchromeview.so'),
33 ('libchromeview.so executable', '.* r.x. .* /.*libchromeview.so'), 34 ('libchromeview.so executable', '.* r.x. .* /.*libchromeview.so'),
34 ] 35 ]
35 36
36 37
37 def _CollectMemoryStats(memdump, region_filters): 38 def _CollectMemoryStats(memdump, region_filters):
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 print ',' + k + ',' + _ConvertMemoryField(total_map[v]) + ',' 100 print ',' + k + ',' + _ConvertMemoryField(total_map[v]) + ','
100 print '' 101 print ''
101 102
102 103
103 def main(argv): 104 def main(argv):
104 _DumpCSV(_CollectMemoryStats(sys.stdin, [value for (key, value) in _ENTRIES])) 105 _DumpCSV(_CollectMemoryStats(sys.stdin, [value for (key, value) in _ENTRIES]))
105 106
106 107
107 if __name__ == '__main__': 108 if __name__ == '__main__':
108 main(sys.argv) 109 main(sys.argv)
OLDNEW
« no previous file with comments | « third_party/android_debug_dlmalloc/dlmalloc.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698