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

Unified Diff: runtime/observatory/lib/src/service/object.dart

Issue 3003903002: Hide internal classes from Memory Profile (Closed)
Patch Set: Address CL comments Created 3 years, 4 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: runtime/observatory/lib/src/service/object.dart
diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart
index ef9499cd4cf68d8b33a14e5ebf7ce4d2c65ec7ef..7b1133bbfc57cdb6032dfa92c37f68badf624753 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -2486,6 +2486,14 @@ class Allocations implements M.Allocations {
current.bytes = stats[LIVE_AFTER_GC_SIZE] + stats[ALLOCATED_SINCE_GC_SIZE];
}
+ void combine(Iterable<Allocations> allocations) {
+ accumulated.instances =
+ allocations.fold(0, (v, a) => v + a.accumulated.instances);
+ accumulated.bytes = allocations.fold(0, (v, a) => v + a.accumulated.bytes);
+ current.instances = allocations.fold(0, (v, a) => v + a.current.instances);
+ current.bytes = allocations.fold(0, (v, a) => v + a.current.bytes);
+ }
+
bool get empty => accumulated.empty && current.empty;
bool get notEmpty => accumulated.notEmpty || current.notEmpty;
}

Powered by Google App Engine
This is Rietveld 408576698