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

Unified Diff: src/parsing/preparser.cc

Issue 2509683002: [counters] Use separate counters for background parsing (Closed)
Patch Set: using const arrays instead of two-level ternary syntax. Created 4 years, 1 month 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 | « src/parsing/preparser.h ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/preparser.cc
diff --git a/src/parsing/preparser.cc b/src/parsing/preparser.cc
index 8e5e9ab6525c766804733e3fc4339de452324adf..09761ce8874626c042b6b508239cd515c037fc1f 100644
--- a/src/parsing/preparser.cc
+++ b/src/parsing/preparser.cc
@@ -179,11 +179,14 @@ PreParser::Expression PreParser::ParseFunctionLiteral(
LanguageMode language_mode, bool* ok) {
// Function ::
// '(' FormalParameterList? ')' '{' FunctionBody '}'
+ const RuntimeCallStats::CounterId counters[2][2] = {
+ {&RuntimeCallStats::PreParseWithVariableResolution,
+ &RuntimeCallStats::PreParseBackgroundWithVariableResolution},
+ {&RuntimeCallStats::PreParseNoVariableResolution,
+ &RuntimeCallStats::PreParseBackgroundNoVariableResolution}};
RuntimeCallTimerScope runtime_timer(
runtime_call_stats_,
- track_unresolved_variables_
- ? &RuntimeCallStats::PreParseWithVariableResolution
- : &RuntimeCallStats::PreParseNoVariableResolution);
+ counters[track_unresolved_variables_][parsing_on_main_thread_]);
// Parse function body.
PreParserStatementList body;
« no previous file with comments | « src/parsing/preparser.h ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698