equal
deleted
inserted
replaced
305 this == align_up(_real_malloc_address, (int)markOopDesc::biased_lock_alignment), |
305 this == align_up(_real_malloc_address, (int)markOopDesc::biased_lock_alignment), |
306 "bug in forced alignment of thread objects"); |
306 "bug in forced alignment of thread objects"); |
307 } |
307 } |
308 #endif // ASSERT |
308 #endif // ASSERT |
309 |
309 |
310 // Notify the barrier set that a thread is being created. Note that the |
310 // Notify the barrier set that a thread is being created. Note that some |
311 // main thread is created before a barrier set is available. The call to |
311 // threads are created before a barrier set is available. The call to |
312 // BarrierSet::on_thread_create() for the main thread is therefore deferred |
312 // BarrierSet::on_thread_create() for these threads is therefore deferred |
313 // until it calls BarrierSet::set_barrier_set(). |
313 // to BarrierSet::set_barrier_set(). |
314 BarrierSet* const barrier_set = BarrierSet::barrier_set(); |
314 BarrierSet* const barrier_set = BarrierSet::barrier_set(); |
315 if (barrier_set != NULL) { |
315 if (barrier_set != NULL) { |
316 barrier_set->on_thread_create(this); |
316 barrier_set->on_thread_create(this); |
|
317 } else { |
|
318 DEBUG_ONLY(Threads::inc_threads_before_barrier_set();) |
317 } |
319 } |
318 } |
320 } |
319 |
321 |
320 void Thread::initialize_thread_current() { |
322 void Thread::initialize_thread_current() { |
321 #ifndef USE_LIBRARY_BASED_TLS_ONLY |
323 #ifndef USE_LIBRARY_BASED_TLS_ONLY |
3395 int Threads::_thread_claim_parity = 0; |
3397 int Threads::_thread_claim_parity = 0; |
3396 size_t JavaThread::_stack_size_at_create = 0; |
3398 size_t JavaThread::_stack_size_at_create = 0; |
3397 |
3399 |
3398 #ifdef ASSERT |
3400 #ifdef ASSERT |
3399 bool Threads::_vm_complete = false; |
3401 bool Threads::_vm_complete = false; |
|
3402 size_t Threads::_threads_before_barrier_set = 0; |
3400 #endif |
3403 #endif |
3401 |
3404 |
3402 static inline void *prefetch_and_load_ptr(void **addr, intx prefetch_interval) { |
3405 static inline void *prefetch_and_load_ptr(void **addr, intx prefetch_interval) { |
3403 Prefetch::read((void*)addr, prefetch_interval); |
3406 Prefetch::read((void*)addr, prefetch_interval); |
3404 return *addr; |
3407 return *addr; |