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

Side by Side Diff: runtime/vm/isolate.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
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/isolate.h" 5 #include "vm/isolate.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "platform/json.h" 9 #include "platform/json.h"
10 #include "lib/mirrors.h" 10 #include "lib/mirrors.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // Allow the embedder to handle message notification. 97 // Allow the embedder to handle message notification.
98 (*callback)(Api::CastIsolate(isolate_)); 98 (*callback)(Api::CastIsolate(isolate_));
99 } 99 }
100 } 100 }
101 101
102 102
103 bool IsolateMessageHandler::HandleMessage(Message* message) { 103 bool IsolateMessageHandler::HandleMessage(Message* message) {
104 StartIsolateScope start_scope(isolate_); 104 StartIsolateScope start_scope(isolate_);
105 StackZone zone(isolate_); 105 StackZone zone(isolate_);
106 HandleScope handle_scope(isolate_); 106 HandleScope handle_scope(isolate_);
107 // TODO(turnidge): Rework collection total dart execution. This can
108 // overcount when other things (gc, compilation) are active.
109 TIMERSCOPE(time_dart_execution);
110 107
111 // If the message is in band we lookup the receive port to dispatch to. If 108 // If the message is in band we lookup the receive port to dispatch to. If
112 // the receive port is closed, we drop the message without deserializing it. 109 // the receive port is closed, we drop the message without deserializing it.
113 Object& receive_port = Object::Handle(); 110 Object& receive_port = Object::Handle();
114 if (!message->IsOOB()) { 111 if (!message->IsOOB()) {
115 receive_port = DartLibraryCalls::LookupReceivePort(message->dest_port()); 112 receive_port = DartLibraryCalls::LookupReceivePort(message->dest_port());
116 if (receive_port.IsError()) { 113 if (receive_port.IsError()) {
117 return ProcessUnhandledException(Object::null_instance(), 114 return ProcessUnhandledException(Object::null_instance(),
118 Error::Cast(receive_port)); 115 Error::Cast(receive_port));
119 } 116 }
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 return func.raw(); 968 return func.raw();
972 } 969 }
973 970
974 971
975 void IsolateSpawnState::Cleanup() { 972 void IsolateSpawnState::Cleanup() {
976 SwitchIsolateScope switch_scope(isolate()); 973 SwitchIsolateScope switch_scope(isolate());
977 Dart::ShutdownIsolate(); 974 Dart::ShutdownIsolate();
978 } 975 }
979 976
980 } // namespace dart 977 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698