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

Unified Diff: runtime/vm/dart_entry.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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/dart_entry.cc
===================================================================
--- runtime/vm/dart_entry.cc (revision 32362)
+++ runtime/vm/dart_entry.cc (working copy)
@@ -52,23 +52,25 @@
}
}
// Now Call the invoke stub which will invoke the dart function.
+ Isolate* isolate = Isolate::Current();
+ TIMERSCOPE(isolate, time_dart_execution);
invokestub entrypoint = reinterpret_cast<invokestub>(
StubCode::InvokeDartCodeEntryPoint());
- const Code& code = Code::Handle(function.CurrentCode());
+ const Code& code = Code::Handle(isolate, function.CurrentCode());
ASSERT(!code.IsNull());
- ASSERT(Isolate::Current()->no_callback_scope_depth() == 0);
+ ASSERT(isolate->no_callback_scope_depth() == 0);
#if defined(USING_SIMULATOR)
- return bit_copy<RawObject*, int64_t>(Simulator::Current()->Call(
- reinterpret_cast<int32_t>(entrypoint),
- static_cast<int32_t>(code.EntryPoint()),
- reinterpret_cast<int32_t>(&arguments_descriptor),
- reinterpret_cast<int32_t>(&arguments),
- reinterpret_cast<int32_t>(&context)));
+ return bit_copy<RawObject*, int64_t>(Simulator::Current()->Call(
+ reinterpret_cast<int32_t>(entrypoint),
+ static_cast<int32_t>(code.EntryPoint()),
+ reinterpret_cast<int32_t>(&arguments_descriptor),
+ reinterpret_cast<int32_t>(&arguments),
+ reinterpret_cast<int32_t>(&context)));
#else
- return entrypoint(code.EntryPoint(),
- arguments_descriptor,
- arguments,
- context);
+ return entrypoint(code.EntryPoint(),
+ arguments_descriptor,
+ arguments,
+ context);
#endif
}

Powered by Google App Engine
This is Rietveld 408576698