RFR: 8334147: Shenandoah: Avoid taking lock for disabled free set logging [v3]

Kelvin Nilsen kdnilsen at openjdk.org
Fri Oct 4 18:04:03 UTC 2024


On Wed, 2 Oct 2024 21:32:28 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> Not clean. Backport to only take lock for logging when log level is enabled.
>
> William Kemper has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix old gen usage of shFreeSet::log_status

src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp line 184:

> 182:       // global soft refs policy, and we better report it every time heap
> 183:       // usage goes down.
> 184:       heap->update_capacity_and_used_at_gc();

This looks suspiciously like it needs to be under heap lock.  In the original code, it was.

src/hotspot/share/gc/shenandoah/shenandoahGenerationalControlThread.cpp line 271:

> 269:       // global soft refs policy, and we better report it every time heap
> 270:       // usage goes down.
> 271:       heap->update_capacity_and_used_at_gc();

same question as above: does this need to be under lock?

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

PR Review Comment: https://git.openjdk.org/shenandoah-jdk21u/pull/113#discussion_r1788097467
PR Review Comment: https://git.openjdk.org/shenandoah-jdk21u/pull/113#discussion_r1788100805


More information about the shenandoah-dev mailing list