| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // We don't need a barrier since we have a data dependency right | 68 // We don't need a barrier since we have a data dependency right |
| 69 // after. | 69 // after. |
| 70 Atomic32 current_length = NoBarrier_Load(&queue_length_); | 70 Atomic32 current_length = NoBarrier_Load(&queue_length_); |
| 71 | 71 |
| 72 // This can be queried only from the execution thread. | 72 // This can be queried only from the execution thread. |
| 73 ASSERT(!IsOptimizerThread()); | 73 ASSERT(!IsOptimizerThread()); |
| 74 // Since only the execution thread increments queue_length_ and | 74 // Since only the execution thread increments queue_length_ and |
| 75 // only one thread can run inside an Isolate at one time, a direct | 75 // only one thread can run inside an Isolate at one time, a direct |
| 76 // doesn't introduce a race -- queue_length_ may decreased in | 76 // doesn't introduce a race -- queue_length_ may decreased in |
| 77 // meantime, but not increased. | 77 // meantime, but not increased. |
| 78 return (current_length < FLAG_parallel_recompilation_queue_length); | 78 return (current_length < FLAG_concurrent_recompilation_queue_length); |
| 79 } | 79 } |
| 80 | 80 |
| 81 #ifdef DEBUG | 81 #ifdef DEBUG |
| 82 bool IsOptimizerThread(); | 82 bool IsOptimizerThread(); |
| 83 #endif | 83 #endif |
| 84 | 84 |
| 85 ~OptimizingCompilerThread() { | 85 ~OptimizingCompilerThread() { |
| 86 delete install_mutex_; | 86 delete install_mutex_; |
| 87 delete input_queue_semaphore_; | 87 delete input_queue_semaphore_; |
| 88 delete stop_semaphore_; | 88 delete stop_semaphore_; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 112 Mutex* install_mutex_; | 112 Mutex* install_mutex_; |
| 113 volatile AtomicWord stop_thread_; | 113 volatile AtomicWord stop_thread_; |
| 114 volatile Atomic32 queue_length_; | 114 volatile Atomic32 queue_length_; |
| 115 int64_t time_spent_compiling_; | 115 int64_t time_spent_compiling_; |
| 116 int64_t time_spent_total_; | 116 int64_t time_spent_total_; |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 } } // namespace v8::internal | 119 } } // namespace v8::internal |
| 120 | 120 |
| 121 #endif // V8_OPTIMIZING_COMPILER_THREAD_H_ | 121 #endif // V8_OPTIMIZING_COMPILER_THREAD_H_ |
| OLD | NEW |