RFR: 8271060: Merge G1CollectedHeap::determine_start_concurrent_mark_gc and G1Policy::decide_on_conc_mark_initiation [v2]

Thomas Schatzl tschatzl at openjdk.java.net
Thu Jul 22 10:48:17 UTC 2021


On Thu, 22 Jul 2021 10:16:54 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   ayang review
>
> bool should_start_concurrent_mark_operation = policy()->decide_on_concurrent_start_pause();
> 
> The name, `decide_on_concurrent_start_pause()`, is not very obvious, IMO; I feel it's because it's trying to do two things: 1. deciding the pause type, 2. returns whether the decided pause type is concurrent_start_gc.
> 
> I wonder if sth like the following (decoupling the two tasks) is clearer:
> 
> 
> policy()->decide_pause_type();
> bool should_start_concurrent_mark_operation = collector_state()->in_concurrent_start_gc();
> 
> 
> Ofc, this is very subjective. The PR is fine as it is.

I updated the code according to @albertnetymk 's suggestions: I've been on the fence about this already anyway.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4867



More information about the hotspot-gc-dev mailing list