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

Side by Side Diff: src/optimizing-compiler-thread.h

Issue 484643002: Version 3.28.71.3 (merged r23081) (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.28
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips64/lithium-mips64.h ('k') | src/splay-tree.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OPTIMIZING_COMPILER_THREAD_H_ 5 #ifndef V8_OPTIMIZING_COMPILER_THREAD_H_
6 #define V8_OPTIMIZING_COMPILER_THREAD_H_ 6 #define V8_OPTIMIZING_COMPILER_THREAD_H_
7 7
8 #include "src/base/atomicops.h" 8 #include "src/base/atomicops.h"
9 #include "src/base/platform/mutex.h" 9 #include "src/base/platform/mutex.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
11 #include "src/base/platform/time.h" 11 #include "src/base/platform/time.h"
12 #include "src/flags.h" 12 #include "src/flags.h"
13 #include "src/list.h" 13 #include "src/list.h"
14 #include "src/unbound-queue-inl.h" 14 #include "src/unbound-queue-inl.h"
15 15
16 namespace v8 { 16 namespace v8 {
17 namespace internal { 17 namespace internal {
18 18
19 class HOptimizedGraphBuilder; 19 class HOptimizedGraphBuilder;
20 class OptimizedCompileJob; 20 class OptimizedCompileJob;
21 class SharedFunctionInfo; 21 class SharedFunctionInfo;
22 22
23 class OptimizingCompilerThread : public base::Thread { 23 class OptimizingCompilerThread : public base::Thread {
24 public: 24 public:
25 explicit OptimizingCompilerThread(Isolate *isolate) : 25 explicit OptimizingCompilerThread(Isolate* isolate)
26 Thread("OptimizingCompilerThread"), 26 : Thread(Options("OptimizingCompilerThread")),
27 #ifdef DEBUG 27 #ifdef DEBUG
28 thread_id_(0), 28 thread_id_(0),
29 #endif 29 #endif
30 isolate_(isolate), 30 isolate_(isolate),
31 stop_semaphore_(0), 31 stop_semaphore_(0),
32 input_queue_semaphore_(0), 32 input_queue_semaphore_(0),
33 input_queue_capacity_(FLAG_concurrent_recompilation_queue_length), 33 input_queue_capacity_(FLAG_concurrent_recompilation_queue_length),
34 input_queue_length_(0), 34 input_queue_length_(0),
35 input_queue_shift_(0), 35 input_queue_shift_(0),
36 osr_buffer_capacity_(FLAG_concurrent_recompilation_queue_length + 4), 36 osr_buffer_capacity_(FLAG_concurrent_recompilation_queue_length + 4),
37 osr_buffer_cursor_(0), 37 osr_buffer_cursor_(0),
38 osr_hits_(0), 38 osr_hits_(0),
39 osr_attempts_(0), 39 osr_attempts_(0),
40 blocked_jobs_(0) { 40 blocked_jobs_(0) {
41 base::NoBarrier_Store(&stop_thread_, 41 base::NoBarrier_Store(&stop_thread_,
42 static_cast<base::AtomicWord>(CONTINUE)); 42 static_cast<base::AtomicWord>(CONTINUE));
43 input_queue_ = NewArray<OptimizedCompileJob*>(input_queue_capacity_); 43 input_queue_ = NewArray<OptimizedCompileJob*>(input_queue_capacity_);
44 if (FLAG_concurrent_osr) { 44 if (FLAG_concurrent_osr) {
45 // Allocate and mark OSR buffer slots as empty. 45 // Allocate and mark OSR buffer slots as empty.
46 osr_buffer_ = NewArray<OptimizedCompileJob*>(osr_buffer_capacity_); 46 osr_buffer_ = NewArray<OptimizedCompileJob*>(osr_buffer_capacity_);
47 for (int i = 0; i < osr_buffer_capacity_; i++) osr_buffer_[i] = NULL; 47 for (int i = 0; i < osr_buffer_capacity_; i++) osr_buffer_[i] = NULL;
48 } 48 }
49 } 49 }
50 50
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 int osr_hits_; 134 int osr_hits_;
135 int osr_attempts_; 135 int osr_attempts_;
136 136
137 int blocked_jobs_; 137 int blocked_jobs_;
138 }; 138 };
139 139
140 } } // namespace v8::internal 140 } } // namespace v8::internal
141 141
142 #endif // V8_OPTIMIZING_COMPILER_THREAD_H_ 142 #endif // V8_OPTIMIZING_COMPILER_THREAD_H_
OLDNEW
« no previous file with comments | « src/mips64/lithium-mips64.h ('k') | src/splay-tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698