Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: src/execution.cc

Issue 23542029: Simplify installing concurrently recompiled code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: add stack check when calling function that is in recompile queue. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
}
« no previous file with comments | « src/execution.h ('k') | src/ia32/builtins-ia32.cc » ('j') | src/ia32/builtins-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698