RFR: 8325574: Shenandoah: Simplify and enhance reporting of requested GCs [v3]

Aleksey Shipilev shade at openjdk.org
Wed Feb 14 15:02:06 UTC 2024


On Mon, 12 Feb 2024 22:27:13 GMT, William Kemper <wkemper 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.
>
> William Kemper has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add comments to new APIs

Looks good, with minor nits.

src/hotspot/share/gc/shenandoah/shenandoahCollectorPolicy.hpp line 93:

> 91: 
> 92:   // Returns true if this is an 'explicit' gc request and ExplicitGCInvokesConcurrent is disabled,
> 93:   // or if this is an 'implicit' gc request and ShenandoahImplicitGCInvokesConcurrent is disabled.

These comments are not really necessary, as they describe the implementation rather than the contract. There is a risk the real implementation would get out of sync with comments later. I think the name conveys the contract well already.

src/hotspot/share/gc/shenandoah/shenandoahCollectorPolicy.hpp line 96:

> 94:   static bool should_run_full_gc(GCCause::Cause cause);
> 95: 
> 96:   // Returns false if this is an `explicit` gc request and DisableExplicitGC is active, otherwise

Same.

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

Marked as reviewed by shade (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/17795#pullrequestreview-1880524122
PR Review Comment: https://git.openjdk.org/jdk/pull/17795#discussion_r1489617367
PR Review Comment: https://git.openjdk.org/jdk/pull/17795#discussion_r1489617455


More information about the shenandoah-dev mailing list