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

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

Issue 2273993002: Converted Observatory cpu-profile-table element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Addressed comments Created 4 years, 3 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 cpu_profiler; 5 part of cpu_profiler;
6 6
7 abstract class CallTreeNode<NodeT extends M.CallTreeNode> 7 abstract class CallTreeNode<NodeT extends M.CallTreeNode>
8 implements M.CallTreeNode { 8 implements M.CallTreeNode {
9 final List<NodeT> children; 9 final List<NodeT> children;
10 final int count; 10 final int count;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 final int ticks; 97 final int ticks;
98 FunctionCallTreeNodeCode(this.code, this.ticks); 98 FunctionCallTreeNodeCode(this.code, this.ticks);
99 } 99 }
100 100
101 class FunctionCallTreeNode extends CallTreeNode { 101 class FunctionCallTreeNode extends CallTreeNode {
102 final ProfileFunction profileFunction; 102 final ProfileFunction profileFunction;
103 final codes = new List<FunctionCallTreeNodeCode>(); 103 final codes = new List<FunctionCallTreeNodeCode>();
104 int _totalCodeTicks = 0; 104 int _totalCodeTicks = 0;
105 int get totalCodesTicks => _totalCodeTicks; 105 int get totalCodesTicks => _totalCodeTicks;
106 106
107 String get name => profileFunction.function.name; 107 String get name => M.getFunctionFullName(profileFunction.function);
108 Object get profileData => profileFunction; 108 Object get profileData => profileFunction;
109 109
110 FunctionCallTreeNode(this.profileFunction, int count) 110 FunctionCallTreeNode(this.profileFunction, int count)
111 : super(new List<FunctionCallTreeNode>(), count) { 111 : super(new List<FunctionCallTreeNode>(), count) {
112 profileFunction._addKindBasedAttributes(attributes); 112 profileFunction._addKindBasedAttributes(attributes);
113 } 113 }
114 114
115 // Does this function have an optimized version of itself? 115 // Does this function have an optimized version of itself?
116 bool hasOptimizedCode() { 116 bool hasOptimizedCode() {
117 for (var nodeCode in codes) { 117 for (var nodeCode in codes) {
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 } 966 }
967 967
968 int approximateMillisecondsForCount(count) { 968 int approximateMillisecondsForCount(count) {
969 return (count * samplePeriod) ~/ Duration.MICROSECONDS_PER_MILLISECOND; 969 return (count * samplePeriod) ~/ Duration.MICROSECONDS_PER_MILLISECOND;
970 } 970 }
971 971
972 double approximateSecondsForCount(count) { 972 double approximateSecondsForCount(count) {
973 return (count * samplePeriod) / Duration.MICROSECONDS_PER_SECOND; 973 return (count * samplePeriod) / Duration.MICROSECONDS_PER_SECOND;
974 } 974 }
975 } 975 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/app/page.dart ('k') | runtime/observatory/lib/src/elements/containers/virtual_collection.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698