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

Unified Diff: src/compiler-dispatcher/compiler-dispatcher-tracer.cc

Issue 2611313002: [complier] Enable parallel eager inner function compilation with compiler dispatcher. (Closed)
Patch Set: Rebase Created 3 years, 11 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 | « src/compiler-dispatcher/compiler-dispatcher-tracer.h ('k') | src/counters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler-dispatcher/compiler-dispatcher-tracer.cc
diff --git a/src/compiler-dispatcher/compiler-dispatcher-tracer.cc b/src/compiler-dispatcher/compiler-dispatcher-tracer.cc
index 0703e016e98a62984b5e53bfe621832fbc929441..d98209b14753d89db5a36c23a93d4c22a0ffea88 100644
--- a/src/compiler-dispatcher/compiler-dispatcher-tracer.cc
+++ b/src/compiler-dispatcher/compiler-dispatcher-tracer.cc
@@ -39,6 +39,9 @@ CompilerDispatcherTracer::Scope::~Scope() {
case ScopeID::kFinalizeParsing:
tracer_->RecordFinalizeParsing(elapsed);
break;
+ case ScopeID::kAnalyze:
+ tracer_->RecordAnalyze(elapsed);
+ break;
case ScopeID::kPrepareToCompile:
tracer_->RecordPrepareToCompile(elapsed);
break;
@@ -60,6 +63,8 @@ const char* CompilerDispatcherTracer::Scope::Name(ScopeID scope_id) {
return "V8.BackgroundCompile_Parse";
case ScopeID::kFinalizeParsing:
return "V8.BackgroundCompile_FinalizeParsing";
+ case ScopeID::kAnalyze:
+ return "V8.BackgroundCompile_Analyze";
case ScopeID::kPrepareToCompile:
return "V8.BackgroundCompile_PrepareToCompile";
case ScopeID::kCompile:
@@ -97,6 +102,11 @@ void CompilerDispatcherTracer::RecordFinalizeParsing(double duration_ms) {
finalize_parsing_events_.Push(duration_ms);
}
+void CompilerDispatcherTracer::RecordAnalyze(double duration_ms) {
+ base::LockGuard<base::Mutex> lock(&mutex_);
+ analyze_events_.Push(duration_ms);
+}
+
void CompilerDispatcherTracer::RecordPrepareToCompile(double duration_ms) {
base::LockGuard<base::Mutex> lock(&mutex_);
prepare_compile_events_.Push(duration_ms);
@@ -128,6 +138,11 @@ double CompilerDispatcherTracer::EstimateFinalizeParsingInMs() const {
return Average(finalize_parsing_events_);
}
+double CompilerDispatcherTracer::EstimateAnalyzeInMs() const {
+ base::LockGuard<base::Mutex> lock(&mutex_);
+ return Average(analyze_events_);
+}
+
double CompilerDispatcherTracer::EstimatePrepareToCompileInMs() const {
base::LockGuard<base::Mutex> lock(&mutex_);
return Average(prepare_compile_events_);
@@ -148,11 +163,12 @@ void CompilerDispatcherTracer::DumpStatistics() const {
PrintF(
"CompilerDispatcherTracer: "
"prepare_parsing=%.2lfms parsing=%.2lfms/kb finalize_parsing=%.2lfms "
- "prepare_compiling=%.2lfms compiling=%.2lfms/kb "
- "finalize_compilig=%.2lfms\n",
+ "analyze=%.2lfms prepare_compiling=%.2lfms compiling=%.2lfms/kb "
+ "finalize_compiling=%.2lfms\n",
EstimatePrepareToParseInMs(), EstimateParseInMs(1 * KB),
- EstimateFinalizeParsingInMs(), EstimatePrepareToCompileInMs(),
- EstimateCompileInMs(1 * KB), EstimateFinalizeCompilingInMs());
+ EstimateFinalizeParsingInMs(), EstimateAnalyzeInMs(),
+ EstimatePrepareToCompileInMs(), EstimateCompileInMs(1 * KB),
+ EstimateFinalizeCompilingInMs());
}
double CompilerDispatcherTracer::Average(
« no previous file with comments | « src/compiler-dispatcher/compiler-dispatcher-tracer.h ('k') | src/counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698