mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 09:34:38 +02:00
8209975: Some GCThreadLocalData not initialized
Perform deferred BarrierSet initializations for NonJavaThreads too. Reviewed-by: eosterlund, pliden
This commit is contained in:
parent
26560a934d
commit
6a0bb0955e
3 changed files with 52 additions and 8 deletions
|
@ -307,13 +307,15 @@ Thread::Thread() {
|
|||
}
|
||||
#endif // ASSERT
|
||||
|
||||
// Notify the barrier set that a thread is being created. Note that the
|
||||
// main thread is created before a barrier set is available. The call to
|
||||
// BarrierSet::on_thread_create() for the main thread is therefore deferred
|
||||
// until it calls BarrierSet::set_barrier_set().
|
||||
// Notify the barrier set that a thread is being created. Note that some
|
||||
// threads are created before a barrier set is available. The call to
|
||||
// BarrierSet::on_thread_create() for these threads is therefore deferred
|
||||
// to BarrierSet::set_barrier_set().
|
||||
BarrierSet* const barrier_set = BarrierSet::barrier_set();
|
||||
if (barrier_set != NULL) {
|
||||
barrier_set->on_thread_create(this);
|
||||
} else {
|
||||
DEBUG_ONLY(Threads::inc_threads_before_barrier_set();)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3397,6 +3399,7 @@ size_t JavaThread::_stack_size_at_create = 0;
|
|||
|
||||
#ifdef ASSERT
|
||||
bool Threads::_vm_complete = false;
|
||||
size_t Threads::_threads_before_barrier_set = 0;
|
||||
#endif
|
||||
|
||||
static inline void *prefetch_and_load_ptr(void **addr, intx prefetch_interval) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue