[jdk17u] RFR: 8276205: Shenandoah: CodeCache_lock should always be held for initializing code cache iteration
Aleksey Shipilev
shade at openjdk.java.net
Wed Nov 17 14:04:42 UTC 2021
On Mon, 15 Nov 2021 15:58:43 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
> I would like to backport this Shenandoah specific fix to jdk17u.
>
> This patch fixed the bug that not holding CodeCache_lock while initializing concurrent nmethod iterations, that can lead to miscount number of concurrent walker and result assertion failure.
>
> The patch fixed a bug that prevents iterators from walking nmethod concurrently due to holding CodeCache_lock during the walk.
>
> The original patch does not apply cleanly, due to context changes. But the patch is small and simple, conflicts can be easily resolved manually.
>
>
> Test:
> - [x] hotspot_gc_shenandoah
So the "context" difference is that JDK 17u does not have JDK-8273300, which removed `CodeCache_lock` from `ShenandoahCodeRootsIterator`? If so, looks fine.
-------------
Marked as reviewed by shade (Reviewer).
PR: https://git.openjdk.java.net/jdk17u/pull/262
More information about the jdk-updates-dev
mailing list