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

Unified Diff: runtime/observatory/lib/src/app/page.dart

Issue 2255613002: Converted Observatory heap-profile element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Optimizations & Dead code removal 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/app/page.dart
diff --git a/runtime/observatory/lib/src/app/page.dart b/runtime/observatory/lib/src/app/page.dart
index e5d0b1f836c5a94ca31d24f6e57dffd63ddca766..5ab9001c3abc90ffd0479e3b3042030eb8077aca 100644
--- a/runtime/observatory/lib/src/app/page.dart
+++ b/runtime/observatory/lib/src/app/page.dart
@@ -4,6 +4,8 @@
part of app;
+AllocationProfileRepository _heapProfileRepository
Cutch 2016/08/17 14:28:44 _allocationProfileRepository
cbernaschina 2016/08/17 17:01:27 Done.
+ = new AllocationProfileRepository();
IsolateSampleProfileRepository _isolateSampleProfileRepository
= new IsolateSampleProfileRepository();
@@ -269,20 +271,33 @@ class TableCpuProfilerPage extends SimplePage {
}
}
-class AllocationProfilerPage extends SimplePage {
- AllocationProfilerPage(app)
- : super('allocation-profiler', 'heap-profile', app);
+class AllocationProfilerPage extends MatchingPage {
+ AllocationProfilerPage(app) : super('allocation-profiler', app);
+
+ DivElement container = new DivElement();
void _visit(Uri uri) {
super._visit(uri);
getIsolate(uri).then((isolate) {
- if (element != null) {
- /// Update the page.
- HeapProfileElement page = element;
- page.isolate = isolate;
- }
+ container.children = [
+ new AllocationProfileElement(isolate.vm, isolate, app.events,
+ app.notifications, _heapProfileRepository,
+ queue: app.queue)
+ ];
});
}
+
+ void onInstall() {
+ if (element == null) {
+ element = container;
+ }
+ app.startGCEventListener();
+ }
+
+ void onUninstall() {
+ super.onUninstall();
+ app.stopGCEventListener();
+ }
}
class PortsPage extends SimplePage {

Powered by Google App Engine
This is Rietveld 408576698