RFR: 8315219: G1: Improve allocator pathological case where it keeps doing direct allocations instead of retiring a PLAB [v2]
Thomas Schatzl
tschatzl at openjdk.org
Wed Aug 30 10:40:10 UTC 2023
On Wed, 30 Aug 2023 10:12:02 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> Ivan Walulya has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - nit
>> - nit
>> - Thomas Review
>
> src/hotspot/share/gc/g1/g1Allocator.cpp line 389:
>
>> 387: may_throw_away_buffer(words_remaining, plab_word_size)) {
>> 388:
>> 389: guarantee(words_remaining <= required_in_plab, "must be");
>
> What's the intend of this check? Also, if the two are equal, plab-alloc should have succeeded, so one shouldn't retire the current plab.
This is a (pre-existing) sanity check (that is correct but a little imprecise because in the == case we would not reach here) and could (and probably should because it is somewhat confusing) be removed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15482#discussion_r1310062211
More information about the hotspot-gc-dev
mailing list