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

Unified Diff: runtime/observatory/lib/src/repositories/allocation_profile.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/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);
}
}

Powered by Google App Engine
This is Rietveld 408576698