RFR: 8351444: Shenandoah: Class Unloading may encounter recycled oops [v2]
Aleksey Shipilev
shade at openjdk.org
Mon Mar 10 19:47:55 UTC 2025
On Mon, 10 Mar 2025 18:55:51 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.
>
> William Kemper has updated the pull request incrementally with two additional commits since the last revision:
>
> - Consider trash regions to be in the heap during concurrent weak roots
> - Better comment for LRB when accessing unreachable oops
src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp line 127:
> 125: // Note that this may also interfere with the DeadCounterClosure when visiting weak oop storage,
> 126: // but it does not seem to be a problem in practice because the dead count callbacks do not care
> 127: // about the precise number of dead objects (only that there are dead objects).
The last 3 lines feel too specific, really :) I think that paragraph should be in the related bug report.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23951#discussion_r1987915941
More information about the shenandoah-dev
mailing list