OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 #endif | 108 #endif |
109 | 109 |
110 Isolate* isolate_; | 110 Isolate* isolate_; |
111 Semaphore stop_semaphore_; | 111 Semaphore stop_semaphore_; |
112 Semaphore input_queue_semaphore_; | 112 Semaphore input_queue_semaphore_; |
113 | 113 |
114 // Queue of incoming recompilation tasks (including OSR). | 114 // Queue of incoming recompilation tasks (including OSR). |
115 UnboundQueue<OptimizingCompiler*> input_queue_; | 115 UnboundQueue<OptimizingCompiler*> input_queue_; |
116 // Queue of recompilation tasks ready to be installed (excluding OSR). | 116 // Queue of recompilation tasks ready to be installed (excluding OSR). |
117 UnboundQueue<OptimizingCompiler*> output_queue_; | 117 UnboundQueue<OptimizingCompiler*> output_queue_; |
118 // List of all OSR related recompilation tasks (both incoming and ready ones). | 118 // List of recompilation tasks for OSR in the input queue. |
119 List<OptimizingCompiler*> osr_candidates_; | 119 List<OptimizingCompiler*> osr_candidates_; |
120 // List of recompilation tasks ready for OSR. | 120 // List of recompilation tasks ready for OSR. |
121 List<OptimizingCompiler*> ready_for_osr_; | 121 List<OptimizingCompiler*> ready_for_osr_; |
122 | 122 |
123 volatile AtomicWord stop_thread_; | 123 volatile AtomicWord stop_thread_; |
124 volatile Atomic32 queue_length_; | 124 volatile Atomic32 queue_length_; |
125 TimeDelta time_spent_compiling_; | 125 TimeDelta time_spent_compiling_; |
126 TimeDelta time_spent_total_; | 126 TimeDelta time_spent_total_; |
127 | 127 |
| 128 // TODO(yangguo): remove this once the memory leak has been figured out. |
| 129 Mutex queue_mutex_; |
128 Mutex osr_list_mutex_; | 130 Mutex osr_list_mutex_; |
129 int osr_hits_; | 131 int osr_hits_; |
130 int osr_attempts_; | 132 int osr_attempts_; |
131 | 133 |
132 static const int kReadyForOSRLimit = 4; | 134 static const int kReadyForOSRLimit = 4; |
133 }; | 135 }; |
134 | 136 |
135 } } // namespace v8::internal | 137 } } // namespace v8::internal |
136 | 138 |
137 #endif // V8_OPTIMIZING_COMPILER_THREAD_H_ | 139 #endif // V8_OPTIMIZING_COMPILER_THREAD_H_ |
OLD | NEW |