RFR: 8351444: Shenandoah: Class Unloading may encounter recycled oops

William Kemper wkemper at openjdk.org
Mon Mar 10 17:31:53 UTC 2025


On Fri, 7 Mar 2025 21:47:31 GMT, William Kemper <wkemper at openjdk.org> wrote:

> Unloading classes may require a walk of unreachable oops. For this reason, it is not safe to recycle memory before class unloading is complete. This complements existing code to prevent mutators from recycling trash regions while weak roots is in progress.

It isn't just about trash regions. This path through the barrier will also allow access to objects in the collection set (without evacuating them). We also choose the collection set during the final mark safepoint. Alternatively, we could soften the constraint for `ShenandoahHeap::is_in` to allow access to trash regions if concurrent weak roots is in progress.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/23951#issuecomment-2711330793


More information about the hotspot-gc-dev mailing list