test/testlibrary/com/oracle/java/testlibrary/Platform.java

Print this page
rev 5903 : 8007270: Make IsMethodCompilable test work with tiered
Summary: Only c2 compiles counts toward cutoff
Reviewed-by:

@@ -26,10 +26,19 @@
 public class Platform {
     private static final String osName      = System.getProperty("os.name");
     private static final String dataModel   = System.getProperty("sun.arch.data.model");
     private static final String vmVersion   = System.getProperty("java.vm.version");
     private static final String osArch      = System.getProperty("os.arch");
+    private static final String vmName      = System.getProperty("java.vm.name");
+
+     public static boolean isClient() {
+         return vmName.endsWith(" Client VM");
+     }
+ 
+     public static boolean isServer() {
+         return vmName.endsWith(" Server VM");
+     }
 
     public static boolean is32bit() {
         return dataModel.equals("32");
     }