1
1
/*
2
- * Copyright (c) 2017, 2018 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2017, 2020 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -257,6 +257,7 @@ private Pair<String, Long> getLastClass(Path errFile) {
257
257
private String [] cmd (long classStart , long classStop ) {
258
258
String phase = phaseName (classStart );
259
259
Path file = Paths .get (phase + ".cmd" );
260
+ var rng = Utils .getRandomInstance ();
260
261
try {
261
262
Files .write (file , List .of (
262
263
"-Xbatch" ,
@@ -283,6 +284,13 @@ private String[] cmd(long classStart, long classStop) {
283
284
String .format ("-XX:ReplayDataFile=replay_%s_%%p.log" , phase ),
284
285
// MethodHandle MUST NOT be compiled
285
286
"-XX:CompileCommand=exclude,java/lang/invoke/MethodHandle.*" ,
287
+ // Stress* are c2-specific stress flags, so IgnoreUnrecognizedVMOptions is needed
288
+ "-XX:+IgnoreUnrecognizedVMOptions" ,
289
+ "-XX:+StressLCM" ,
290
+ "-XX:+StressGCM" ,
291
+ "-XX:+StressIGVN" ,
292
+ // StressSeed is uint
293
+ "-XX:StressSeed=" + Math .abs (rng .nextLong ()),
286
294
// CTW entry point
287
295
CompileTheWorld .class .getName (),
288
296
target ));
0 commit comments