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

Unified Diff: runtime/observatory/lib/src/elements/heap_snapshot.dart

Issue 2340883002: Observatory: Fix allocation profile CVS export. Fix heap snapshot in/out reference counts. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « runtime/observatory/lib/src/elements/allocation_profile.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/elements/heap_snapshot.dart
diff --git a/runtime/observatory/lib/src/elements/heap_snapshot.dart b/runtime/observatory/lib/src/elements/heap_snapshot.dart
index 51c451e414e50751edc06b29dee362acab2e7b06..a3ce8d236baf38dd6be1acd44fda19d092886c91 100644
--- a/runtime/observatory/lib/src/elements/heap_snapshot.dart
+++ b/runtime/observatory/lib/src/elements/heap_snapshot.dart
@@ -346,12 +346,16 @@ class HeapSnapshotElement extends HtmlElement implements Renderable {
element.children[2].text = '';
}
element.children[3].text = '';
+ int references = 0;
+ for (var referenceGroup in item) {
+ references += referenceGroup.count;
+ }
if (item is Iterable<M.HeapSnapshotClassInbound>) {
element.children[4] = new SpanElement()..classes = ['name']
- ..text = '${item.length} Incoming references';
+ ..text = '$references incoming references';
} else {
element.children[4] = new SpanElement()..classes = ['name']
- ..text = '${item.length} Outgoing references';
+ ..text = '$references outgoing references';
}
} else {
element.children[0].text = '';
« no previous file with comments | « runtime/observatory/lib/src/elements/allocation_profile.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698