RFR: 8325574: Shenandoah: Simplify and enhance reporting of requested GCs

William Kemper wkemper at openjdk.org
Mon Feb 12 21:40:15 UTC 2024


On Mon, 12 Feb 2024 10:27:33 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Shenandoah distinguishes between 'implicit' and 'explicit' GC requests. The distinction is used to decide whether or not a request is serviced concurrently or with a full GC. The data collected is also included in the end-of-process report. This change simplifies handling of these requests and adds a tally of the underlying GC causes to the end-of-process report.
>
> src/hotspot/share/gc/shenandoah/shenandoahCollectorPolicy.cpp line 98:
> 
>> 96: }
>> 97: 
>> 98: bool is_explicit_gc(GCCause::Cause cause) {
> 
> There is `ShenandoahControlThread::is_explicit_gc` too. I think we should have a shared definition for this somewhere. Maybe `ShenandoahControlThread` should delegate to `ShenandoahCollectorPolicy` then?

Yes. I'll factor it's usage into `ShenandoahCollectorPolicy`.

> src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp line 385:
> 
>> 383: bool ShenandoahControlThread::should_run_full_gc(GCCause::Cause cause) {
>> 384:   return is_explicit_gc(cause) ? !ExplicitGCInvokesConcurrent : !ShenandoahImplicitGCInvokesConcurrent;
>> 385: }
> 
> This sounds like a policy decision, which means a good fit for it is in `ShenandoahCollectorPolicy`?

Agree. Moved it in there.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17795#discussion_r1486803499
PR Review Comment: https://git.openjdk.org/jdk/pull/17795#discussion_r1486804033


More information about the shenandoah-dev mailing list