RFR: 8349094: GenShen: Race between control and regulator threads may violate assertions [v12]
William Kemper
wkemper at openjdk.org
Mon Feb 24 18:02:55 UTC 2025
On Sat, 15 Feb 2025 00:59:37 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
>> William Kemper has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 30 commits:
>>
>> - Merge remote-tracking branch 'jdk/master' into fix-control-regulator-threads
>> - Old gen bootstrap cycle must make it to init mark
>> - Merge remote-tracking branch 'jdk/master' into fix-control-regulator-threads
>> - Improve message for assertion
>> - Make shutdown safer for threads requesting (or expecting) gc
>> - Do not accept requests if control thread is terminating
>> - Notify waiters when control thread terminates
>> - Add event for control thread state changes
>> - Fix shutdown livelock error
>> - Fix includes
>> - ... and 20 more: https://git.openjdk.org/jdk/compare/ba6c9659...915ffbda
>
> src/hotspot/share/gc/shenandoah/heuristics/shenandoahOldHeuristics.hpp line 188:
>
>> 186:
>> 187: bool should_start_gc() override;
>> 188: bool resume_old_cycle();
>
> Documentation comment please, especially explaining the return value.
> For things that may return `false` and not do anything, it's better to use `try_` prefix. In fact, the method doesn't actually resume the cycle, but checks if we are in a state such that we should resume it. So, I'd name it `should_resume_old_cycle()`, consistent with the name `should_start_gc()` for the previous method.
That makes sense. Will do.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23475#discussion_r1968146250
More information about the shenandoah-dev
mailing list