equal
deleted
inserted
replaced
747 // GC Support |
747 // GC Support |
748 bool Thread::claim_oops_do_par_case(int strong_roots_parity) { |
748 bool Thread::claim_oops_do_par_case(int strong_roots_parity) { |
749 jint thread_parity = _oops_do_parity; |
749 jint thread_parity = _oops_do_parity; |
750 if (thread_parity != strong_roots_parity) { |
750 if (thread_parity != strong_roots_parity) { |
751 jint res = Atomic::cmpxchg(strong_roots_parity, &_oops_do_parity, thread_parity); |
751 jint res = Atomic::cmpxchg(strong_roots_parity, &_oops_do_parity, thread_parity); |
752 if (res == thread_parity) return true; |
752 if (res == thread_parity) { |
753 else { |
753 return true; |
|
754 } else { |
754 guarantee(res == strong_roots_parity, "Or else what?"); |
755 guarantee(res == strong_roots_parity, "Or else what?"); |
755 assert(SharedHeap::heap()->n_par_threads() > 0, |
756 assert(SharedHeap::heap()->n_par_threads() > 0, |
756 "Should only fail when parallel."); |
757 "Should only fail when parallel."); |
757 return false; |
758 return false; |
758 } |
759 } |
3903 if (p->claim_oops_do(is_par, cp)) { |
3904 if (p->claim_oops_do(is_par, cp)) { |
3904 p->oops_do(f, cf); |
3905 p->oops_do(f, cf); |
3905 } |
3906 } |
3906 } |
3907 } |
3907 VMThread* vmt = VMThread::vm_thread(); |
3908 VMThread* vmt = VMThread::vm_thread(); |
3908 if (vmt->claim_oops_do(is_par, cp)) |
3909 if (vmt->claim_oops_do(is_par, cp)) { |
3909 vmt->oops_do(f, cf); |
3910 vmt->oops_do(f, cf); |
|
3911 } |
3910 } |
3912 } |
3911 |
3913 |
3912 #ifndef SERIALGC |
3914 #ifndef SERIALGC |
3913 // Used by ParallelScavenge |
3915 // Used by ParallelScavenge |
3914 void Threads::create_thread_roots_tasks(GCTaskQueue* q) { |
3916 void Threads::create_thread_roots_tasks(GCTaskQueue* q) { |