Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index 1ff92f19606943f5c29b5cdf8076adc723ed81c5..b0d1f851ddd729df679b88131202fbd940494e81 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -396,7 +396,10 @@ static bool GenerateCode(CompilationInfo* info) { |
bool is_optimizing = V8::UseCrankshaft() && |
!info->IsCompilingForDebugging() && |
info->IsOptimizing(); |
+ Logger* logger = info->isolate()->logger(); |
if (is_optimizing) { |
+ Logger::TimerEventScope timer( |
+ logger, Logger::TimerEventScope::v8_recompile_synchronous); |
return MakeCrankshaftCode(info); |
} else { |
if (info->IsOptimizing()) { |
@@ -404,6 +407,8 @@ static bool GenerateCode(CompilationInfo* info) { |
// BASE or NONOPT. |
info->DisableOptimization(); |
} |
+ Logger::TimerEventScope timer( |
+ logger, Logger::TimerEventScope::v8_compile_full_code); |
return FullCodeGenerator::MakeCode(info); |
} |
} |
@@ -852,6 +857,9 @@ void Compiler::RecompileParallel(Handle<JSFunction> closure) { |
ASSERT(closure->IsMarkedForParallelRecompilation()); |
Isolate* isolate = closure->GetIsolate(); |
+ Logger::TimerEventScope timer( |
+ isolate->logger(), Logger::TimerEventScope::v8_recompile_synchronous); |
+ |
if (!isolate->optimizing_compiler_thread()->IsQueueAvailable()) { |
if (FLAG_trace_parallel_recompilation) { |
PrintF(" ** Compilation queue, will retry opting on next run.\n"); |
@@ -860,7 +868,7 @@ void Compiler::RecompileParallel(Handle<JSFunction> closure) { |
} |
SmartPointer<CompilationInfo> info(new CompilationInfoWithZone(closure)); |
- VMState state(isolate, PARALLEL_COMPILER_PROLOGUE); |
+ VMState state(isolate, PARALLEL_COMPILER); |
PostponeInterruptsScope postpone(isolate); |
Handle<SharedFunctionInfo> shared = info->shared_info(); |
@@ -908,6 +916,10 @@ void Compiler::RecompileParallel(Handle<JSFunction> closure) { |
void Compiler::InstallOptimizedCode(OptimizingCompiler* optimizing_compiler) { |
SmartPointer<CompilationInfo> info(optimizing_compiler->info()); |
+ Isolate* isolate = info->isolate(); |
+ VMState state(isolate, PARALLEL_COMPILER); |
+ Logger::TimerEventScope timer( |
+ isolate->logger(), Logger::TimerEventScope::v8_recompile_synchronous); |
// If crankshaft succeeded, install the optimized code else install |
// the unoptimized code. |
OptimizingCompiler::Status status = optimizing_compiler->last_status(); |