|
42 | 42 |
|
43 | 43 | public class LotsOfSyntheticClasses {
|
44 | 44 |
|
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; |
48 | 51 | private static final int NUM_NESTED_CLASSES = 1000;
|
49 | 52 |
|
50 | 53 | private static final Path USER_DIR = Paths.get(CDSTestUtils.getOutputDir());
|
@@ -117,17 +120,22 @@ public static void main(String[] args) throws Exception {
|
117 | 120 | OutputAnalyzer output = TestCommon.createArchive(
|
118 | 121 | APP_JAR.toString(),
|
119 | 122 | 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" |
121 | 128 | );
|
122 | 129 | TestCommon.checkDump(output);
|
123 | 130 | }
|
124 | 131 |
|
125 | 132 | // Step 3. Try to run, touching every class.
|
126 | 133 | {
|
127 | 134 | 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", |
131 | 139 | "-cp", APP_JAR.toString(),
|
132 | 140 | MAIN_CLASS_NAME).
|
133 | 141 | assertNormalExit("Success");
|
|
0 commit comments