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

Unified Diff: runtime/vm/parser.cc

Issue 1513503003: Add timeline events for CompileClass and CompileTopLevel. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: not a macro Created 5 years 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/compiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 40bc39ed53be57eda6367f55a1991cca8590682f..284e6a906273d8ce90ccf30d3879055035005c05 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -453,6 +453,17 @@ void Parser::ParseCompilationUnit(const Library& library,
ASSERT(thread->long_jump_base()->IsSafeToJump());
CSTAT_TIMER_SCOPE(thread, parser_timer);
VMTagScope tagScope(thread, VMTag::kCompileTopLevelTagId);
+ TimelineDurationScope tds(thread,
+ thread->isolate()->GetCompilerStream(),
+ "CompileTopLevel");
+ if (tds.enabled()) {
+ tds.SetNumArguments(1);
+ tds.CopyArgument(
+ 0,
+ "script",
+ const_cast<char*>(String::Handle(script.url()).ToCString()));
+ }
+
Parser parser(script, library, 0);
parser.ParseTopLevel();
}
« no previous file with comments | « runtime/vm/compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698