RFR: 8334769: Shenandoah: Move CodeCache_lock close to its use in ShenandoahConcurrentNMethodIterator

Aleksey Shipilev shade at openjdk.org
Mon Jun 24 17:37:12 UTC 2024


On Mon, 24 Jun 2024 13:46:23 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

> ShenandoahConcurrentNMethodIterator requires CodeCache_lock at begin and end of iteration.
> 
> Currently, the CodeCache_lock is acquired by their callers, which is not very obvious and readable. Let's move the lock inside the methods.

Agree, it looks cleaner that way, and has a symmetry with how `ShenandoahCodeRootsIterator` does it.

@kdnilsen @earthling-amzn might need to take a look.

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

Marked as reviewed by shade (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/19859#pullrequestreview-2136396732
PR Comment: https://git.openjdk.org/jdk/pull/19859#issuecomment-2187077643


More information about the hotspot-gc-dev mailing list