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

Side by Side Diff: runtime/observatory/lib/src/app/application.dart

Issue 1013563002: CPU profile displayed in three tables with a tree (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of app; 5 part of app;
6 6
7 /// The observatory application. Instances of this are created and owned 7 /// The observatory application. Instances of this are created and owned
8 /// by the observatory_application custom element. 8 /// by the observatory_application custom element.
9 class ObservatoryApplication extends Observable { 9 class ObservatoryApplication extends Observable {
10 static ObservatoryApplication app; 10 static ObservatoryApplication app;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 } 98 }
99 99
100 void _registerPages() { 100 void _registerPages() {
101 _pageRegistry.add(new VMPage(this)); 101 _pageRegistry.add(new VMPage(this));
102 _pageRegistry.add(new FlagsPage(this)); 102 _pageRegistry.add(new FlagsPage(this));
103 _pageRegistry.add(new InspectPage(this)); 103 _pageRegistry.add(new InspectPage(this));
104 _pageRegistry.add(new ClassTreePage(this)); 104 _pageRegistry.add(new ClassTreePage(this));
105 _pageRegistry.add(new DebuggerPage(this)); 105 _pageRegistry.add(new DebuggerPage(this));
106 _pageRegistry.add(new CpuProfilerPage(this)); 106 _pageRegistry.add(new CpuProfilerPage(this));
107 _pageRegistry.add(new TableCpuProfilerPage(this));
107 _pageRegistry.add(new AllocationProfilerPage(this)); 108 _pageRegistry.add(new AllocationProfilerPage(this));
108 _pageRegistry.add(new HeapMapPage(this)); 109 _pageRegistry.add(new HeapMapPage(this));
109 _pageRegistry.add(new VMConnectPage(this)); 110 _pageRegistry.add(new VMConnectPage(this));
110 _pageRegistry.add(new ErrorViewPage(this)); 111 _pageRegistry.add(new ErrorViewPage(this));
111 _pageRegistry.add(new MetricsPage(this)); 112 _pageRegistry.add(new MetricsPage(this));
112 // Note that ErrorPage must be the last entry in the list as it is 113 // Note that ErrorPage must be the last entry in the list as it is
113 // the catch all. 114 // the catch all.
114 _pageRegistry.add(new ErrorPage(this)); 115 _pageRegistry.add(new ErrorPage(this));
115 } 116 }
116 117
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // Add tracing support. 189 // Add tracing support.
189 _traceView = new Element.tag('trace-view'); 190 _traceView = new Element.tag('trace-view');
190 _traceView.tracer = Tracer.current; 191 _traceView.tracer = Tracer.current;
191 rootElement.children.add(_traceView); 192 rootElement.children.add(_traceView);
192 193
193 // Remember page. 194 // Remember page.
194 currentPage = page; 195 currentPage = page;
195 } 196 }
196 197
197 ObservatoryApplication(this.rootElement) : 198 ObservatoryApplication(this.rootElement) :
198 locationManager = new HashLocationManager(), 199 locationManager = new LocationManager(),
199 targets = new TargetManager() { 200 targets = new TargetManager() {
200 vm = new WebSocketVM(targets.defaultTarget); 201 vm = new WebSocketVM(targets.defaultTarget);
201 _initOnce(false); 202 _initOnce(false);
202 } 203 }
203 204
204 void _removeDisconnectEvents() { 205 void _removeDisconnectEvents() {
205 notifications.removeWhere((oldEvent) { 206 notifications.removeWhere((oldEvent) {
206 return (oldEvent.eventType == ServiceEvent.kVMDisconnected); 207 return (oldEvent.eventType == ServiceEvent.kVMDisconnected);
207 }); 208 });
208 } 209 }
209 210
210 _vmConnected(VM vm) { 211 _vmConnected(VM vm) {
211 if (vm is WebSocketVM) { 212 if (vm is WebSocketVM) {
212 targets.add(vm.target); 213 targets.add(vm.target);
213 } 214 }
214 _removeDisconnectEvents(); 215 _removeDisconnectEvents();
215 } 216 }
216 217
217 _vmDisconnected(VM vm) { 218 _vmDisconnected(VM vm) {
218 if (this.vm != vm) { 219 if (this.vm != vm) {
219 // This disconnect event occured *after* a new VM was installed. 220 // This disconnect event occured *after* a new VM was installed.
220 return; 221 return;
221 } 222 }
222 this.vm = null; 223 this.vm = null;
223 notifications.add(new ServiceEvent.vmDisconencted()); 224 notifications.add(new ServiceEvent.vmDisconencted());
224 } 225 }
225 } 226 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698