< prev index next >

test/lib/jdk/test/lib/Platform.java

Print this page
rev 2242 : 8165315: [ppc] Port "8133749: NMT detail stack trace cleanup"
Summary: Also add methods to check for slow/fastdebug to Platform.java.
Reviewed-by: simonis, cjplummer, dholmes


  99     public static boolean isSolaris() {
 100         return isOs("sunos");
 101     }
 102 
 103     public static boolean isWindows() {
 104         return isOs("win");
 105     }
 106 
 107     private static boolean isOs(String osname) {
 108         return osName.toLowerCase().startsWith(osname.toLowerCase());
 109     }
 110 
 111     public static String getOsName() {
 112         return osName;
 113     }
 114 
 115     public static boolean isDebugBuild() {
 116         return (jdkDebug.toLowerCase().contains("debug"));
 117     }
 118 








 119     public static String getVMVersion() {
 120         return vmVersion;
 121     }
 122 
 123     // Returns true for sparc and sparcv9.
 124     public static boolean isSparc() {
 125         return isArch("sparc.*");
 126     }
 127 
 128     public static boolean isARM() {
 129         return isArch("arm.*");
 130     }
 131 
 132     public static boolean isPPC() {
 133         return isArch("ppc.*");
 134     }
 135 
 136     public static boolean isX86() {
 137         // On Linux it's 'i386', Windows 'x86' without '_64' suffix.
 138         return isArch("(i386)|(x86(?!_64))");




  99     public static boolean isSolaris() {
 100         return isOs("sunos");
 101     }
 102 
 103     public static boolean isWindows() {
 104         return isOs("win");
 105     }
 106 
 107     private static boolean isOs(String osname) {
 108         return osName.toLowerCase().startsWith(osname.toLowerCase());
 109     }
 110 
 111     public static String getOsName() {
 112         return osName;
 113     }
 114 
 115     public static boolean isDebugBuild() {
 116         return (jdkDebug.toLowerCase().contains("debug"));
 117     }
 118 
 119     public static boolean isSlowDebugBuild() {
 120         return (jdkDebug.toLowerCase().equals("slowdebug"));
 121     }
 122 
 123     public static boolean isFastDebugBuild() {
 124         return (jdkDebug.toLowerCase().equals("fastdebug"));
 125     }
 126 
 127     public static String getVMVersion() {
 128         return vmVersion;
 129     }
 130 
 131     // Returns true for sparc and sparcv9.
 132     public static boolean isSparc() {
 133         return isArch("sparc.*");
 134     }
 135 
 136     public static boolean isARM() {
 137         return isArch("arm.*");
 138     }
 139 
 140     public static boolean isPPC() {
 141         return isArch("ppc.*");
 142     }
 143 
 144     public static boolean isX86() {
 145         // On Linux it's 'i386', Windows 'x86' without '_64' suffix.
 146         return isArch("(i386)|(x86(?!_64))");


< prev index next >