| 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;
|
| }
|
|
|