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

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
« no previous file with comments | « runtime/vm/profiler.cc ('k') | runtime/vm/service_test.cc » ('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) 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 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 } 1367 }
1368 PrintError(js, "Could not find code with id: %s", command); 1368 PrintError(js, "Could not find code with id: %s", command);
1369 return true; 1369 return true;
1370 } 1370 }
1371 1371
1372 1372
1373 static bool HandleProfile(Isolate* isolate, JSONStream* js) { 1373 static bool HandleProfile(Isolate* isolate, JSONStream* js) {
1374 // A full profile includes disassembly of all Dart code objects. 1374 // A full profile includes disassembly of all Dart code objects.
1375 // TODO(johnmccutchan): Add sub command to trigger full code dump. 1375 // TODO(johnmccutchan): Add sub command to trigger full code dump.
1376 bool full_profile = false; 1376 bool full_profile = false;
1377 Profiler::PrintToJSONStream(isolate, js, full_profile); 1377 const char* tags_option = js->LookupOption("tags");
1378 bool use_tags = true;
1379 if (tags_option != NULL) {
1380 if (strcmp("hide", tags_option) != 0) {
1381 PrintError(js, "Invalid tags option value: %s\n", tags_option);
1382 return true;
1383 }
1384 use_tags = false;
1385 }
1386 Profiler::PrintToJSONStream(isolate, js, full_profile, use_tags);
1378 return true; 1387 return true;
1379 } 1388 }
1380 1389
1381 static bool HandleCoverage(Isolate* isolate, JSONStream* js) { 1390 static bool HandleCoverage(Isolate* isolate, JSONStream* js) {
1382 CodeCoverage::PrintToJSONStream(isolate, js); 1391 CodeCoverage::PrintToJSONStream(isolate, js);
1383 return true; 1392 return true;
1384 } 1393 }
1385 1394
1386 1395
1387 static bool HandleAllocationProfile(Isolate* isolate, JSONStream* js) { 1396 static bool HandleAllocationProfile(Isolate* isolate, JSONStream* js) {
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 while (current != NULL) { 1655 while (current != NULL) {
1647 if (strcmp(name, current->name()) == 0) { 1656 if (strcmp(name, current->name()) == 0) {
1648 return current; 1657 return current;
1649 } 1658 }
1650 current = current->next(); 1659 current = current->next();
1651 } 1660 }
1652 return NULL; 1661 return NULL;
1653 } 1662 }
1654 1663
1655 } // namespace dart 1664 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/profiler.cc ('k') | runtime/vm/service_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698