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

Side by Side Diff: runtime/vm/service.cc

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
« runtime/vm/profiler.cc ('K') | « runtime/vm/profiler.cc ('k') | no next file » | 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) 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 #include "vm/service.h" 5 #include "vm/service.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/coverage.h" 10 #include "vm/coverage.h"
(...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after
1303 } 1303 }
1304 PrintError(js, "Could not find code with id: %s", command); 1304 PrintError(js, "Could not find code with id: %s", command);
1305 return true; 1305 return true;
1306 } 1306 }
1307 1307
1308 1308
1309 static bool HandleProfile(Isolate* isolate, JSONStream* js) { 1309 static bool HandleProfile(Isolate* isolate, JSONStream* js) {
1310 // A full profile includes disassembly of all Dart code objects. 1310 // A full profile includes disassembly of all Dart code objects.
1311 // TODO(johnmccutchan): Add sub command to trigger full code dump. 1311 // TODO(johnmccutchan): Add sub command to trigger full code dump.
1312 bool full_profile = false; 1312 bool full_profile = false;
1313 Profiler::PrintToJSONStream(isolate, js, full_profile); 1313 const char* tags_option = js->LookupOption("tags");
1314 bool use_tags = true;
1315 if ((tags_option != NULL) && (strcmp("hide", tags_option) == 0)) {
1316 use_tags = false;
1317 }
turnidge 2014/03/17 21:19:31 Does it make sense to do any unit testing of this
Cutch 2014/03/18 14:39:19 Added a unit test for the profile command and an e
1318 Profiler::PrintToJSONStream(isolate, js, full_profile, use_tags);
1314 return true; 1319 return true;
1315 } 1320 }
1316 1321
1317 static bool HandleCoverage(Isolate* isolate, JSONStream* js) { 1322 static bool HandleCoverage(Isolate* isolate, JSONStream* js) {
1318 CodeCoverage::PrintToJSONStream(isolate, js); 1323 CodeCoverage::PrintToJSONStream(isolate, js);
1319 return true; 1324 return true;
1320 } 1325 }
1321 1326
1322 1327
1323 static bool HandleAllocationProfile(Isolate* isolate, JSONStream* js) { 1328 static bool HandleAllocationProfile(Isolate* isolate, JSONStream* js) {
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1582 while (current != NULL) { 1587 while (current != NULL) {
1583 if (strcmp(name, current->name()) == 0) { 1588 if (strcmp(name, current->name()) == 0) {
1584 return current; 1589 return current;
1585 } 1590 }
1586 current = current->next(); 1591 current = current->next();
1587 } 1592 }
1588 return NULL; 1593 return NULL;
1589 } 1594 }
1590 1595
1591 } // namespace dart 1596 } // namespace dart
OLDNEW
« runtime/vm/profiler.cc ('K') | « runtime/vm/profiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698