8147017: Platform.isGraal should be removed
authoriignatyev
Wed, 20 Nov 2019 18:23:06 -0800
changeset 59162 09b295eb214b
parent 59161 6374e632b1ea
child 59163 39ac7aeb6fde
8147017: Platform.isGraal should be removed Reviewed-by: kvn, mseledtsov
test/hotspot/jtreg/gc/g1/TestGCLogMessages.java
test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java
test/hotspot/jtreg/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java
test/lib/jdk/test/lib/Platform.java
test/lib/jdk/test/lib/cli/CommandLineOptionTest.java
--- 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();
         }
     }
 
--- a/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java	Wed Nov 20 16:10:38 2019 -0800
+++ b/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java	Wed Nov 20 18:23:06 2019 -0800
@@ -67,8 +67,6 @@
             VMType = "-client";
         } else if (Platform.isMinimal()) {
             VMType = "-minimal";
-        } else if (Platform.isGraal()) {
-            VMType = "-graal";
         } else {
             VMType = null;
         }
--- a/test/hotspot/jtreg/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java	Wed Nov 20 16:10:38 2019 -0800
+++ b/test/hotspot/jtreg/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java	Wed Nov 20 18:23:06 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, 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
@@ -48,7 +48,7 @@
         ARCH("isAArch64", "isARM", "isPPC", "isS390x", "isSparc", "isX64", "isX86"),
         BITNESS("is32bit", "is64bit"),
         OS("isAix", "isLinux", "isOSX", "isSolaris", "isWindows"),
-        VM_TYPE("isClient", "isServer", "isGraal", "isMinimal", "isZero", "isEmbedded"),
+        VM_TYPE("isClient", "isServer", "isMinimal", "isZero", "isEmbedded"),
         MODE("isInt", "isMixed", "isComp"),
         IGNORED("isEmulatedClient", "isDebugBuild", "isFastDebugBuild",
                 "isSlowDebugBuild", "hasSA", "shouldSAAttach", "isTieredSupported",
--- a/test/lib/jdk/test/lib/Platform.java	Wed Nov 20 16:10:38 2019 -0800
+++ b/test/lib/jdk/test/lib/Platform.java	Wed Nov 20 18:23:06 2019 -0800
@@ -59,10 +59,6 @@
         return vmName.endsWith(" Server VM");
     }
 
-    public static boolean isGraal() {
-        return vmName.endsWith(" Graal VM");
-    }
-
     public static boolean isZero() {
         return vmName.endsWith(" Zero VM");
     }
--- a/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java	Wed Nov 20 16:10:38 2019 -0800
+++ b/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java	Wed Nov 20 18:23:06 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, 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
@@ -500,8 +500,6 @@
             return "-client";
         } else if (Platform.isMinimal()) {
             return "-minimal";
-        } else if (Platform.isGraal()) {
-            return "-graal";
         }
         throw new RuntimeException("Unknown VM mode.");
     }