RFR: 8201316: Move G1-related static members from JavaThread to G1BarrierSet

Per Liden per.liden at oracle.com
Tue Apr 10 12:09:55 UTC 2018

Hi Aleksey,

On 04/10/2018 01:19 PM, Aleksey Shipilev wrote:
> On 04/10/2018 01:05 PM, Per Liden wrote:
>> As part of the effort to make GCs more pluggable, the G1-specific data in JavaThread should be moved
>> out into a more appropriate abstraction.
>> The first step is to move G1's static members (_satb_mark_queue_set and _dirty_card_queue_set) from
>> JavaThread to the G1BarrierSet.
>> This will be followed up by JDK-8201318, which is a more complex change, to remove the non-static G1
>> members in JavaThread.
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8201316
>> Webrev: http://cr.openjdk.java.net/~pliden/8201316/webrev.0
> I actually think we should instead move SATB machinery into gc/shared (Shenandoah uses it!), and
> leave these static members in the JavaThread.

I agree, and I don't think this change stops you from working towards 
that goal. As you know, we're working towards having more appropriate 
abstractions to make GCs more pluggable, which this RFE and the followup 
change JDK-8201318 (sent to hotspot-dev) is trying to address.

With the G1-specific stuff is cleaned out from JavaThread, I think it 
will be easier for you to see what G1-dependencies you really have in 
Shenandoah, and start work to break those dependencies or move code to 
gc/shared if needed.


> See:
>    https://bugs.openjdk.java.net/browse/JDK-8154343
> -Aleksey

More information about the hotspot-gc-dev mailing list