| Index: runtime/observatory/lib/src/repositories/allocation_profile.dart
|
| diff --git a/runtime/observatory/lib/src/repositories/allocation_profile.dart b/runtime/observatory/lib/src/repositories/allocation_profile.dart
|
| index 77a2caa0fdba93fd8748cf34838fc6647cc1acba..e3ea7e7c960c7062711d4b3706da6abde90e8e2a 100644
|
| --- a/runtime/observatory/lib/src/repositories/allocation_profile.dart
|
| +++ b/runtime/observatory/lib/src/repositories/allocation_profile.dart
|
| @@ -6,9 +6,10 @@ part of repositories;
|
|
|
| class AllocationProfileRepository implements M.AllocationProfileRepository {
|
| static const _api = '_getAllocationProfile';
|
| + static const _defaultsApi = '_getDefaultClassesAliases';
|
|
|
| Future<M.AllocationProfile> get(M.IsolateRef i,
|
| - {bool gc: false, bool reset: false}) async {
|
| + {bool gc: false, bool reset: false, bool combine: true}) async {
|
| assert(gc != null);
|
| assert(reset != null);
|
| S.Isolate isolate = i as S.Isolate;
|
| @@ -21,6 +22,11 @@ class AllocationProfileRepository implements M.AllocationProfileRepository {
|
| params['reset'] = true;
|
| }
|
| final response = await isolate.invokeRpc(_api, params);
|
| + Map defaults;
|
| + if (combine) {
|
| + defaults = await isolate.vm.invokeRpcNoUpgrade(_defaultsApi, {});
|
| + defaults = defaults['map'];
|
| + }
|
| isolate.updateHeapsFromMap(response['heaps']);
|
| for (S.ServiceMap clsAllocations in response['members']) {
|
| S.Class cls = clsAllocations['class'];
|
| @@ -30,6 +36,6 @@ class AllocationProfileRepository implements M.AllocationProfileRepository {
|
| cls.newSpace.update(clsAllocations['new']);
|
| cls.oldSpace.update(clsAllocations['old']);
|
| }
|
| - return new AllocationProfile(response);
|
| + return new AllocationProfile(response, defaults: defaults);
|
| }
|
| }
|
|
|