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

Unified Diff: runtime/observatory/lib/src/cpu_profile/cpu_profile.dart

Issue 2977803002: [observatory] Sort native allocation profiles by size. (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/cpu_profile/cpu_profile.dart
diff --git a/runtime/observatory/lib/src/cpu_profile/cpu_profile.dart b/runtime/observatory/lib/src/cpu_profile/cpu_profile.dart
index 747d7b9ca9b1da8dfc3fcda55d4b400d6436c632..76e1a2680f6bdbbaad8e09abe52ad3703e5bfea0 100644
--- a/runtime/observatory/lib/src/cpu_profile/cpu_profile.dart
+++ b/runtime/observatory/lib/src/cpu_profile/cpu_profile.dart
@@ -104,6 +104,9 @@ class CodeCallTree extends CallTree<CodeCallTreeNode>
for (var child in node.children) {
_setCodeMemoryPercentage(node, child);
}
+ node.children.sort((a, b) {
+ return b.inclusiveNativeAllocations - a.inclusiveNativeAllocations;
+ });
}
_recordCallerAndCalleesInner(
@@ -416,6 +419,9 @@ class FunctionCallTree extends CallTree implements M.FunctionCallTree {
for (var child in node.children) {
_setFunctionMemoryPercentage(node, child);
}
+ node.children.sort((a, b) {
+ return b.inclusiveNativeAllocations - a.inclusiveNativeAllocations;
+ });
}
_markFunctionCallsInner(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698