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

Side by Side Diff: runtime/bin/vmservice/client/lib/src/service/cache.dart

Issue 201213004: Use VM tag in profile and add stack trace trie (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | 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 part of service; 5 part of service;
6 6
7 /// Abstract [ServiceObjectCache]. 7 /// Abstract [ServiceObjectCache].
8 abstract class ServiceObjectCache<T extends ServiceObject> { 8 abstract class ServiceObjectCache<T extends ServiceObject> {
9 final Isolate isolate; 9 final Isolate isolate;
10 final _cache = new ObservableMap<String, T>(); 10 final _cache = new ObservableMap<String, T>();
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 codeList.sort((Code a, Code b) { 106 codeList.sort((Code a, Code b) {
107 return b.exclusiveTicks - a.exclusiveTicks; 107 return b.exclusiveTicks - a.exclusiveTicks;
108 }); 108 });
109 if (codeList.length < count) { 109 if (codeList.length < count) {
110 return codeList; 110 return codeList;
111 } 111 }
112 codeList.length = count; 112 codeList.length = count;
113 return codeList; 113 return codeList;
114 } 114 }
115 115
116 Code tagRoot() {
117 return _cache['code/tag-0'];
118 }
119
116 void _resetProfileData() { 120 void _resetProfileData() {
117 _cache.forEach((k, Code code) { 121 _cache.forEach((k, Code code) {
118 code.resetProfileData(); 122 code.resetProfileData();
119 }); 123 });
120 } 124 }
121 125
122 void _updateProfileData(ServiceMap profile, List<Code> codeTable) { 126 void _updateProfileData(ServiceMap profile, List<Code> codeTable) {
123 var codeRegions = profile['codes']; 127 var codeRegions = profile['codes'];
124 var sampleCount = profile['samples']; 128 var sampleCount = profile['samples'];
125 for (var codeRegion in codeRegions) { 129 for (var codeRegion in codeRegions) {
(...skipping 21 matching lines...) Expand all
147 151
148 bool cachesType(String type) => ServiceObject.stripRef(type) == 'Function'; 152 bool cachesType(String type) => ServiceObject.stripRef(type) == 'Function';
149 ServiceMap _upgrade(ObservableMap obj) => 153 ServiceMap _upgrade(ObservableMap obj) =>
150 new ServiceMap.fromMap(isolate, obj); 154 new ServiceMap.fromMap(isolate, obj);
151 155
152 static final RegExp _matcher = 156 static final RegExp _matcher =
153 new RegExp(r'^functions/native-.+|' 157 new RegExp(r'^functions/native-.+|'
154 r'^functions/collected-.+|' 158 r'^functions/collected-.+|'
155 r'^functions/reused-.+|' 159 r'^functions/reused-.+|'
156 r'^functions/stub-.+|' 160 r'^functions/stub-.+|'
161 r'^functions/tag-.+|'
157 r'^classes/\d+/functions/.+|' 162 r'^classes/\d+/functions/.+|'
158 r'^classes/\d+/closures/.+|' 163 r'^classes/\d+/closures/.+|'
159 r'^classes/\d+/implicit_closures/.+|' 164 r'^classes/\d+/implicit_closures/.+|'
160 r'^classes/\d+/dispatchers/.+'); 165 r'^classes/\d+/dispatchers/.+');
161 } 166 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698