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

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

Issue 549313006: [Android] memory_inspector: move to libheap_profiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mi3_prebuilts
Patch Set: Add prebuilts 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 c837ee5a4af832bf78b84c3ce0c4fd510727d0c3..d51117cd73a3543feb3307398f332a059cce962c 100644
--- a/tools/memory_inspector/memory_inspector/classification/native_heap_classifier.py
+++ b/tools/memory_inspector/memory_inspector/classification/native_heap_classifier.py
@@ -61,7 +61,7 @@ def Classify(nativeheap, rule_tree):
res = results.AggreatedResults(rule_tree, _RESULT_KEYS)
for allocation in nativeheap.allocations:
- res.AddToMatchingNodes(allocation, [allocation.total_size])
+ res.AddToMatchingNodes(allocation, [allocation.size])
return res
@@ -125,8 +125,8 @@ def InferHeuristicRulesFromHeap(nheap, max_depth=3, threshold=0.02):
continue
# Add the blamed dir to the leaderboard.
blamed_dir = dir_histogram.most_common()[0][0]
- blamed_dirs.update({blamed_dir : alloc.total_size})
- total_allocated += alloc.total_size
+ blamed_dirs.update({blamed_dir : alloc.size})
+ total_allocated += alloc.size
# Select only the top paths from the leaderboard which contribute for more
# than |threshold| and make a radix tree out of them.

Powered by Google App Engine
This is Rietveld 408576698