Skip to content

Commit

Permalink
8256569: Add C2 compiler stress flags to CTW
Browse files Browse the repository at this point in the history
Reviewed-by: kvn, shade, thartmann
  • Loading branch information
iignatev committed Nov 20, 2020
1 parent e7c7469 commit ff00c59
Showing 1 changed file with 9 additions and 1 deletion.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -257,6 +257,7 @@ private Pair<String, Long> getLastClass(Path errFile) {
private String[] cmd(long classStart, long classStop) {
String phase = phaseName(classStart);
Path file = Paths.get(phase + ".cmd");
var rng = Utils.getRandomInstance();
try {
Files.write(file, List.of(
"-Xbatch",
Expand All @@ -283,6 +284,13 @@ private String[] cmd(long classStart, long classStop) {
String.format("-XX:ReplayDataFile=replay_%s_%%p.log", phase),
// MethodHandle MUST NOT be compiled
"-XX:CompileCommand=exclude,java/lang/invoke/MethodHandle.*",
// Stress* are c2-specific stress flags, so IgnoreUnrecognizedVMOptions is needed
"-XX:+IgnoreUnrecognizedVMOptions",
"-XX:+StressLCM",
"-XX:+StressGCM",
"-XX:+StressIGVN",
// StressSeed is uint
"-XX:StressSeed=" + Math.abs(rng.nextLong()),
// CTW entry point
CompileTheWorld.class.getName(),
target));
Expand Down

0 comments on commit ff00c59

Please sign in to comment.