mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
6484982: G1: process references during evacuation pauses
G1 now uses two reference processors - one is used by concurrent marking and the other is used by STW GCs (both full and incremental evacuation pauses). In an evacuation pause, the reference processor is embedded into the closures used to scan objects. Doing so causes causes reference objects to be 'discovered' by the reference processor. At the end of the evacuation pause, these discovered reference objects are processed - preserving (and copying) referent objects (and their reachable graphs) as appropriate. Reviewed-by: ysr, jwilhelm, brutisso, stefank, tonyp
This commit is contained in:
parent
70bb8e788e
commit
1b62d10b4b
20 changed files with 1448 additions and 632 deletions
|
@ -749,8 +749,9 @@ bool Thread::claim_oops_do_par_case(int strong_roots_parity) {
|
|||
jint thread_parity = _oops_do_parity;
|
||||
if (thread_parity != strong_roots_parity) {
|
||||
jint res = Atomic::cmpxchg(strong_roots_parity, &_oops_do_parity, thread_parity);
|
||||
if (res == thread_parity) return true;
|
||||
else {
|
||||
if (res == thread_parity) {
|
||||
return true;
|
||||
} else {
|
||||
guarantee(res == strong_roots_parity, "Or else what?");
|
||||
assert(SharedHeap::heap()->n_par_threads() > 0,
|
||||
"Should only fail when parallel.");
|
||||
|
@ -3905,8 +3906,9 @@ void Threads::possibly_parallel_oops_do(OopClosure* f, CodeBlobClosure* cf) {
|
|||
}
|
||||
}
|
||||
VMThread* vmt = VMThread::vm_thread();
|
||||
if (vmt->claim_oops_do(is_par, cp))
|
||||
if (vmt->claim_oops_do(is_par, cp)) {
|
||||
vmt->oops_do(f, cf);
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef SERIALGC
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue