--- a/test/hotspot/jtreg/gc/g1/TestGCLogMessages.java Wed Nov 20 16:10:38 2019 -0800
+++ b/test/hotspot/jtreg/gc/g1/TestGCLogMessages.java Wed Nov 20 18:23:06 2019 -0800
@@ -35,12 +35,14 @@
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run main gc.g1.TestGCLogMessages
+ * sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
+ * gc.g1.TestGCLogMessages
*/
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
-import jdk.test.lib.Platform;
+import sun.hotspot.code.Compiler;
public class TestGCLogMessages {
@@ -85,7 +87,7 @@
}
public boolean isAvailable() {
- return Platform.isGraal() || Platform.isServer();
+ return Compiler.isC2Enabled() || Compiler.isGraalEnabled();
}
}