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

William Kemper wkemper at openjdk.org
Mon Feb 12 21:44:02 UTC 2024


On Mon, 12 Feb 2024 10:29:56 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 138:
> 
>> 136:   out->cr();
>> 137:   out->print_cr(SIZE_FORMAT_W(5) " Successful Concurrent GCs (%.2f%%)", _success_concurrent_gcs, percent_of(_success_concurrent_gcs, completed_gcs));
>> 138:   if (ExplicitGCInvokesConcurrent) {
> 
> Instead of relying on flags here, should we explicitly (pun intended) record `_explicit_collection_causes` and `_implicit_collection_causes`?

That is what used to happen in `ShenandoahControlThread`. It feels like duplicating a result that can be derived from recording the gc causes. The `ExplicitGCInvokesConcurrent` and `ShenandoahImplicitGCInvokesConcurrent` flags aren't manageable, so I don't expect them to be different when the report is generated. I suppose that could change in the future... I'd be more inclined to not tally them at all and just leave the report to show the individual causes without classifying them.

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

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


More information about the shenandoah-dev mailing list