RFR: 8314935: Shenandoah: Unable to throw OOME on back-to-back Full GCs

William Kemper wkemper at openjdk.org
Tue Sep 5 20:34:41 UTC 2023


On Sat, 2 Sep 2023 01:15:46 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> Retry allocations until at least one full gc is complete, do not spin unnecessarily when gc is not making progress.
>
> src/hotspot/share/gc/shenandoah/shenandoahCollectorPolicy.hpp line 46:
> 
>> 44:   volatile size_t _success_full_gcs;
>> 45:   size_t _alloc_failure_degenerated;
>> 46:   size_t _alloc_failure_degenerated_upgrade_to_full;
> 
> In GenShen tip, `_alloc_failure_degenerated_upgrade_to_full` is also declared volatile.

`_alloc_failure_degenerated_upgrade_to_full` is only changed on a safepoint, so it shouldn't need any additional synchronization.

> src/hotspot/share/gc/shenandoah/shenandoahCollectorPolicy.hpp line 87:
> 
>> 85:   void print_gc_stats(outputStream* out) const;
>> 86: 
>> 87:   size_t full_gc_count() const {
> 
> Is it worthwhile to harmonize this with tip and rename to `get_fullgc_count()` ?
> Unless the idea is to change genshen tip to use `full_gc_count()` like here when you pull these changes down.

I went with the style convention established by `cycle_counter`. I don't feel strongly about this. If you prefer `get_full_gc_count`, I can change that here (otherwise, I'll change genshen to use `full_gc_count`).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15500#discussion_r1316376004
PR Review Comment: https://git.openjdk.org/jdk/pull/15500#discussion_r1316377342


More information about the shenandoah-dev mailing list