Skip to content

Commit 78d50c0

Browse files
committed
8358756: [s390x] Test StartupOutput.java crash due to CodeCache size
Reviewed-by: lucy, dfenacci
1 parent 2e06a91 commit 78d50c0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/hotspot/jtreg/compiler/startup/StartupOutput.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
package compiler.startup;
3838

39+
import jdk.test.lib.Platform;
3940
import jdk.test.lib.process.OutputAnalyzer;
4041
import jdk.test.lib.process.ProcessTools;
4142
import jdk.test.lib.Utils;
@@ -60,8 +61,11 @@ public static void main(String[] args) throws Exception {
6061
throw new Exception("VM crashed with exit code " + exitCode);
6162
}
6263

64+
// On s390x, generated code is ~6x larger in fastdebug and ~1.4x in release builds vs. other archs,
65+
// hence we require slightly more minimum space.
66+
int minInitialSize = 800 + (Platform.isS390x() ? 800 : 0);
6367
for (int i = 0; i < 200; i++) {
64-
int initialCodeCacheSizeInKb = 800 + rand.nextInt(400);
68+
int initialCodeCacheSizeInKb = minInitialSize + rand.nextInt(400);
6569
int reservedCodeCacheSizeInKb = initialCodeCacheSizeInKb + rand.nextInt(200);
6670
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:InitialCodeCacheSize=" + initialCodeCacheSizeInKb + "K", "-XX:ReservedCodeCacheSize=" + reservedCodeCacheSizeInKb + "k", "-version");
6771
out = new OutputAnalyzer(pb.start());

0 commit comments

Comments
 (0)