RFR (S): 8138740: Start initial mark right after mixed GC if needed

Derek White derek.white at oracle.com
Thu Oct 29 22:31:15 UTC 2015


Hi Thomas,

I've been thinking of "last_young_gc" as really "consider doing a mixed 
GC next time". So this gets set at the end of marking in 
record_concurrent_mark_cleanup_completed(), and checked in 
record_collection_pause_end().

So my question is why add a pre-filter in 
record_concurrent_mark_cleanup_completed() when I think the same 
condition is filtered out in record_collection_pause_end() any way?

Another way to think of it is to scrap the notion of "last_young_gc" 
completely, because that may or may not be true based on the READER of 
that variable, not the SETTER. i.e. - You don't know if the current 
young_only GC is the last one until it is over, and then you immediately 
switch over to mixed_mode GC anyway, so I think it's more of a condition 
than a state.

Instead, rename "last_young_gc" to "concurrent_mark_completed". Then 
unconditionally and unambiguously call 
set_concurrent_mark_completed(true) in 
record_concurrent_mark_cleanup_completed(), and check 
concurrent_mark_completed() in record_collection_pause_end().

This is a step in the direction of creating a state machine for the 
concurrent mark phase. Does this make any sense?

  - Derek

On 10/28/15 4:36 PM, Thomas Schatzl wrote:
> Hi all,
>
>    can I have reviews for this small change that makes the marking cycle
> start faster, to potentially allow marking to complete in time if mixed
> gc does not clear out just enough memory for otherwise making the
> marking cycle not complete?
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8138740
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8138740/webrev/
> Testing:
> jprt, vm.gc, manual testing
>
> Thanks,
>    Thomas
>
>
>
>




More information about the hotspot-gc-dev mailing list