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

Unified Diff: runtime/observatory/lib/src/repositories/sample_profile.dart

Issue 2294073003: Converted Observatory class-view element (Closed)
Patch Set: Addressed comments Created 4 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/sample_profile.dart
diff --git a/runtime/observatory/lib/src/repositories/sample_profile.dart b/runtime/observatory/lib/src/repositories/sample_profile.dart
index 57521398484f5c402bb1069d60c19a0d750056b5..0cf5b55e942e736f3080c5338233fa271afe3eeb 100644
--- a/runtime/observatory/lib/src/repositories/sample_profile.dart
+++ b/runtime/observatory/lib/src/repositories/sample_profile.dart
@@ -127,11 +127,25 @@ class IsolateSampleProfileRepository
class ClassSampleProfileRepository
implements M.ClassSampleProfileRepository {
- Stream<SampleProfileLoadingProgressEvent> get(M.ClassRef c,
- M.SampleProfileTag t, {bool clear: false}) {
+ Stream<SampleProfileLoadingProgressEvent> get(M.Isolate i, M.ClassRef c,
+ M.SampleProfileTag t) {
+ S.Isolate isolate = i as S.Isolate;
+ S.Class cls = c as S.Class;
+ assert(isolate != null);
+ assert(cls != null);
+ return new SampleProfileLoadingProgress(isolate, t,
+ false, cls: cls).onProgress;
+ }
+
+ Future enable(M.IsolateRef i, M.ClassRef c) {
+ S.Class cls = c as S.Class;
+ assert(cls != null);
+ return cls.setTraceAllocations(true);
+ }
+
+ Future disable(M.IsolateRef i, M.ClassRef c) {
S.Class cls = c as S.Class;
assert(cls != null);
- return new SampleProfileLoadingProgress(cls.isolate, t,
- clear, cls: cls).onProgress;
+ return cls.setTraceAllocations(false);
}
}

Powered by Google App Engine
This is Rietveld 408576698