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

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
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/debugger_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_entry.cc
===================================================================
--- runtime/vm/dart_entry.cc (revision 32801)
+++ runtime/vm/dart_entry.cc (working copy)
@@ -13,6 +13,7 @@
#include "vm/simulator.h"
#include "vm/stub_code.h"
#include "vm/symbols.h"
+#include "vm/timer_scope.h"
namespace dart {
@@ -52,23 +53,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
}
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/debugger_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698