| Index: src/optimizing-compiler-thread.h
|
| diff --git a/src/optimizing-compiler-thread.h b/src/optimizing-compiler-thread.h
|
| index aff94eddc22429b0aeadd05f830e515d7e544eb4..bb96c7479b6bd1b5262f6b6e69a1eac291114b61 100644
|
| --- a/src/optimizing-compiler-thread.h
|
| +++ b/src/optimizing-compiler-thread.h
|
| @@ -31,6 +31,8 @@
|
| #include "atomicops.h"
|
| #include "flags.h"
|
| #include "platform.h"
|
| +#include "platform/mutex.h"
|
| +#include "platform/time.h"
|
| #include "unbound-queue-inl.h"
|
|
|
| namespace v8 {
|
| @@ -46,17 +48,14 @@ class OptimizingCompilerThread : public Thread {
|
| Thread("OptimizingCompilerThread"),
|
| #ifdef DEBUG
|
| thread_id_(0),
|
| - thread_id_mutex_(OS::CreateMutex()),
|
| #endif
|
| isolate_(isolate),
|
| - stop_semaphore_(OS::CreateSemaphore(0)),
|
| - input_queue_semaphore_(OS::CreateSemaphore(0)),
|
| - install_mutex_(OS::CreateMutex()),
|
| - time_spent_compiling_(0),
|
| - time_spent_total_(0) {
|
| + stop_semaphore_(0),
|
| + input_queue_semaphore_(0) {
|
| NoBarrier_Store(&stop_thread_, static_cast<AtomicWord>(CONTINUE));
|
| NoBarrier_Store(&queue_length_, static_cast<AtomicWord>(0));
|
| }
|
| + ~OptimizingCompilerThread() {}
|
|
|
| void Run();
|
| void Stop();
|
| @@ -82,15 +81,6 @@ class OptimizingCompilerThread : public Thread {
|
| bool IsOptimizerThread();
|
| #endif
|
|
|
| - ~OptimizingCompilerThread() {
|
| - delete install_mutex_;
|
| - delete input_queue_semaphore_;
|
| - delete stop_semaphore_;
|
| -#ifdef DEBUG
|
| - delete thread_id_mutex_;
|
| -#endif
|
| - }
|
| -
|
| private:
|
| enum StopFlag { CONTINUE, STOP, FLUSH };
|
|
|
| @@ -101,19 +91,19 @@ class OptimizingCompilerThread : public Thread {
|
|
|
| #ifdef DEBUG
|
| int thread_id_;
|
| - Mutex* thread_id_mutex_;
|
| + Mutex thread_id_mutex_;
|
| #endif
|
|
|
| Isolate* isolate_;
|
| - Semaphore* stop_semaphore_;
|
| - Semaphore* input_queue_semaphore_;
|
| + Semaphore stop_semaphore_;
|
| + Semaphore input_queue_semaphore_;
|
| UnboundQueue<OptimizingCompiler*> input_queue_;
|
| UnboundQueue<OptimizingCompiler*> output_queue_;
|
| - Mutex* install_mutex_;
|
| + Mutex install_mutex_;
|
| volatile AtomicWord stop_thread_;
|
| volatile Atomic32 queue_length_;
|
| - int64_t time_spent_compiling_;
|
| - int64_t time_spent_total_;
|
| + TimeDelta time_spent_compiling_;
|
| + TimeDelta time_spent_total_;
|
| };
|
|
|
| } } // namespace v8::internal
|
|
|