Chromium Code Reviews| Index: src/compiler.cc |
| diff --git a/src/compiler.cc b/src/compiler.cc |
| index 1ff92f19606943f5c29b5cdf8076adc723ed81c5..901bff612e5655d9dbecbe2082af246005e7ef40 100644 |
| --- a/src/compiler.cc |
| +++ b/src/compiler.cc |
| @@ -397,6 +397,8 @@ static bool GenerateCode(CompilationInfo* info) { |
| !info->IsCompilingForDebugging() && |
| info->IsOptimizing(); |
| if (is_optimizing) { |
| + HistogramTimerScope timer( |
| + info->isolate()->counters()->recompile_synchronous()); |
| return MakeCrankshaftCode(info); |
| } else { |
| if (info->IsOptimizing()) { |
| @@ -404,6 +406,7 @@ static bool GenerateCode(CompilationInfo* info) { |
| // BASE or NONOPT. |
| info->DisableOptimization(); |
| } |
| + HistogramTimerScope timer(info->isolate()->counters()->compile_full_code()); |
| return FullCodeGenerator::MakeCode(info); |
| } |
| } |
| @@ -852,6 +855,8 @@ void Compiler::RecompileParallel(Handle<JSFunction> closure) { |
| ASSERT(closure->IsMarkedForParallelRecompilation()); |
| Isolate* isolate = closure->GetIsolate(); |
| + HistogramTimerScope timer(isolate->counters()->recompile_synchronous()); |
|
Jakob Kummerow
2012/11/22 10:56:08
Adding the run time of a method named RecompilePar
Yang
2012/11/22 13:04:20
Done.
|
| + |
| if (!isolate->optimizing_compiler_thread()->IsQueueAvailable()) { |
| if (FLAG_trace_parallel_recompilation) { |
| PrintF(" ** Compilation queue, will retry opting on next run.\n"); |
| @@ -860,7 +865,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 +913,9 @@ 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); |
| + HistogramTimerScope timer(isolate->counters()->recompile_synchronous()); |
| // If crankshaft succeeded, install the optimized code else install |
| // the unoptimized code. |
| OptimizingCompiler::Status status = optimizing_compiler->last_status(); |