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

Y. Srinivas Ramakrishna ysr at openjdk.org
Fri Feb 9 22:17:08 UTC 2024


On Fri, 9 Feb 2024 19:43:33 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.

LGTM.

src/hotspot/share/gc/shenandoah/shenandoahCollectorPolicy.cpp line 104:

> 102: 
> 103: bool is_implicit_gc(GCCause::Cause cause) {
> 104:   return !is_explicit_gc(cause) &&

Since it's less frequent, you can move this first clause last. May be it doesn't matter :-)

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

> 49:   size_t _alloc_failure_degenerated_upgrade_to_full;
> 50:   size_t _alloc_failure_full;
> 51:   size_t _collection_causes[GCCause::_last_gc_cause];

`_collection_cause_counts[]` ?

src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp line 83:

> 81:     bool alloc_failure_pending = _alloc_failure_gc.is_set();
> 82:     bool is_gc_requested = _gc_requested.is_set();
> 83:     GCCause::Cause requested_gc_cause = _requested_gc_cause;

Let's const this variable, as well as variables default_mode and default_cause above?

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

Marked as reviewed by ysr (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/17795#pullrequestreview-1873247396
PR Review Comment: https://git.openjdk.org/jdk/pull/17795#discussion_r1484843832
PR Review Comment: https://git.openjdk.org/jdk/pull/17795#discussion_r1484852331
PR Review Comment: https://git.openjdk.org/jdk/pull/17795#discussion_r1484835633


More information about the hotspot-gc-dev mailing list