Commit c4081d25 authored by yangguo's avatar yangguo Committed by Commit bot

Revert of Remove support for thread-based recompilation (patchset #1 id:1 of...

Revert of Remove support for thread-based recompilation (patchset #1 id:1 of https://codereview.chromium.org/966653002/)

Reason for revert:
speculative revert due to gc-stress timeouts.

Original issue's description:
> Remove support for thread-based recompilation
>
> BUG=v8:3608
> R=yangguo@chromium.org
> LOG=y
>
> Committed: https://crrev.com/ed5db223a19dfe126af012e894582251aa3635d7
> Cr-Commit-Position: refs/heads/master@{#27619}

TBR=jochen@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
BUG=v8:3608
LOG=N

Review URL: https://codereview.chromium.org/1063383004

Cr-Commit-Position: refs/heads/master@{#27654}
parent a54f22d4
...@@ -892,8 +892,8 @@ source_set("v8_base") { ...@@ -892,8 +892,8 @@ source_set("v8_base") {
"src/objects-printer.cc", "src/objects-printer.cc",
"src/objects.cc", "src/objects.cc",
"src/objects.h", "src/objects.h",
"src/optimizing-compile-dispatcher.cc", "src/optimizing-compiler-thread.cc",
"src/optimizing-compile-dispatcher.h", "src/optimizing-compiler-thread.h",
"src/ostreams.cc", "src/ostreams.cc",
"src/ostreams.h", "src/ostreams.h",
"src/parser.cc", "src/parser.cc",
......
...@@ -819,7 +819,7 @@ static bool GetOptimizedCodeNow(CompilationInfo* info) { ...@@ -819,7 +819,7 @@ static bool GetOptimizedCodeNow(CompilationInfo* info) {
static bool GetOptimizedCodeLater(CompilationInfo* info) { static bool GetOptimizedCodeLater(CompilationInfo* info) {
Isolate* isolate = info->isolate(); Isolate* isolate = info->isolate();
if (!isolate->optimizing_compile_dispatcher()->IsQueueAvailable()) { if (!isolate->optimizing_compiler_thread()->IsQueueAvailable()) {
if (FLAG_trace_concurrent_recompilation) { if (FLAG_trace_concurrent_recompilation) {
PrintF(" ** Compilation queue full, will retry optimizing "); PrintF(" ** Compilation queue full, will retry optimizing ");
info->closure()->ShortPrint(); info->closure()->ShortPrint();
...@@ -840,7 +840,7 @@ static bool GetOptimizedCodeLater(CompilationInfo* info) { ...@@ -840,7 +840,7 @@ static bool GetOptimizedCodeLater(CompilationInfo* info) {
OptimizedCompileJob* job = new (info->zone()) OptimizedCompileJob(info); OptimizedCompileJob* job = new (info->zone()) OptimizedCompileJob(info);
OptimizedCompileJob::Status status = job->CreateGraph(); OptimizedCompileJob::Status status = job->CreateGraph();
if (status != OptimizedCompileJob::SUCCEEDED) return false; if (status != OptimizedCompileJob::SUCCEEDED) return false;
isolate->optimizing_compile_dispatcher()->QueueForOptimization(job); isolate->optimizing_compiler_thread()->QueueForOptimization(job);
if (FLAG_trace_concurrent_recompilation) { if (FLAG_trace_concurrent_recompilation) {
PrintF(" ** Queued "); PrintF(" ** Queued ");
......
...@@ -372,10 +372,12 @@ class CompilationInfo { ...@@ -372,10 +372,12 @@ class CompilationInfo {
} }
void AbortDueToDependencyChange() { void AbortDueToDependencyChange() {
DCHECK(!OptimizingCompilerThread::IsOptimizerThread(isolate()));
aborted_due_to_dependency_change_ = true; aborted_due_to_dependency_change_ = true;
} }
bool HasAbortedDueToDependencyChange() const { bool HasAbortedDueToDependencyChange() const {
DCHECK(!OptimizingCompilerThread::IsOptimizerThread(isolate()));
return aborted_due_to_dependency_change_; return aborted_due_to_dependency_change_;
} }
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "src/circular-queue.h" #include "src/circular-queue.h"
#include "src/compiler.h" #include "src/compiler.h"
#include "src/sampler.h" #include "src/sampler.h"
#include "src/unbound-queue-inl.h" #include "src/unbound-queue.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
......
...@@ -1842,7 +1842,7 @@ void Debug::PrepareForBreakPoints() { ...@@ -1842,7 +1842,7 @@ void Debug::PrepareForBreakPoints() {
// functions as debugging does not work with optimized code. // functions as debugging does not work with optimized code.
if (!has_break_points_) { if (!has_break_points_) {
if (isolate_->concurrent_recompilation_enabled()) { if (isolate_->concurrent_recompilation_enabled()) {
isolate_->optimizing_compile_dispatcher()->Flush(); isolate_->optimizing_compiler_thread()->Flush();
} }
Deoptimizer::DeoptimizeAll(isolate_); Deoptimizer::DeoptimizeAll(isolate_);
......
...@@ -677,7 +677,7 @@ Object* StackGuard::HandleInterrupts() { ...@@ -677,7 +677,7 @@ Object* StackGuard::HandleInterrupts() {
if (CheckAndClearInterrupt(INSTALL_CODE)) { if (CheckAndClearInterrupt(INSTALL_CODE)) {
DCHECK(isolate_->concurrent_recompilation_enabled()); DCHECK(isolate_->concurrent_recompilation_enabled());
isolate_->optimizing_compile_dispatcher()->InstallOptimizedFunctions(); isolate_->optimizing_compiler_thread()->InstallOptimizedFunctions();
} }
if (CheckAndClearInterrupt(API_INTERRUPT)) { if (CheckAndClearInterrupt(API_INTERRUPT)) {
......
...@@ -363,6 +363,9 @@ DEFINE_BOOL(optimize_for_in, true, "optimize functions containing for-in loops") ...@@ -363,6 +363,9 @@ DEFINE_BOOL(optimize_for_in, true, "optimize functions containing for-in loops")
DEFINE_BOOL(concurrent_recompilation, true, DEFINE_BOOL(concurrent_recompilation, true,
"optimizing hot functions asynchronously on a separate thread") "optimizing hot functions asynchronously on a separate thread")
DEFINE_BOOL(job_based_recompilation, true,
"post tasks to v8::Platform instead of using a thread for "
"concurrent recompilation")
DEFINE_BOOL(trace_concurrent_recompilation, false, DEFINE_BOOL(trace_concurrent_recompilation, false,
"track concurrent recompilation") "track concurrent recompilation")
DEFINE_INT(concurrent_recompilation_queue_length, 8, DEFINE_INT(concurrent_recompilation_queue_length, 8,
......
...@@ -441,7 +441,7 @@ void Heap::GarbageCollectionPrologue() { ...@@ -441,7 +441,7 @@ void Heap::GarbageCollectionPrologue() {
store_buffer()->GCPrologue(); store_buffer()->GCPrologue();
if (isolate()->concurrent_osr_enabled()) { if (isolate()->concurrent_osr_enabled()) {
isolate()->optimizing_compile_dispatcher()->AgeBufferedOsrJobs(); isolate()->optimizing_compiler_thread()->AgeBufferedOsrJobs();
} }
if (new_space_.IsAtMaximumCapacity()) { if (new_space_.IsAtMaximumCapacity()) {
...@@ -784,7 +784,7 @@ void Heap::CollectAllAvailableGarbage(const char* gc_reason) { ...@@ -784,7 +784,7 @@ void Heap::CollectAllAvailableGarbage(const char* gc_reason) {
if (isolate()->concurrent_recompilation_enabled()) { if (isolate()->concurrent_recompilation_enabled()) {
// The optimizing compiler may be unnecessarily holding on to memory. // The optimizing compiler may be unnecessarily holding on to memory.
DisallowHeapAllocation no_recursive_gc; DisallowHeapAllocation no_recursive_gc;
isolate()->optimizing_compile_dispatcher()->Flush(); isolate()->optimizing_compiler_thread()->Flush();
} }
isolate()->ClearSerializerData(); isolate()->ClearSerializerData();
mark_compact_collector()->SetFlags(kMakeHeapIterableMask | mark_compact_collector()->SetFlags(kMakeHeapIterableMask |
...@@ -902,7 +902,7 @@ int Heap::NotifyContextDisposed(bool dependant_context) { ...@@ -902,7 +902,7 @@ int Heap::NotifyContextDisposed(bool dependant_context) {
} }
if (isolate()->concurrent_recompilation_enabled()) { if (isolate()->concurrent_recompilation_enabled()) {
// Flush the queued recompilation tasks. // Flush the queued recompilation tasks.
isolate()->optimizing_compile_dispatcher()->Flush(); isolate()->optimizing_compiler_thread()->Flush();
} }
AgeInlineCaches(); AgeInlineCaches();
set_retained_maps(ArrayList::cast(empty_fixed_array())); set_retained_maps(ArrayList::cast(empty_fixed_array()));
......
...@@ -3473,6 +3473,7 @@ HBasicBlock* HGraph::CreateBasicBlock() { ...@@ -3473,6 +3473,7 @@ HBasicBlock* HGraph::CreateBasicBlock() {
void HGraph::FinalizeUniqueness() { void HGraph::FinalizeUniqueness() {
DisallowHeapAllocation no_gc; DisallowHeapAllocation no_gc;
DCHECK(!OptimizingCompilerThread::IsOptimizerThread(isolate()));
for (int i = 0; i < blocks()->length(); ++i) { for (int i = 0; i < blocks()->length(); ++i) {
for (HInstructionIterator it(blocks()->at(i)); !it.Done(); it.Advance()) { for (HInstructionIterator it(blocks()->at(i)); !it.Done(); it.Advance()) {
it.Current()->FinalizeUniqueness(); it.Current()->FinalizeUniqueness();
......
...@@ -1736,7 +1736,7 @@ Isolate::Isolate(bool enable_serializer) ...@@ -1736,7 +1736,7 @@ Isolate::Isolate(bool enable_serializer)
heap_profiler_(NULL), heap_profiler_(NULL),
function_entry_hook_(NULL), function_entry_hook_(NULL),
deferred_handles_head_(NULL), deferred_handles_head_(NULL),
optimizing_compile_dispatcher_(NULL), optimizing_compiler_thread_(NULL),
stress_deopt_count_(0), stress_deopt_count_(0),
next_optimization_id_(0), next_optimization_id_(0),
#if TRACE_MAPS #if TRACE_MAPS
...@@ -1833,9 +1833,9 @@ void Isolate::Deinit() { ...@@ -1833,9 +1833,9 @@ void Isolate::Deinit() {
FreeThreadResources(); FreeThreadResources();
if (concurrent_recompilation_enabled()) { if (concurrent_recompilation_enabled()) {
optimizing_compile_dispatcher_->Stop(); optimizing_compiler_thread_->Stop();
delete optimizing_compile_dispatcher_; delete optimizing_compiler_thread_;
optimizing_compile_dispatcher_ = NULL; optimizing_compiler_thread_ = NULL;
} }
if (heap_.mark_compact_collector()->sweeping_in_progress()) { if (heap_.mark_compact_collector()->sweeping_in_progress()) {
...@@ -2133,8 +2133,9 @@ bool Isolate::Init(Deserializer* des) { ...@@ -2133,8 +2133,9 @@ bool Isolate::Init(Deserializer* des) {
if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) { if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) {
PrintF("Concurrent recompilation has been disabled for tracing.\n"); PrintF("Concurrent recompilation has been disabled for tracing.\n");
} else if (OptimizingCompileDispatcher::Enabled(max_available_threads_)) { } else if (OptimizingCompilerThread::Enabled(max_available_threads_)) {
optimizing_compile_dispatcher_ = new OptimizingCompileDispatcher(this); optimizing_compiler_thread_ = new OptimizingCompilerThread(this);
optimizing_compiler_thread_->Start();
} }
// Initialize runtime profiler before deserialization, because collections may // Initialize runtime profiler before deserialization, because collections may
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "src/handles.h" #include "src/handles.h"
#include "src/hashmap.h" #include "src/hashmap.h"
#include "src/heap/heap.h" #include "src/heap/heap.h"
#include "src/optimizing-compile-dispatcher.h" #include "src/optimizing-compiler-thread.h"
#include "src/regexp-stack.h" #include "src/regexp-stack.h"
#include "src/runtime/runtime.h" #include "src/runtime/runtime.h"
#include "src/runtime-profiler.h" #include "src/runtime-profiler.h"
...@@ -1028,20 +1028,20 @@ class Isolate { ...@@ -1028,20 +1028,20 @@ class Isolate {
bool concurrent_recompilation_enabled() { bool concurrent_recompilation_enabled() {
// Thread is only available with flag enabled. // Thread is only available with flag enabled.
DCHECK(optimizing_compile_dispatcher_ == NULL || DCHECK(optimizing_compiler_thread_ == NULL ||
FLAG_concurrent_recompilation); FLAG_concurrent_recompilation);
return optimizing_compile_dispatcher_ != NULL; return optimizing_compiler_thread_ != NULL;
} }
bool concurrent_osr_enabled() const { bool concurrent_osr_enabled() const {
// Thread is only available with flag enabled. // Thread is only available with flag enabled.
DCHECK(optimizing_compile_dispatcher_ == NULL || DCHECK(optimizing_compiler_thread_ == NULL ||
FLAG_concurrent_recompilation); FLAG_concurrent_recompilation);
return optimizing_compile_dispatcher_ != NULL && FLAG_concurrent_osr; return optimizing_compiler_thread_ != NULL && FLAG_concurrent_osr;
} }
OptimizingCompileDispatcher* optimizing_compile_dispatcher() { OptimizingCompilerThread* optimizing_compiler_thread() {
return optimizing_compile_dispatcher_; return optimizing_compiler_thread_;
} }
int id() const { return static_cast<int>(id_); } int id() const { return static_cast<int>(id_); }
...@@ -1329,7 +1329,7 @@ class Isolate { ...@@ -1329,7 +1329,7 @@ class Isolate {
#endif #endif
DeferredHandles* deferred_handles_head_; DeferredHandles* deferred_handles_head_;
OptimizingCompileDispatcher* optimizing_compile_dispatcher_; OptimizingCompilerThread* optimizing_compiler_thread_;
// Counts deopt points if deopt_every_n_times is enabled. // Counts deopt points if deopt_every_n_times is enabled.
unsigned int stress_deopt_count_; unsigned int stress_deopt_count_;
...@@ -1350,7 +1350,7 @@ class Isolate { ...@@ -1350,7 +1350,7 @@ class Isolate {
friend class ExecutionAccess; friend class ExecutionAccess;
friend class HandleScopeImplementer; friend class HandleScopeImplementer;
friend class OptimizingCompileDispatcher; friend class OptimizingCompilerThread;
friend class SweeperThread; friend class SweeperThread;
friend class ThreadManager; friend class ThreadManager;
friend class Simulator; friend class Simulator;
......
...@@ -9706,7 +9706,7 @@ void JSFunction::AttemptConcurrentOptimization() { ...@@ -9706,7 +9706,7 @@ void JSFunction::AttemptConcurrentOptimization() {
return; return;
} }
if (isolate->concurrent_osr_enabled() && if (isolate->concurrent_osr_enabled() &&
isolate->optimizing_compile_dispatcher()->IsQueuedForOSR(this)) { isolate->optimizing_compiler_thread()->IsQueuedForOSR(this)) {
// Do not attempt regular recompilation if we already queued this for OSR. // Do not attempt regular recompilation if we already queued this for OSR.
// TODO(yangguo): This is necessary so that we don't install optimized // TODO(yangguo): This is necessary so that we don't install optimized
// code on a function that is already optimized, since OSR and regular // code on a function that is already optimized, since OSR and regular
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef V8_OPTIMIZING_COMPILE_DISPATCHER_H_ #ifndef V8_OPTIMIZING_COMPILER_THREAD_H_
#define V8_OPTIMIZING_COMPILE_DISPATCHER_H_ #define V8_OPTIMIZING_COMPILER_THREAD_H_
#include <queue>
#include "src/base/atomicops.h" #include "src/base/atomicops.h"
#include "src/base/platform/condition-variable.h" #include "src/base/platform/condition-variable.h"
#include "src/base/platform/mutex.h" #include "src/base/platform/mutex.h"
#include "src/base/platform/platform.h" #include "src/base/platform/platform.h"
#include "src/base/platform/time.h"
#include "src/flags.h" #include "src/flags.h"
#include "src/list.h" #include "src/list.h"
#include "src/unbound-queue-inl.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
...@@ -21,10 +21,16 @@ class HOptimizedGraphBuilder; ...@@ -21,10 +21,16 @@ class HOptimizedGraphBuilder;
class OptimizedCompileJob; class OptimizedCompileJob;
class SharedFunctionInfo; class SharedFunctionInfo;
class OptimizingCompileDispatcher { class OptimizingCompilerThread : public base::Thread {
public: public:
explicit OptimizingCompileDispatcher(Isolate* isolate) explicit OptimizingCompilerThread(Isolate* isolate)
: isolate_(isolate), : Thread(Options("OptimizingCompilerThread")),
#ifdef DEBUG
thread_id_(0),
#endif
isolate_(isolate),
stop_semaphore_(0),
input_queue_semaphore_(0),
input_queue_capacity_(FLAG_concurrent_recompilation_queue_length), input_queue_capacity_(FLAG_concurrent_recompilation_queue_length),
input_queue_length_(0), input_queue_length_(0),
input_queue_shift_(0), input_queue_shift_(0),
...@@ -34,8 +40,11 @@ class OptimizingCompileDispatcher { ...@@ -34,8 +40,11 @@ class OptimizingCompileDispatcher {
osr_attempts_(0), osr_attempts_(0),
blocked_jobs_(0), blocked_jobs_(0),
ref_count_(0), ref_count_(0),
tracing_enabled_(FLAG_trace_concurrent_recompilation),
job_based_recompilation_(FLAG_job_based_recompilation),
recompilation_delay_(FLAG_concurrent_recompilation_delay) { recompilation_delay_(FLAG_concurrent_recompilation_delay) {
base::NoBarrier_Store(&mode_, static_cast<base::AtomicWord>(COMPILE)); base::NoBarrier_Store(&stop_thread_,
static_cast<base::AtomicWord>(CONTINUE));
input_queue_ = NewArray<OptimizedCompileJob*>(input_queue_capacity_); input_queue_ = NewArray<OptimizedCompileJob*>(input_queue_capacity_);
if (FLAG_concurrent_osr) { if (FLAG_concurrent_osr) {
// Allocate and mark OSR buffer slots as empty. // Allocate and mark OSR buffer slots as empty.
...@@ -44,7 +53,7 @@ class OptimizingCompileDispatcher { ...@@ -44,7 +53,7 @@ class OptimizingCompileDispatcher {
} }
} }
~OptimizingCompileDispatcher(); ~OptimizingCompilerThread();
void Run(); void Run();
void Stop(); void Stop();
...@@ -74,11 +83,17 @@ class OptimizingCompileDispatcher { ...@@ -74,11 +83,17 @@ class OptimizingCompileDispatcher {
return (FLAG_concurrent_recompilation && max_available > 1); return (FLAG_concurrent_recompilation && max_available > 1);
} }
#ifdef DEBUG
static bool IsOptimizerThread(Isolate* isolate);
bool IsOptimizerThread();
#endif
private: private:
class CompileTask; class CompileTask;
enum ModeFlag { COMPILE, FLUSH }; enum StopFlag { CONTINUE, STOP, FLUSH };
void FlushInputQueue(bool restore_function_code);
void FlushOutputQueue(bool restore_function_code); void FlushOutputQueue(bool restore_function_code);
void FlushOsrBuffer(bool restore_function_code); void FlushOsrBuffer(bool restore_function_code);
void CompileNext(OptimizedCompileJob* job); void CompileNext(OptimizedCompileJob* job);
...@@ -95,7 +110,14 @@ class OptimizingCompileDispatcher { ...@@ -95,7 +110,14 @@ class OptimizingCompileDispatcher {
return result; return result;
} }
#ifdef DEBUG
int thread_id_;
base::Mutex thread_id_mutex_;
#endif
Isolate* isolate_; Isolate* isolate_;
base::Semaphore stop_semaphore_;
base::Semaphore input_queue_semaphore_;
// Circular queue of incoming recompilation tasks (including OSR). // Circular queue of incoming recompilation tasks (including OSR).
OptimizedCompileJob** input_queue_; OptimizedCompileJob** input_queue_;
...@@ -105,7 +127,7 @@ class OptimizingCompileDispatcher { ...@@ -105,7 +127,7 @@ class OptimizingCompileDispatcher {
base::Mutex input_queue_mutex_; base::Mutex input_queue_mutex_;
// Queue of recompilation tasks ready to be installed (excluding OSR). // Queue of recompilation tasks ready to be installed (excluding OSR).
std::queue<OptimizedCompileJob*> output_queue_; UnboundQueue<OptimizedCompileJob*> output_queue_;
// Used for job based recompilation which has multiple producers on // Used for job based recompilation which has multiple producers on
// different threads. // different threads.
base::Mutex output_queue_mutex_; base::Mutex output_queue_mutex_;
...@@ -115,7 +137,9 @@ class OptimizingCompileDispatcher { ...@@ -115,7 +137,9 @@ class OptimizingCompileDispatcher {
int osr_buffer_capacity_; int osr_buffer_capacity_;
int osr_buffer_cursor_; int osr_buffer_cursor_;
volatile base::AtomicWord mode_; volatile base::AtomicWord stop_thread_;
base::TimeDelta time_spent_compiling_;
base::TimeDelta time_spent_total_;
int osr_hits_; int osr_hits_;
int osr_attempts_; int osr_attempts_;
...@@ -126,14 +150,17 @@ class OptimizingCompileDispatcher { ...@@ -126,14 +150,17 @@ class OptimizingCompileDispatcher {
base::Mutex ref_count_mutex_; base::Mutex ref_count_mutex_;
base::ConditionVariable ref_count_zero_; base::ConditionVariable ref_count_zero_;
// Copy of FLAG_concurrent_recompilation_delay that will be used from the // Copies of FLAG_trace_concurrent_recompilation,
// background thread. // FLAG_concurrent_recompilation_delay and
// FLAG_job_based_recompilation that will be used from the background thread.
// //
// Since flags might get modified while the background thread is running, it // Since flags might get modified while the background thread is running, it
// is not safe to access them directly. // is not safe to access them directly.
bool tracing_enabled_;
bool job_based_recompilation_;
int recompilation_delay_; int recompilation_delay_;
}; };
}
} // namespace v8::internal
#endif // V8_OPTIMIZING_COMPILE_DISPATCHER_H_ } } // namespace v8::internal
#endif // V8_OPTIMIZING_COMPILER_THREAD_H_
...@@ -232,8 +232,7 @@ RUNTIME_FUNCTION(Runtime_CompileForOnStackReplacement) { ...@@ -232,8 +232,7 @@ RUNTIME_FUNCTION(Runtime_CompileForOnStackReplacement) {
// Gate the OSR entry with a stack check. // Gate the OSR entry with a stack check.
BackEdgeTable::AddStackCheck(caller_code, pc_offset); BackEdgeTable::AddStackCheck(caller_code, pc_offset);
// Poll already queued compilation jobs. // Poll already queued compilation jobs.
OptimizingCompileDispatcher* thread = OptimizingCompilerThread* thread = isolate->optimizing_compiler_thread();
isolate->optimizing_compile_dispatcher();
if (thread->IsQueuedForOSR(function, ast_id)) { if (thread->IsQueuedForOSR(function, ast_id)) {
if (FLAG_trace_osr) { if (FLAG_trace_osr) {
PrintF("[OSR - Still waiting for queued: "); PrintF("[OSR - Still waiting for queued: ");
...@@ -325,7 +324,7 @@ RUNTIME_FUNCTION(Runtime_TryInstallOptimizedCode) { ...@@ -325,7 +324,7 @@ RUNTIME_FUNCTION(Runtime_TryInstallOptimizedCode) {
return isolate->StackOverflow(); return isolate->StackOverflow();
} }
isolate->optimizing_compile_dispatcher()->InstallOptimizedFunctions(); isolate->optimizing_compiler_thread()->InstallOptimizedFunctions();
return (function->IsOptimized()) ? function->code() return (function->IsOptimized()) ? function->code()
: function->shared()->code(); : function->shared()->code();
} }
......
...@@ -175,7 +175,7 @@ RUNTIME_FUNCTION(Runtime_GetOptimizationStatus) { ...@@ -175,7 +175,7 @@ RUNTIME_FUNCTION(Runtime_GetOptimizationStatus) {
if (isolate->concurrent_recompilation_enabled() && if (isolate->concurrent_recompilation_enabled() &&
sync_with_compiler_thread) { sync_with_compiler_thread) {
while (function->IsInOptimizationQueue()) { while (function->IsInOptimizationQueue()) {
isolate->optimizing_compile_dispatcher()->InstallOptimizedFunctions(); isolate->optimizing_compiler_thread()->InstallOptimizedFunctions();
base::OS::Sleep(50); base::OS::Sleep(50);
} }
} }
...@@ -200,7 +200,7 @@ RUNTIME_FUNCTION(Runtime_UnblockConcurrentRecompilation) { ...@@ -200,7 +200,7 @@ RUNTIME_FUNCTION(Runtime_UnblockConcurrentRecompilation) {
DCHECK(args.length() == 0); DCHECK(args.length() == 0);
RUNTIME_ASSERT(FLAG_block_concurrent_recompilation); RUNTIME_ASSERT(FLAG_block_concurrent_recompilation);
RUNTIME_ASSERT(isolate->concurrent_recompilation_enabled()); RUNTIME_ASSERT(isolate->concurrent_recompilation_enabled());
isolate->optimizing_compile_dispatcher()->Unblock(); isolate->optimizing_compiler_thread()->Unblock();
return isolate->heap()->undefined_value(); return isolate->heap()->undefined_value();
} }
......
...@@ -780,8 +780,8 @@ ...@@ -780,8 +780,8 @@
'../../src/objects-printer.cc', '../../src/objects-printer.cc',
'../../src/objects.cc', '../../src/objects.cc',
'../../src/objects.h', '../../src/objects.h',
'../../src/optimizing-compile-dispatcher.cc', '../../src/optimizing-compiler-thread.cc',
'../../src/optimizing-compile-dispatcher.h', '../../src/optimizing-compiler-thread.h',
'../../src/ostreams.cc', '../../src/ostreams.cc',
'../../src/ostreams.h', '../../src/ostreams.h',
'../../src/parser.cc', '../../src/parser.cc',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment