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

Unified Diff: runtime/vm/parser.cc

Issue 1523833003: Add more compiler timeline durations (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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/flow_graph_type_propagator.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 89cf98887ea8f4372cb8eef0662756d43486e83e..ce5c0ef18f0ab8f283dfb7c3a812130331eb411a 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -817,6 +817,16 @@ void Parser::ParseClass(const Class& cls) {
Thread* thread = Thread::Current();
Zone* zone = thread->zone();
const int64_t num_tokes_before = STAT_VALUE(thread, num_tokens_consumed);
+ TimelineDurationScope tds(thread,
+ thread->isolate()->GetCompilerStream(),
+ "ParseClass");
+ if (tds.enabled()) {
+ tds.SetNumArguments(1);
+ tds.CopyArgument(
+ 0,
+ "class",
+ const_cast<char*>(String::Handle(cls.Name()).ToCString()));
+ }
if (!cls.is_synthesized_class()) {
ASSERT(thread->long_jump_base()->IsSafeToJump());
CSTAT_TIMER_SCOPE(thread, parser_timer);
@@ -926,12 +936,21 @@ void Parser::ParseFunction(ParsedFunction* parsed_function) {
INC_STAT(thread, num_functions_parsed, 1);
VMTagScope tagScope(thread, VMTag::kCompileParseFunctionTagId,
FLAG_profile_vm);
-
+ TimelineDurationScope tds(thread,
+ thread->isolate()->GetCompilerStream(),
+ "ParseFunction");
ASSERT(thread->long_jump_base()->IsSafeToJump());
ASSERT(parsed_function != NULL);
const Function& func = parsed_function->function();
const Script& script = Script::Handle(zone, func.script());
Parser parser(script, parsed_function, func.token_pos());
+ if (tds.enabled()) {
+ tds.SetNumArguments(1);
+ tds.CopyArgument(
+ 0,
+ "function",
+ const_cast<char*>(String::Handle(func.name()).ToCString()));
+ }
SequenceNode* node_sequence = NULL;
switch (func.kind()) {
case RawFunction::kClosureFunction:
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698