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

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

Issue 143973005: Code coverage in Observatory (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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/coverage.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/cpu.h" 11 #include "vm/cpu.h"
11 #include "vm/dart_api_impl.h" 12 #include "vm/dart_api_impl.h"
12 #include "vm/dart_entry.h" 13 #include "vm/dart_entry.h"
13 #include "vm/debugger.h" 14 #include "vm/debugger.h"
14 #include "vm/heap_histogram.h" 15 #include "vm/heap_histogram.h"
15 #include "vm/isolate.h" 16 #include "vm/isolate.h"
16 #include "vm/message.h" 17 #include "vm/message.h"
17 #include "vm/native_entry.h" 18 #include "vm/native_entry.h"
18 #include "vm/native_arguments.h" 19 #include "vm/native_arguments.h"
19 #include "vm/object.h" 20 #include "vm/object.h"
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 code.PrintToJSONStream(js, false); 1037 code.PrintToJSONStream(js, false);
1037 return true; 1038 return true;
1038 } 1039 }
1039 1040
1040 1041
1041 static bool HandleProfile(Isolate* isolate, JSONStream* js) { 1042 static bool HandleProfile(Isolate* isolate, JSONStream* js) {
1042 Profiler::PrintToJSONStream(isolate, js, true); 1043 Profiler::PrintToJSONStream(isolate, js, true);
1043 return true; 1044 return true;
1044 } 1045 }
1045 1046
1047 static bool HandleCoverage(Isolate* isolate, JSONStream* js) {
1048 CodeCoverage::PrintToJSONStream(isolate, js);
1049 return true;
1050 }
1051
1046 1052
1047 static IsolateMessageHandlerEntry isolate_handlers[] = { 1053 static IsolateMessageHandlerEntry isolate_handlers[] = {
1048 { "_echo", HandleIsolateEcho }, 1054 { "_echo", HandleIsolateEcho },
1049 { "classes", HandleClasses }, 1055 { "classes", HandleClasses },
1050 { "code", HandleCode }, 1056 { "code", HandleCode },
1057 { "coverage", HandleCoverage },
1051 { "debug", HandleDebug }, 1058 { "debug", HandleDebug },
1052 { "libraries", HandleLibraries }, 1059 { "libraries", HandleLibraries },
1053 { "library", HandleLibrary }, 1060 { "library", HandleLibrary },
1054 { "name", HandleName }, 1061 { "name", HandleName },
1055 { "objecthistogram", HandleObjectHistogram}, 1062 { "objecthistogram", HandleObjectHistogram},
1056 { "objects", HandleObjects }, 1063 { "objects", HandleObjects },
1057 { "profile", HandleProfile }, 1064 { "profile", HandleProfile },
1058 { "scripts", HandleScripts }, 1065 { "scripts", HandleScripts },
1059 { "stacktrace", HandleStackTrace }, 1066 { "stacktrace", HandleStackTrace },
1060 }; 1067 };
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 for (intptr_t i = 0; i < num_message_handlers; i++) { 1162 for (intptr_t i = 0; i < num_message_handlers; i++) {
1156 const RootMessageHandlerEntry& entry = root_handlers[i]; 1163 const RootMessageHandlerEntry& entry = root_handlers[i];
1157 if (!strcmp(command, entry.command)) { 1164 if (!strcmp(command, entry.command)) {
1158 return entry.handler; 1165 return entry.handler;
1159 } 1166 }
1160 } 1167 }
1161 return NULL; 1168 return NULL;
1162 } 1169 }
1163 1170
1164 } // namespace dart 1171 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/coverage.cc ('k') | runtime/vm/service_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698