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

Unified Diff: src/optimizing-compiler-thread.cc

Issue 64543004: Disable concurrent osr when concurrent recompilation is disabled. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: git cl dcommit Created 7 years, 1 month 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
« no previous file with comments | « src/isolate.h ('k') | src/v8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/optimizing-compiler-thread.cc
diff --git a/src/optimizing-compiler-thread.cc b/src/optimizing-compiler-thread.cc
index e9c0254522261e881833c6a5d8b31e399475140f..fbc4f05997b32768df14b4c532d47c5ae95f95a9 100644
--- a/src/optimizing-compiler-thread.cc
+++ b/src/optimizing-compiler-thread.cc
@@ -346,23 +346,23 @@ bool OptimizingCompilerThread::IsQueuedForOSR(JSFunction* function) {
void OptimizingCompilerThread::AddToOsrBuffer(RecompileJob* job) {
ASSERT(!IsOptimizerThread());
// Find the next slot that is empty or has a stale job.
+ RecompileJob* stale = NULL;
while (true) {
- RecompileJob* stale = osr_buffer_[osr_buffer_cursor_];
+ stale = osr_buffer_[osr_buffer_cursor_];
if (stale == NULL || stale->IsWaitingForInstall()) break;
osr_buffer_cursor_ = (osr_buffer_cursor_ + 1) % osr_buffer_capacity_;
}
// Add to found slot and dispose the evicted job.
- RecompileJob* evicted = osr_buffer_[osr_buffer_cursor_];
- if (evicted != NULL) {
- ASSERT(evicted->IsWaitingForInstall());
- CompilationInfo* info = evicted->info();
+ if (stale != NULL) {
+ ASSERT(stale->IsWaitingForInstall());
+ CompilationInfo* info = stale->info();
if (FLAG_trace_osr) {
PrintF("[COSR - Discarded ");
info->closure()->PrintName();
PrintF(", AST id %d]\n", info->osr_ast_id().ToInt());
}
- DisposeRecompileJob(evicted, false);
+ DisposeRecompileJob(stale, false);
}
osr_buffer_[osr_buffer_cursor_] = job;
osr_buffer_cursor_ = (osr_buffer_cursor_ + 1) % osr_buffer_capacity_;
« no previous file with comments | « src/isolate.h ('k') | src/v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698