On Mon, 30 Oct 2023 13:46:21 GMT, Albert Mingkun Yang <[email protected]> wrote:
>> Apart from having an early return in the `should_compact`-if, one option
>> would be making `has_pinned_objects()` more clever by stating something like:
>>
>>
>> bool has_pinned_objects() const {
>> return pinned_count() > 0 || (is_continues_humongous() &&
>> humongous_start_region()->pinned_count() > 0);
>> }
>>
>>
>> Then this predicate would get shorter. Or add a local helper for that (as
>> suggested in the next commit). Either is fine with me.
>
> A local helper is possibly clearer here, IMO.
Done in one of the latest commits. Resolving.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16342#discussion_r1376594853