mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
8358756: [s390x] Test StartupOutput.java crash due to CodeCache size
Reviewed-by: lucy, dfenacci
This commit is contained in:
parent
2e06a91765
commit
78d50c0215
@ -36,6 +36,7 @@
|
||||
|
||||
package compiler.startup;
|
||||
|
||||
import jdk.test.lib.Platform;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.test.lib.Utils;
|
||||
@ -60,8 +61,11 @@ public class StartupOutput {
|
||||
throw new Exception("VM crashed with exit code " + exitCode);
|
||||
}
|
||||
|
||||
// On s390x, generated code is ~6x larger in fastdebug and ~1.4x in release builds vs. other archs,
|
||||
// hence we require slightly more minimum space.
|
||||
int minInitialSize = 800 + (Platform.isS390x() ? 800 : 0);
|
||||
for (int i = 0; i < 200; i++) {
|
||||
int initialCodeCacheSizeInKb = 800 + rand.nextInt(400);
|
||||
int initialCodeCacheSizeInKb = minInitialSize + rand.nextInt(400);
|
||||
int reservedCodeCacheSizeInKb = initialCodeCacheSizeInKb + rand.nextInt(200);
|
||||
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:InitialCodeCacheSize=" + initialCodeCacheSizeInKb + "K", "-XX:ReservedCodeCacheSize=" + reservedCodeCacheSizeInKb + "k", "-version");
|
||||
out = new OutputAnalyzer(pb.start());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user