Integrated: 8276205: Shenandoah: CodeCache_lock should always be held for initializing code cache iteration

Zhengyu Gu zgu at openjdk.java.net
Mon Nov 1 19:42:19 UTC 2021


On Mon, 1 Nov 2021 15:19:30 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

> There are few bugs in current implementation:
> 1) No CodeCache_lock is held when initialize code cache iterator at safepoints. This is a problem for concurrent GC, since it can initialize a concurrent code cache iterator while holding CodeCache_lock without safepoint check.
> 
> 2) Does not notify waiters upon completion of iteration at safepoints
> 
> 3) Unnecessary held CodeCache_lock during concurrent code cache iteration.
> 
> Test:
> - [x] hotspot_gc_shenandoah on Linux x86_64
> - [x] hotspot_gc_shenandoah on Linux aarch64

This pull request has now been integrated.

Changeset: 99b7b95e
Author:    Zhengyu Gu <zgu at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/99b7b95e014da6e491ba7adfd21de53d6ae166fe
Stats:     6 lines in 2 files changed: 4 ins; 0 del; 2 mod

8276205: Shenandoah: CodeCache_lock should always be held for initializing code cache iteration

Reviewed-by: shade

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

PR: https://git.openjdk.java.net/jdk/pull/6192



More information about the hotspot-gc-dev mailing list