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( |