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

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
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/precompiler.cc » ('j') | 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 6041b49aa666975f668883c70cfca3d8e0d8ca3c..2ec2a489374abba8da7ebbeb7afe77f8a30383d8 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,
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/precompiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698