Integrated: 8267188: gc/stringdedup/TestStringDeduplicationInterned.java fails with Shenandoah

Zhengyu Gu zgu at openjdk.java.net
Wed Aug 25 20:19:29 UTC 2021


On Tue, 17 Aug 2021 18:32:54 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

> Shenandoah currently enqueues deduplication candidates when marks object gray.
> 
> However, it can not do so when it scans roots, as it can potentially result lock rank inversion between stack watermark lock and dedup request buffer lock.
> 
> As the result, it can not enqueue as many as candidates as it should be able to, I believe JDK-8271834 is due to the same problem. I purpose we switch to enqueue candidates when we mark object black.
> 
> We are still not able to enqueue all candidates, only when they have displaced headers or have monitor inflating in progress. Upstream is working on removing displaced headers, we should revisit the logic afterward, or we can choose to deduplicate all string regardless their ages.
> 
> 
> 
> Test:
> - [x] hotspot_gc_shenandoah
> - [x] tier1 with -XX:+UseShenandoahGC and -XX:+UseStringDeduplication

This pull request has now been integrated.

Changeset: 7212561d
Author:    Zhengyu Gu <zgu at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/7212561dd1ec65d7f31792959f0eaaab6229eaf4
Stats:     112 lines in 8 files changed: 35 ins; 28 del; 49 mod

8267188: gc/stringdedup/TestStringDeduplicationInterned.java fails with Shenandoah

Reviewed-by: rkennke, shade

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

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


More information about the shenandoah-dev mailing list