RFR: 8271834: TestStringDeduplicationAgeThreshold intermittent failures on Shenandoah

Aleksey Shipilev shade at openjdk.java.net
Fri Sep 10 12:35:07 UTC 2021


On Wed, 8 Sep 2021 23:59:00 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

> To trigger young GC, the test fills heap with -Xmn amount of garbage. However, -Xmn does not apply to non-generational GC, such as Shenandoah, and -Xmn amount of garbage, sometimes, it not enough to trigger GC, therefore, there is no guarantee that strings can reach deduplication age threshold.
> 
> I purpose to use MXBean to get exact gc count to ensure expected gc cycles actually performed.

It looks okay to me, but others need to have a look.

test/hotspot/jtreg/gc/stringdedup/TestStringDeduplicationTools.java line 102:

> 100:             if (n.getType().equals(GarbageCollectionNotificationInfo.GARBAGE_COLLECTION_NOTIFICATION)) {
> 101:                 GarbageCollectionNotificationInfo info = GarbageCollectionNotificationInfo.from((CompositeData) n.getUserData());
> 102:                 // Shenandoah GC also report GC pauses, skip them

Suggestion:

                // Shenandoah GC also reports GC pauses, skip them

test/hotspot/jtreg/gc/stringdedup/TestStringDeduplicationTools.java line 105:

> 103:                 if (info.getGcName().startsWith("Shenandoah")) {
> 104:                     if ("end of GC cycle".equals(info.getGcAction())) {
> 105:                         gcCount ++;

Suggestion:

                        gcCount++;

test/hotspot/jtreg/gc/stringdedup/TestStringDeduplicationTools.java line 108:

> 106:                     }
> 107:                 } else {
> 108:                     gcCount ++;

Suggestion:

                    gcCount++;

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

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



More information about the hotspot-gc-dev mailing list