Chromium Code Reviews| Index: src/execution.cc |
| diff --git a/src/execution.cc b/src/execution.cc |
| index 10129117c2643d7bf20491af6b8898537a804bdf..c3889eefc09657d179e9abd4d1cb9de92bf85a18 100644 |
| --- a/src/execution.cc |
| +++ b/src/execution.cc |
| @@ -432,25 +432,6 @@ void StackGuard::TerminateExecution() { |
| } |
| -void StackGuard::RequestCodeReadyEvent() { |
| - ASSERT(FLAG_parallel_recompilation); |
| - if (ExecutionAccess::TryLock(isolate_)) { |
| - thread_local_.interrupt_flags_ |= CODE_READY; |
| - if (thread_local_.postpone_interrupts_nesting_ == 0) { |
| - thread_local_.jslimit_ = thread_local_.climit_ = kInterruptLimit; |
| - isolate_->heap()->SetStackLimits(); |
| - } |
| - ExecutionAccess::Unlock(isolate_); |
| - } |
| -} |
| - |
| - |
| -bool StackGuard::IsCodeReadyEvent() { |
| - ExecutionAccess access(isolate_); |
| - return (thread_local_.interrupt_flags_ & CODE_READY) != 0; |
| -} |
| - |
| - |
| bool StackGuard::IsGCRequest() { |
| ExecutionAccess access(isolate_); |
| return (thread_local_.interrupt_flags_ & GC_REQUEST) != 0; |
| @@ -889,6 +870,7 @@ void Execution::ProcessDebugMessages(bool debug_command_only) { |
| MaybeObject* Execution::HandleStackGuardInterrupt(Isolate* isolate) { |
| StackGuard* stack_guard = isolate->stack_guard(); |
| + isolate->counters()->stack_interrupts()->Increment(); |
| if (stack_guard->ShouldPostponeInterrupts()) { |
| return isolate->heap()->undefined_value(); |
| } |
| @@ -897,29 +879,19 @@ MaybeObject* Execution::HandleStackGuardInterrupt(Isolate* isolate) { |
| isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| "StackGuard GC request"); |
| stack_guard->Continue(GC_REQUEST); |
| + return isolate->heap()->undefined_value(); |
|
Jakob Kummerow
2013/03/12 15:19:30
Probably better to do this change of behavior in a
Sven Panne
2013/03/12 15:44:51
+1 for a separate CL, I considered something simil
Yang
2013/03/12 18:03:38
Done.
|
| } |
| - if (stack_guard->IsCodeReadyEvent()) { |
| - ASSERT(FLAG_parallel_recompilation); |
| - if (FLAG_trace_parallel_recompilation) { |
| - PrintF(" ** CODE_READY event received.\n"); |
| - } |
| - stack_guard->Continue(CODE_READY); |
| - } |
| - if (!stack_guard->IsTerminateExecution() && |
| - !FLAG_manual_parallel_recompilation) { |
| - isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); |
| - } |
| - |
| - 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(); |
| + return isolate->heap()->undefined_value(); |
| } |
| #endif |
| - if (stack_guard->IsPreempted()) RuntimePreempt(); |
| + if (stack_guard->IsPreempted()) { |
| + RuntimePreempt(); |
| + return isolate->heap()->undefined_value(); |
| + } |
| if (stack_guard->IsTerminateExecution()) { |
| stack_guard->Continue(TERMINATE); |
| return isolate->TerminateExecution(); |
| @@ -928,6 +900,9 @@ MaybeObject* Execution::HandleStackGuardInterrupt(Isolate* isolate) { |
| stack_guard->Continue(INTERRUPT); |
| return isolate->StackOverflow(); |
| } |
| + |
| + isolate->counters()->runtime_profiler_ticks()->Increment(); |
| + isolate->runtime_profiler()->OptimizeNow(); |
| return isolate->heap()->undefined_value(); |
| } |