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

Side by Side Diff: runtime/observatory/lib/src/elements/cpu_profile.dart

Issue 1288853002: Fix cpu profile table (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 unified diff | Download patch
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 library cpu_profile_element; 5 library cpu_profile_element;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'observatory_element.dart'; 9 import 'observatory_element.dart';
10 import 'package:observatory/service.dart'; 10 import 'package:observatory/service.dart';
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 var response; 451 var response;
452 if (allocationProfileClass != null) { 452 if (allocationProfileClass != null) {
453 response = 453 response =
454 await allocationProfileClass.getAllocationSamples(tagSelector); 454 await allocationProfileClass.getAllocationSamples(tagSelector);
455 } else { 455 } else {
456 var params = { 'tags': tagSelector }; 456 var params = { 'tags': tagSelector };
457 response = await isolate.invokeRpc('_getCpuProfile', params); 457 response = await isolate.invokeRpc('_getCpuProfile', params);
458 } 458 }
459 await _changeState(kLoadingState); 459 await _changeState(kLoadingState);
460 profile.load(isolate, response); 460 profile.load(isolate, response);
461 profile.buildFunctionCallerAndCallees();
461 _update(profile); 462 _update(profile);
462 await _changeState(kLoadedState); 463 await _changeState(kLoadedState);
463 // Notify listener. 464 // Notify listener.
464 onSampleBufferUpdate(profile); 465 onSampleBufferUpdate(profile);
465 return profile; 466 return profile;
466 } catch (e, st) { 467 } catch (e, st) {
467 if (e is ServerRpcException) { 468 if (e is ServerRpcException) {
468 ServerRpcException se = e; 469 ServerRpcException se = e;
469 if (se.code == ServerRpcException.kFeatureDisabled) { 470 if (se.code == ServerRpcException.kFeatureDisabled) {
470 await _changeState(kDisabledState); 471 await _changeState(kDisabledState);
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 return; 1190 return;
1190 } 1191 }
1191 var tree = profile.loadCodeTree(exclusive ? 'exclusive' : 'inclusive'); 1192 var tree = profile.loadCodeTree(exclusive ? 'exclusive' : 'inclusive');
1192 if (tree == null) { 1193 if (tree == null) {
1193 return; 1194 return;
1194 } 1195 }
1195 var rootRow = new CodeProfileTreeRow(codeTree, null, profile, tree.root); 1196 var rootRow = new CodeProfileTreeRow(codeTree, null, profile, tree.root);
1196 codeTree.initialize(rootRow); 1197 codeTree.initialize(rootRow);
1197 } 1198 }
1198 } 1199 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/cpu_profile/cpu_profile.dart ('k') | runtime/observatory/lib/src/elements/nav_bar.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698