Skip to content

Commit

Permalink
8346713: [testsuite] NeverActAsServerClassMachine breaks TestPLABAdap…
Browse files Browse the repository at this point in the history
…tToMinTLABSize.java TestPinnedHumongousFragmentation.java TestPinnedObjectContents.java

Backport-of: 43b7e9f
  • Loading branch information
Jan Kratochvil authored and RealCLanger committed Jan 14, 2025
1 parent 33561bf commit 9c91ef4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
25 changes: 19 additions & 6 deletions test/hotspot/jtreg/gc/TestPLABAdaptToMinTLABSize.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,29 @@
package gc;

/*
* @test TestPLABAdaptToMinTLABSize
* @test TestPLABAdaptToMinTLABSizeG1
* @bug 8289137
* @summary Make sure that Young/OldPLABSize adapt to MinTLABSize setting.
* @requires vm.gc.Parallel | vm.gc.G1
* @requires vm.gc.G1
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
* @run driver gc.TestPLABAdaptToMinTLABSize
* @run driver gc.TestPLABAdaptToMinTLABSize -XX:+UseG1GC
*/

/*
* @test TestPLABAdaptToMinTLABSizeParallel
* @bug 8289137
* @summary Make sure that Young/OldPLABSize adapt to MinTLABSize setting.
* @requires vm.gc.Parallel
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
* @run driver gc.TestPLABAdaptToMinTLABSize -XX:+UseParallelGC
*/

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;

import jdk.test.lib.process.OutputAnalyzer;
Expand Down Expand Up @@ -68,9 +80,10 @@ private static void runTest(boolean shouldSucceed, String... extraArgs) throws E
}

public static void main(String[] args) throws Exception {
runTest(true, "-XX:MinTLABSize=100k");
String gc = args[0];
runTest(true, gc, "-XX:MinTLABSize=100k");
// Should not succeed when explicitly specifying invalid combination.
runTest(false, "-XX:MinTLABSize=100k", "-XX:OldPLABSize=5k");
runTest(false, "-XX:MinTLABSize=100k", "-XX:YoungPLABSize=5k");
runTest(false, gc, "-XX:MinTLABSize=100k", "-XX:OldPLABSize=5k");
runTest(false, gc, "-XX:MinTLABSize=100k", "-XX:YoungPLABSize=5k");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm -Xlog:gc+region=trace -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
* -XX:VerifyGCType=full -XX:+VerifyDuringGC -XX:+VerifyAfterGC -XX:+WhiteBoxAPI -Xbootclasspath/a:.
* -XX:VerifyGCType=full -XX:+VerifyDuringGC -XX:+VerifyAfterGC -XX:+WhiteBoxAPI -XX:+UseG1GC -Xbootclasspath/a:.
* gc.g1.pinnedobjs.TestPinnedHumongousFragmentation
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
* java.management
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+ZapUnusedHeapArea -Xlog:gc,gc+ergo+cset=trace gc.g1.pinnedobjs.TestPinnedObjectContents
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+UseG1GC
* -Xbootclasspath/a:. -XX:+ZapUnusedHeapArea -Xlog:gc,gc+ergo+cset=trace gc.g1.pinnedobjs.TestPinnedObjectContents
*/

package gc.g1.pinnedobjs;
Expand Down

0 comments on commit 9c91ef4

Please sign in to comment.