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

Y. Srinivas Ramakrishna ysr at openjdk.org
Tue Oct 8 18:08:05 UTC 2024


On Mon, 7 Oct 2024 19:15:01 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> Clean backport.
>
> William Kemper has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8341554: Shenandoah: Missing heap lock when updating usage for soft ref policy
>   
>   Reviewed-by: kdnilsen, ysr

Marked as reviewed by ysr (Reviewer).

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

> 184:         ShenandoahHeapLocker locker(heap->lock());
> 185:         heap->update_capacity_and_used_at_gc();
> 186:       }

Backport of changes look sgood, but highlights the lock-unlock-lock-unlock awkwardness. I suppose the mitigating factor is that in most cases the first one doesn't usually lock because free set log status is hopefully disabled in most production scenarios.

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

PR Review: https://git.openjdk.org/jdk23u/pull/129#pullrequestreview-2355186471
PR Review Comment: https://git.openjdk.org/jdk23u/pull/129#discussion_r1792298556


More information about the jdk-updates-dev mailing list