RFR: 8057586: Explicit GC ignored if GCLocker is active [v7]
Thomas Schatzl
tschatzl at openjdk.org
Tue Apr 18 16:22:48 UTC 2023
On Tue, 18 Apr 2023 15:22:07 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:
>> Hi All,
>>
>> Please review this change to guarantee that at least a Full GC is executed between the invocation and return of `System.gc` or `WhiteBox.fullGC`, even if the call is concurrent with an active `GCLocker `.
>>
>> The change should also handle the issues reported in JDK-8299276.
>>
>> Split into 3 commits, one commit for changes to each GC in [G1, Parallel, Serial].
>>
>> Testing: Tier 1-5.
>
> Ivan Walulya has updated the pull request incrementally with one additional commit since the last revision:
>
> Albert review - is_explicit_gc
Changes requested by tschatzl (Reviewer).
src/hotspot/share/gc/shared/gcCause.hpp line 103:
> 101: cause == GCCause::_wb_full_gc);
> 102: }
> 103:
Not exactly sure what "explict gc"s are, but I would expect something more like this:
Suggestion:
inline static bool is_explicit_gc(GCCause::Cause cause) {
return (is_user_requested_gc(cause) ||
is_serviceability_requested_gc(cause) ||
cause == GCCause::_wb_young_gc) ||
cause == GCCause::_wb_full_gc);
}
because serviceability gcs are also explicitly requested by the user (from command line), and I believe all whitebox gcs are "explicit". Maybe also "_allocation_profiler" and "wb_breakpoint" ones (not sure right now about these ones).
At least the serviceability ones shouldn't be eaten by gc locker either, but maybe there is no guarantee about them to actually occur.
-------------
PR Review: https://git.openjdk.org/jdk/pull/13191#pullrequestreview-1390464630
PR Review Comment: https://git.openjdk.org/jdk/pull/13191#discussion_r1170261898
More information about the hotspot-gc-dev
mailing list