Blocks :
|
|
Relates :
|
|
Relates :
|
From [~kbarrett]: "The existing 3-phase processing is nice and simple and general, but it is really not helpful when one starts dealing with parallelism, scaling issues, and task startup/termination costs. Various changes in reference processing since that 3-phase approach was instituted allow or make more beneficial various changes. A better set of phases would be something like (1) Current phase1 for SoftReferences (maybe; JDK-8051680). (2) Walk discovered Soft/Weak/FinalReferences (together) and, if NULL or live referent then drop (applying keep_alive to the referent, but complete_gc is not needed), else if not FinalReference then clear and enqueue. (3) Walk discovered FinalReferences residue from (2), applying keep_alive and complete_gc, and enqueue. (4) Walk discovered PhantomReferences and (a) drop those with NULL or live referents (applying keep_alive to the referent, but complete_gc is not needed), and (b) clear and enqueue those with dead referents." This reduces the number of work gang uses from 9 to 4 and allows better usage of parallelism due to larger per-phase workloads
|