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

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

Issue 1273323002: Make allocation profile configurable (tags, function v. code) (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
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/class_view.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 class CodeCallTreeNode { 7 class CodeCallTreeNode {
8 final ProfileCode profileCode; 8 final ProfileCode profileCode;
9 final int count; 9 final int count;
10 double get percentage => _percentage; 10 double get percentage => _percentage;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 } 128 }
129 // If the code's function isn't this function. 129 // If the code's function isn't this function.
130 if (profileCode.code.function != profileFunction.function) { 130 if (profileCode.code.function != profileFunction.function) {
131 return true; 131 return true;
132 } 132 }
133 } 133 }
134 return false; 134 return false;
135 } 135 }
136 136
137 setCodeAttributes() { 137 setCodeAttributes() {
138 if (hasOptimizedCode()) {
139 attributes.add('optimized');
140 }
141 if (hasUnoptimizedCode()) {
142 attributes.add('unoptimized');
143 }
144 if (isInlined()) {
145 attributes.add('inlined');
146 }
147 } 138 }
148 } 139 }
149 140
150 /// Predicate filter function. Returns true if path from root to [node] and all 141 /// Predicate filter function. Returns true if path from root to [node] and all
151 /// of [node]'s children should be added to the filtered tree. 142 /// of [node]'s children should be added to the filtered tree.
152 typedef bool FunctionCallTreeNodeFilter(FunctionCallTreeNode node); 143 typedef bool FunctionCallTreeNodeFilter(FunctionCallTreeNode node);
153 144
154 /// Build a filter version of a FunctionCallTree. 145 /// Build a filter version of a FunctionCallTree.
155 class _FilteredFunctionCallTreeBuilder { 146 class _FilteredFunctionCallTreeBuilder {
156 /// The filter. 147 /// The filter.
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 int approximateMillisecondsForCount(count) { 860 int approximateMillisecondsForCount(count) {
870 var MICROSECONDS_PER_MILLISECOND = 1000.0; 861 var MICROSECONDS_PER_MILLISECOND = 1000.0;
871 return (count * samplePeriod) ~/ MICROSECONDS_PER_MILLISECOND; 862 return (count * samplePeriod) ~/ MICROSECONDS_PER_MILLISECOND;
872 } 863 }
873 864
874 double approximateSecondsForCount(count) { 865 double approximateSecondsForCount(count) {
875 var MICROSECONDS_PER_SECOND = 1000000.0; 866 var MICROSECONDS_PER_SECOND = 1000000.0;
876 return (count * samplePeriod) / MICROSECONDS_PER_SECOND; 867 return (count * samplePeriod) / MICROSECONDS_PER_SECOND;
877 } 868 }
878 } 869 }
OLDNEW
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/class_view.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698