Skip to content

Commit 23c3975

Browse files
author
Man Cao
committed
8373403: [TESTBUG] TestG1ClassUnloadingHWM.java could fail with large G1HeapRegionSize and small InitialHeapSize
Reviewed-by: tschatzl, iwalulya
1 parent f2e56e4 commit 23c3975

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

test/hotspot/jtreg/gc/class_unloading/TestG1ClassUnloadingHWM.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -68,19 +68,21 @@ public static OutputAnalyzer runWithoutG1ClassUnloading() throws Exception {
6868
}
6969

7070
public static void testWithoutG1ClassUnloading() throws Exception {
71-
// -XX:-ClassUnloadingWithConcurrentMark is used, so we expect a full GC instead of a concurrent cycle.
71+
// -XX:-ClassUnloadingWithConcurrentMark is used, so we expect a full GC due to Metadata GC Threshold
72+
// instead of a concurrent cycle.
7273
OutputAnalyzer out = runWithoutG1ClassUnloading();
7374

74-
out.shouldMatch(".*Pause Full.*");
75-
out.shouldNotMatch(".*Pause Young \\(Concurrent Start\\).*");
75+
out.shouldMatch(".*Pause Full \\(Metadata GC Threshold\\).*");
76+
out.shouldNotMatch(".*Pause Young \\(Concurrent Start\\) \\(Metadata GC Threshold\\).*");
7677
}
7778

7879
public static void testWithG1ClassUnloading() throws Exception {
79-
// -XX:+ClassUnloadingWithConcurrentMark is used, so we expect a concurrent cycle instead of a full GC.
80+
// -XX:+ClassUnloadingWithConcurrentMark is used, so we expect a concurrent cycle due to Metadata GC Threshold
81+
// instead of a full GC.
8082
OutputAnalyzer out = runWithG1ClassUnloading();
8183

82-
out.shouldMatch(".*Pause Young \\(Concurrent Start\\).*");
83-
out.shouldNotMatch(".*Pause Full.*");
84+
out.shouldMatch(".*Pause Young \\(Concurrent Start\\) \\(Metadata GC Threshold\\).*");
85+
out.shouldNotMatch(".*Pause Full \\(Metadata GC Threshold\\).*");
8486
}
8587

8688
public static void main(String args[]) throws Exception {

0 commit comments

Comments
 (0)