equal
deleted
inserted
replaced
3390 ALL_JAVA_THREADS(p) { |
3390 ALL_JAVA_THREADS(p) { |
3391 if (p->claim_oops_do(true, cp)) { |
3391 if (p->claim_oops_do(true, cp)) { |
3392 tc->do_thread(p); |
3392 tc->do_thread(p); |
3393 } |
3393 } |
3394 } |
3394 } |
|
3395 // Thread claiming protocol requires us to claim the same interesting |
|
3396 // threads on all paths. Notably, Threads::possibly_parallel_threads_do |
|
3397 // claims all Java threads *and* the VMThread. To avoid breaking the |
|
3398 // claiming protocol, we have to claim VMThread on this path too, even |
|
3399 // if we do not apply the closure to the VMThread. |
|
3400 VMThread* vmt = VMThread::vm_thread(); |
|
3401 (void)vmt->claim_oops_do(true, cp); |
3395 } |
3402 } |
3396 |
3403 |
3397 // The system initialization in the library has three phases. |
3404 // The system initialization in the library has three phases. |
3398 // |
3405 // |
3399 // Phase 1: java.lang.System class initialization |
3406 // Phase 1: java.lang.System class initialization |
4355 ALL_JAVA_THREADS(p) { |
4362 ALL_JAVA_THREADS(p) { |
4356 const int thread_parity = p->oops_do_parity(); |
4363 const int thread_parity = p->oops_do_parity(); |
4357 assert((thread_parity == _thread_claim_parity), |
4364 assert((thread_parity == _thread_claim_parity), |
4358 "Thread " PTR_FORMAT " has incorrect parity %d != %d", p2i(p), thread_parity, _thread_claim_parity); |
4365 "Thread " PTR_FORMAT " has incorrect parity %d != %d", p2i(p), thread_parity, _thread_claim_parity); |
4359 } |
4366 } |
|
4367 VMThread* vmt = VMThread::vm_thread(); |
|
4368 const int thread_parity = vmt->oops_do_parity(); |
|
4369 assert((thread_parity == _thread_claim_parity), |
|
4370 "VMThread " PTR_FORMAT " has incorrect parity %d != %d", p2i(vmt), thread_parity, _thread_claim_parity); |
4360 } |
4371 } |
4361 #endif // ASSERT |
4372 #endif // ASSERT |
4362 |
4373 |
4363 void Threads::possibly_parallel_oops_do(bool is_par, OopClosure* f, CodeBlobClosure* cf) { |
4374 void Threads::possibly_parallel_oops_do(bool is_par, OopClosure* f, CodeBlobClosure* cf) { |
4364 int cp = Threads::thread_claim_parity(); |
4375 int cp = Threads::thread_claim_parity(); |