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

Unified Diff: runtime/vm/parser.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/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 32362)
+++ runtime/vm/parser.cc (working copy)
@@ -353,8 +353,9 @@
void Parser::ParseCompilationUnit(const Library& library,
const Script& script) {
- ASSERT(Isolate::Current()->long_jump_base()->IsSafeToJump());
- TimerScope timer(FLAG_compiler_stats, &CompilerStats::parser_timer);
+ Isolate* isolate = Isolate::Current();
+ ASSERT(isolate->long_jump_base()->IsSafeToJump());
+ TimerScope timer(FLAG_compiler_stats, &CompilerStats::parser_timer, isolate);
Parser parser(script, library, 0);
parser.ParseTopLevel();
}
@@ -702,8 +703,10 @@
void Parser::ParseClass(const Class& cls) {
if (!cls.is_synthesized_class()) {
- TimerScope timer(FLAG_compiler_stats, &CompilerStats::parser_timer);
Isolate* isolate = Isolate::Current();
+ TimerScope timer(FLAG_compiler_stats,
+ &CompilerStats::parser_timer,
+ isolate);
ASSERT(isolate->long_jump_base()->IsSafeToJump());
const Script& script = Script::Handle(isolate, cls.script());
const Library& lib = Library::Handle(isolate, cls.library());
@@ -760,8 +763,8 @@
void Parser::ParseFunction(ParsedFunction* parsed_function) {
- TimerScope timer(FLAG_compiler_stats, &CompilerStats::parser_timer);
Isolate* isolate = Isolate::Current();
+ TimerScope timer(FLAG_compiler_stats, &CompilerStats::parser_timer, isolate);
ASSERT(isolate->long_jump_base()->IsSafeToJump());
ASSERT(parsed_function != NULL);
const Function& func = parsed_function->function();

Powered by Google App Engine
This is Rietveld 408576698