| 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..bd2fe175166a11b9eff4de17193a4d630b31d5b9 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 _allocationProfileRepository
|
| + = new AllocationProfileRepository();
|
| IsolateSampleProfileRepository _isolateSampleProfileRepository
|
| = new IsolateSampleProfileRepository();
|
|
|
| @@ -269,20 +271,34 @@ 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,
|
| + _allocationProfileRepository,
|
| + queue: app.queue)
|
| + ];
|
| });
|
| }
|
| +
|
| + void onInstall() {
|
| + if (element == null) {
|
| + element = container;
|
| + }
|
| + app.startGCEventListener();
|
| + }
|
| +
|
| + void onUninstall() {
|
| + super.onUninstall();
|
| + app.stopGCEventListener();
|
| + }
|
| }
|
|
|
| class PortsPage extends SimplePage {
|
|
|