RFR (S): JDK-8076225: Move the thread claim parity from SharedHeap to Thread

Bengt Rutisson bengt.rutisson at oracle.com
Mon Mar 30 11:27:57 UTC 2015

Hi everyone,

This patch was contributed by Mikael Gerdin, I'm mostly just shepherding 
this patch in to the repo.


 From the bug report:

The thread claim parity is used to parallelize the scanning of root in 
the JavaThreads. This was placed in SharedHeap, but used by the Thread 
class (Threads::possibly_parallel_oops_do()). Moving this claiming state 
into the Thread class will collect the state information and the usage 
in one place. It will also anther step towards eventually being able to 
remove SharedHeap.

Apart from just moving the claiming state, Mikael also added an assert 
that verifies that all Java threads have the correct parity after a GC. 
This is to quickly find out if anybody forgets to handle the Java 
threads during root processing at some point.


More information about the hotspot-gc-dev mailing list