Skip to content

Commit dd25799

Browse files
committed
8356212: runtime/cds/appcds/LotsOfSyntheticClasses.java timed out with -XX:+AOTClassLinking
Reviewed-by: iklam, shade, syan
1 parent 5f00c87 commit dd25799

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

test/hotspot/jtreg/runtime/cds/appcds/LotsOfSyntheticClasses.java

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,12 @@
4242

4343
public class LotsOfSyntheticClasses {
4444

45-
// Generate 100 top-level classes, each containing 1000 nested classes.
46-
// 100K total classes are more than enough to push the CDS limits.
47-
private static final int NUM_CLASSES = 100;
45+
// Generate 70 top-level classes, each containing 1000 nested classes.
46+
// 70K total classes is enough to push the CDS limits. Any archived
47+
// collection that holds Classes should not have backing storage larger
48+
// than CDS archival limit (256KB). This means we want at least 64K classes
49+
// to probe that limit.
50+
private static final int NUM_CLASSES = 70;
4851
private static final int NUM_NESTED_CLASSES = 1000;
4952

5053
private static final Path USER_DIR = Paths.get(CDSTestUtils.getOutputDir());
@@ -117,17 +120,22 @@ public static void main(String[] args) throws Exception {
117120
OutputAnalyzer output = TestCommon.createArchive(
118121
APP_JAR.toString(),
119122
listAppClasses(),
120-
MAIN_CLASS_NAME
123+
MAIN_CLASS_NAME,
124+
// Verification for lots of classes slows down the test.
125+
"-XX:+IgnoreUnrecognizedVMOptions",
126+
"-XX:-VerifyDependencies",
127+
"-XX:-VerifyBeforeExit"
121128
);
122129
TestCommon.checkDump(output);
123130
}
124131

125132
// Step 3. Try to run, touching every class.
126133
{
127134
TestCommon.run(
128-
// Verifying dependencies for lots of classes slows down the test.
129-
"-XX:+IgnoreUnrecognizedVMOptions", "-XX:-VerifyDependencies",
130-
"-Xlog:cds",
135+
// Verification for lots of classes slows down the test.
136+
"-XX:+IgnoreUnrecognizedVMOptions",
137+
"-XX:-VerifyDependencies",
138+
"-XX:-VerifyBeforeExit",
131139
"-cp", APP_JAR.toString(),
132140
MAIN_CLASS_NAME).
133141
assertNormalExit("Success");

0 commit comments

Comments
 (0)