Chromium Code Reviews| Index: src/execution.cc |
| diff --git a/src/execution.cc b/src/execution.cc |
| index c59a737c32b63158f18b4f1fd41be7525c1f7f05..7e597d07e9bc01e8093ebb415eb7a97a1e02f026 100644 |
| --- a/src/execution.cc |
| +++ b/src/execution.cc |
| @@ -459,6 +459,22 @@ void StackGuard::RequestGC() { |
| } |
| +bool StackGuard::IsInstallCodeRequest() { |
| + ExecutionAccess access(isolate_); |
| + return (thread_local_.interrupt_flags_ & INSTALL_CODE) != 0; |
| +} |
| + |
| + |
| +void StackGuard::RequestInstallCode() { |
| + ExecutionAccess access(isolate_); |
| + thread_local_.interrupt_flags_ |= INSTALL_CODE; |
| + if (thread_local_.postpone_interrupts_nesting_ == 0) { |
| + thread_local_.jslimit_ = thread_local_.climit_ = kInterruptLimit; |
| + isolate_->heap()->SetStackLimits(); |
| + } |
| +} |
| + |
| + |
| bool StackGuard::IsFullDeopt() { |
| ExecutionAccess access(isolate_); |
| return (thread_local_.interrupt_flags_ & FULL_DEOPT) != 0; |
| @@ -916,7 +932,6 @@ MaybeObject* Execution::HandleStackGuardInterrupt(Isolate* isolate) { |
| isolate->counters()->stack_interrupts()->Increment(); |
| isolate->counters()->runtime_profiler_ticks()->Increment(); |
| - isolate->runtime_profiler()->OptimizeNow(); |
| #ifdef ENABLE_DEBUGGER_SUPPORT |
| if (stack_guard->IsDebugBreak() || stack_guard->IsDebugCommand()) { |
| DebugBreakHelper(isolate); |
| @@ -935,6 +950,11 @@ MaybeObject* Execution::HandleStackGuardInterrupt(Isolate* isolate) { |
| stack_guard->Continue(FULL_DEOPT); |
| Deoptimizer::DeoptimizeAll(isolate); |
| } |
| + if (FLAG_concurrent_recompilation && stack_guard->IsInstallCodeRequest()) { |
|
Michael Starzinger
2013/09/12 10:53:10
We should only receive this stack guard request of
|
| + stack_guard->Continue(INSTALL_CODE); |
| + isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); |
| + } |
| + isolate->runtime_profiler()->OptimizeNow(); |
| return isolate->heap()->undefined_value(); |
| } |