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

Unified Diff: runtime/vm/parser.cc

Issue 1970363002: Add timeline events for compiling static initializers and writing full snapshots. Remove timeline e… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 0ace98bb47bb890adbf83034b8b29c30ea99aef4..d370b813176b135b06f6082299f60d0626a4a02f 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -514,8 +514,8 @@ void Parser::ParseCompilationUnit(const Library& library,
Thread* thread = Thread::Current();
ASSERT(thread->long_jump_base()->IsSafeToJump());
CSTAT_TIMER_SCOPE(thread, parser_timer);
- VMTagScope tagScope(thread, VMTag::kCompileTopLevelTagId);
#ifndef PRODUCT
+ VMTagScope tagScope(thread, VMTag::kCompileTopLevelTagId);
TimelineDurationScope tds(thread,
Timeline::GetCompilerStream(),
"CompileTopLevel");
@@ -989,9 +989,9 @@ void Parser::ParseFunction(ParsedFunction* parsed_function) {
Zone* zone = thread->zone();
CSTAT_TIMER_SCOPE(thread, parser_timer);
INC_STAT(thread, num_functions_parsed, 1);
+#ifndef PRODUCT
VMTagScope tagScope(thread, VMTag::kCompileParseFunctionTagId,
FLAG_profile_vm);
-#ifndef PRODUCT
TimelineDurationScope tds(thread,
Timeline::GetCompilerStream(),
"ParseFunction");
@@ -1234,6 +1234,12 @@ ParsedFunction* Parser::ParseStaticFieldInitializer(const Field& field) {
Thread* thread = Thread::Current();
// TODO(koda): Should there be a StackZone here?
Zone* zone = thread->zone();
+#ifndef PRODUCT
+ VMTagScope tagScope(thread, VMTag::kCompileParseFunctionTagId,
+ FLAG_profile_vm);
+ TimelineDurationScope tds(thread, Timeline::GetCompilerStream(),
+ "ParseStaticFieldInitializer");
+#endif // !PRODUCT
const String& field_name = String::Handle(zone, field.name());
String& init_name = String::Handle(zone,

Powered by Google App Engine
This is Rietveld 408576698