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

Unified Diff: tools/memory_inspector/memory_inspector/classification/native_heap_classifier.py

Issue 563183003: [Android] memory_inspector: add resident memory accounting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mi4
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: tools/memory_inspector/memory_inspector/classification/native_heap_classifier.py
diff --git a/tools/memory_inspector/memory_inspector/classification/native_heap_classifier.py b/tools/memory_inspector/memory_inspector/classification/native_heap_classifier.py
index d51117cd73a3543feb3307398f332a059cce962c..e424afc4845627be4f8aeae31a6a907d69c872ab 100644
--- a/tools/memory_inspector/memory_inspector/classification/native_heap_classifier.py
+++ b/tools/memory_inspector/memory_inspector/classification/native_heap_classifier.py
@@ -34,7 +34,7 @@ from memory_inspector.core import exceptions
from memory_inspector.core import native_heap
-_RESULT_KEYS = ['bytes_allocated']
+_RESULT_KEYS = ['bytes_allocated', 'bytes_resident']
def LoadRules(content):
@@ -61,7 +61,8 @@ def Classify(nativeheap, rule_tree):
res = results.AggreatedResults(rule_tree, _RESULT_KEYS)
for allocation in nativeheap.allocations:
- res.AddToMatchingNodes(allocation, [allocation.size])
+ res.AddToMatchingNodes(allocation,
+ [allocation.size, allocation.resident_size])
return res

Powered by Google App Engine
This is Rietveld 408576698