RFR: 8371369: Parallel: Relax precondition of PSOldGen::expand_and_allocate
Axel Boldt-Christmas
aboldtch at openjdk.org
Fri Nov 7 07:15:03 UTC 2025
On Wed, 5 Nov 2025 19:29:13 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Use more precise precondition for heap/old-gen expansion; the same precondition is also used in its sole caller.
>
> Test: tie1-5
We currently also need to hold `PSOldGenExpand_lock` to do expansion in old gen (when not doing it from a safepoint, or is just `Thread::current()->is_VM_thread()` right now, maybe a bit scary). I cannot really see that we take it in the`!!is_init_completed()` path. Think we also need to either take this lock or loosen the invariant to only require the lock when `is_init_completed() && !Thread::current()->is_VM_thread()`
See `MutableSpace::needs_expand` and `PSOldGen::expand`.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28162#issuecomment-3501053430
More information about the hotspot-gc-dev
mailing list