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

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

Issue 2748403002: Added page to Observatory to display native memory allocation information. (Closed)
Patch Set: Final patch. Created 3 years, 9 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 final _allocationProfileRepository = new AllocationProfileRepository(); 7 final _allocationProfileRepository = new AllocationProfileRepository();
8 final _breakpointRepository = new BreakpointRepository(); 8 final _breakpointRepository = new BreakpointRepository();
9 final _classSampleProfileRepository = new ClassSampleProfileRepository(); 9 final _classSampleProfileRepository = new ClassSampleProfileRepository();
10 final _classRepository = new ClassRepository(); 10 final _classRepository = new ClassRepository();
11 final _contextRepository = new ContextRepository(); 11 final _contextRepository = new ContextRepository();
12 final _evalRepository = new EvalRepository(); 12 final _evalRepository = new EvalRepository();
13 final _fieldRepository = new FieldRepository(); 13 final _fieldRepository = new FieldRepository();
14 final _functionRepository = new FunctionRepository(); 14 final _functionRepository = new FunctionRepository();
15 final _heapSnapshotRepository = new HeapSnapshotRepository(); 15 final _heapSnapshotRepository = new HeapSnapshotRepository();
16 final _icdataRepository = new ICDataRepository(); 16 final _icdataRepository = new ICDataRepository();
17 final _inboundReferencesRepository = new InboundReferencesRepository(); 17 final _inboundReferencesRepository = new InboundReferencesRepository();
18 final _instanceRepository = new InstanceRepository(); 18 final _instanceRepository = new InstanceRepository();
19 final _isolateRepository = new IsolateRepository(); 19 final _isolateRepository = new IsolateRepository();
20 final _isolateSampleProfileRepository = new IsolateSampleProfileRepository(); 20 final _isolateSampleProfileRepository = new IsolateSampleProfileRepository();
21 final _libraryRepository = new LibraryRepository(); 21 final _libraryRepository = new LibraryRepository();
22 final _megamorphicCacheRepository = new MegamorphicCacheRepository(); 22 final _megamorphicCacheRepository = new MegamorphicCacheRepository();
23 final _metricRepository = new MetricRepository(); 23 final _metricRepository = new MetricRepository();
24 final _nativeMemorySampleProfileRepository = new
25 NativeMemorySampleProfileRepository();
24 final _objectRepository = new ObjectRepository(); 26 final _objectRepository = new ObjectRepository();
25 final _objectPoolRepository = new ObjectPoolRepository(); 27 final _objectPoolRepository = new ObjectPoolRepository();
26 final _objectstoreRepository = new ObjectStoreRepository(); 28 final _objectstoreRepository = new ObjectStoreRepository();
27 final _persistentHandlesRepository = new PersistentHandlesRepository(); 29 final _persistentHandlesRepository = new PersistentHandlesRepository();
28 final _portsRepository = new PortsRepository(); 30 final _portsRepository = new PortsRepository();
29 final _scriptRepository = new ScriptRepository(); 31 final _scriptRepository = new ScriptRepository();
30 final _stronglyReachangleInstancesRepository = 32 final _stronglyReachangleInstancesRepository =
31 new StronglyReachableInstancesRepository(); 33 new StronglyReachableInstancesRepository();
32 final _topRetainingInstancesRepository = new TopRetainingInstancesRepository(); 34 final _topRetainingInstancesRepository = new TopRetainingInstancesRepository();
33 final _typeArgumentsRepository = new TypeArgumentsRepository(); 35 final _typeArgumentsRepository = new TypeArgumentsRepository();
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 element = new FlagListElement( 182 element = new FlagListElement(
181 app.vm, app.events, new FlagsRepository(app.vm), app.notifications, 183 app.vm, app.events, new FlagsRepository(app.vm), app.notifications,
182 queue: app.queue); 184 queue: app.queue);
183 } 185 }
184 186
185 void _visit(Uri uri) { 187 void _visit(Uri uri) {
186 super._visit(uri); 188 super._visit(uri);
187 } 189 }
188 } 190 }
189 191
192 class NativeMemoryProfilerPage extends SimplePage {
193 NativeMemoryProfilerPage(app) : super('native-memory-profile',
194 'native-memory-profile', app);
195 @override
196 onInstall() {
197 if (element == null) {
198 element = new NativeMemoryProfileElement(app.vm, app.events,
199 app.notifications, _nativeMemorySampleProfileRepository,
200 queue: app.queue);
201 }
202 assert(element != null);
203 }
204
205 void _visit(Uri uri) {
206 super._visit(uri);
207 }
208 }
209
190 class InspectPage extends MatchingPage { 210 class InspectPage extends MatchingPage {
191 InspectPage(app) : super('inspect', app); 211 InspectPage(app) : super('inspect', app);
192 212
193 final DivElement container = new DivElement(); 213 final DivElement container = new DivElement();
194 214
195 void _visit(Uri uri) { 215 void _visit(Uri uri) {
196 super._visit(uri); 216 super._visit(uri);
197 getIsolate(uri).then((isolate) { 217 getIsolate(uri).then((isolate) {
198 var objectId = uri.queryParameters['objectId']; 218 var objectId = uri.queryParameters['objectId'];
199 if (objectId == null) { 219 if (objectId == null) {
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 element = new TimelinePageElement(app.vm, app.events, app.notifications, 870 element = new TimelinePageElement(app.vm, app.events, app.notifications,
851 queue: app.queue); 871 queue: app.queue);
852 } 872 }
853 873
854 void _visit(Uri uri) { 874 void _visit(Uri uri) {
855 assert(canVisit(uri)); 875 assert(canVisit(uri));
856 } 876 }
857 877
858 bool canVisit(Uri uri) => uri.path == 'timeline'; 878 bool canVisit(Uri uri) => uri.path == 'timeline';
859 } 879 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/app/application.dart ('k') | runtime/observatory/lib/src/cpu_profile/cpu_profile.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698