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

Side by Side Diff: runtime/bin/vmservice/client/lib/src/observatory_elements/heap_profile.dart

Issue 168833005: Add callers and callees to profiler output (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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) 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 library heap_profile_element; 5 library heap_profile_element;
6 6
7 import 'dart:async';
8 import 'dart:html'; 7 import 'dart:html';
9 import 'package:logging/logging.dart'; 8 import 'package:logging/logging.dart';
10 import 'package:polymer/polymer.dart'; 9 import 'package:polymer/polymer.dart';
11 import 'observatory_element.dart'; 10 import 'observatory_element.dart';
12 11
13 /// Displays an Error response. 12 /// Displays an Error response.
14 @CustomTag('heap-profile') 13 @CustomTag('heap-profile')
15 class HeapProfileElement extends ObservatoryElement { 14 class HeapProfileElement extends ObservatoryElement {
16 // Indexes into VM provided map. 15 // Indexes into VM provided map.
17 static const ALLOCATED_BEFORE_GC = 0; 16 static const ALLOCATED_BEFORE_GC = 0;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 return v['new'][LIVE_AFTER_GC_SIZE]; 125 return v['new'][LIVE_AFTER_GC_SIZE];
127 case 5: 126 case 5:
128 return v['old'][LIVE_AFTER_GC_SIZE] + v['old'][ALLOCATED_SINCE_GC_SIZE]; 127 return v['old'][LIVE_AFTER_GC_SIZE] + v['old'][ALLOCATED_SINCE_GC_SIZE];
129 case 6: 128 case 6:
130 return v['old'][ALLOCATED_SINCE_GC_SIZE]; 129 return v['old'][ALLOCATED_SINCE_GC_SIZE];
131 case 7: 130 case 7:
132 return v['old'][ALLOCATED_BEFORE_GC_SIZE]; 131 return v['old'][ALLOCATED_BEFORE_GC_SIZE];
133 case 8: 132 case 8:
134 return v['old'][LIVE_AFTER_GC_SIZE]; 133 return v['old'][LIVE_AFTER_GC_SIZE];
135 } 134 }
135 return null;
136 } 136 }
137 137
138 void refreshData(Event e, var detail, Node target) { 138 void refreshData(Event e, var detail, Node target) {
139 var isolateId = app.locationManager.currentIsolateId(); 139 var isolateId = app.locationManager.currentIsolateId();
140 var isolate = app.isolateManager.getIsolate(isolateId); 140 var isolate = app.isolateManager.getIsolate(isolateId);
141 if (isolate == null) { 141 if (isolate == null) {
142 Logger.root.info('No isolate found.'); 142 Logger.root.info('No isolate found.');
143 return; 143 return;
144 } 144 }
145 var request = '/$isolateId/allocationprofile'; 145 var request = '/$isolateId/allocationprofile';
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 180
181 @observable String formattedTotalCollectionTime(bool newSpace) { 181 @observable String formattedTotalCollectionTime(bool newSpace) {
182 if (profile == null) { 182 if (profile == null) {
183 return ''; 183 return '';
184 } 184 }
185 String space = newSpace ? 'new' : 'old'; 185 String space = newSpace ? 'new' : 'old';
186 Map heap = profile['heaps'][space]; 186 Map heap = profile['heaps'][space];
187 return '${ObservatoryApplication.timeUnits(heap['time'])} secs'; 187 return '${ObservatoryApplication.timeUnits(heap['time'])} secs';
188 } 188 }
189 } 189 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698