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

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

Issue 137483010: Add more timing information in the VM to track time spent is dart code Vs native code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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/dart_entry.cc ('k') | runtime/vm/exceptions.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "include/dart_debugger_api.h" 5 #include "include/dart_debugger_api.h"
6 6
7 #include "vm/class_finalizer.h" 7 #include "vm/class_finalizer.h"
8 #include "vm/compiler.h" 8 #include "vm/compiler.h"
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_api_state.h" 10 #include "vm/dart_api_state.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 static Dart_BreakpointResolvedHandler* bp_resolved_handler = NULL; 105 static Dart_BreakpointResolvedHandler* bp_resolved_handler = NULL;
106 static Dart_ExceptionThrownHandler* exc_thrown_handler = NULL; 106 static Dart_ExceptionThrownHandler* exc_thrown_handler = NULL;
107 static Dart_IsolateEventHandler* isolate_event_handler = NULL; 107 static Dart_IsolateEventHandler* isolate_event_handler = NULL;
108 108
109 static Dart_BreakpointHandler* legacy_bp_handler = NULL; 109 static Dart_BreakpointHandler* legacy_bp_handler = NULL;
110 110
111 111
112 static void DebuggerEventHandler(Debugger::DebuggerEvent* event) { 112 static void DebuggerEventHandler(Debugger::DebuggerEvent* event) {
113 Isolate* isolate = Isolate::Current(); 113 Isolate* isolate = Isolate::Current();
114 ASSERT(isolate != NULL); 114 ASSERT(isolate != NULL);
115 VmToNativeTimerScope timer(isolate);
115 ASSERT(isolate->debugger() != NULL); 116 ASSERT(isolate->debugger() != NULL);
116 Dart_EnterScope(); 117 Dart_EnterScope();
117 Dart_IsolateId isolate_id = isolate->debugger()->GetIsolateId(); 118 Dart_IsolateId isolate_id = isolate->debugger()->GetIsolateId();
118 if (event->type == Debugger::kBreakpointReached) { 119 if (event->type == Debugger::kBreakpointReached) {
119 if (legacy_bp_handler != NULL) { 120 if (legacy_bp_handler != NULL) {
120 Dart_StackTrace stack_trace = 121 Dart_StackTrace stack_trace =
121 reinterpret_cast<Dart_StackTrace>(isolate->debugger()->StackTrace()); 122 reinterpret_cast<Dart_StackTrace>(isolate->debugger()->StackTrace());
122 (*legacy_bp_handler)(isolate_id, NULL, stack_trace); 123 (*legacy_bp_handler)(isolate_id, NULL, stack_trace);
123 } else if (paused_event_handler != NULL) { 124 } else if (paused_event_handler != NULL) {
124 Dart_CodeLocation location; 125 Dart_CodeLocation location;
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 return Api::CastIsolate(isolate); 973 return Api::CastIsolate(isolate);
973 } 974 }
974 975
975 976
976 DART_EXPORT Dart_IsolateId Dart_GetIsolateId(Dart_Isolate dart_isolate) { 977 DART_EXPORT Dart_IsolateId Dart_GetIsolateId(Dart_Isolate dart_isolate) {
977 Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate); 978 Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate);
978 return isolate->debugger()->GetIsolateId(); 979 return isolate->debugger()->GetIsolateId();
979 } 980 }
980 981
981 } // namespace dart 982 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_entry.cc ('k') | runtime/vm/exceptions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698