< prev index next >
test/jtreg-ext/requires/VMProps.java
Print this page
*** 35,44 ****
--- 35,45 ----
import java.util.regex.Pattern;
import sun.hotspot.cpuinfo.CPUInfo;
import sun.hotspot.gc.GC;
import sun.hotspot.WhiteBox;
+ import jdk.test.lib.Platform;
/**
* The Class to be invoked by jtreg prior Test Suite execution to
* collect information about VM.
* Do not use any API's that may not be available in all target VMs.
*** 64,73 ****
--- 65,76 ----
map.put("vm.simpleArch", vmArch());
map.put("vm.debug", vmDebug());
map.put("vm.jvmci", vmJvmci());
map.put("vm.emulatedClient", vmEmulatedClient());
map.put("vm.cpu.features", cpuFeatures());
+ map.put("vm.rtm.cpu", vmRTMCPU());
+ map.put("vm.rtm.os", vmRTMOS());
vmGC(map); // vm.gc.X = true/false
VMProps.dump(map);
return map;
}
*** 204,213 ****
--- 207,246 ----
map.put("vm.gc." + gc.name(), "" + isAcceptable);
}
}
/**
+ * @return true if VM runs RTM supported OS and false otherwise.
+ */
+ protected String vmRTMOS() {
+ boolean isRTMOS = true;
+
+ if (Platform.isAix()) {
+ // Actually, this works since AIX 7.1.3.30, but os.version property
+ // is set to 7.1.
+ isRTMOS = (Platform.getOsVersionMajor() > 7) ||
+ (Platform.getOsVersionMajor() == 7 && Platform.getOsVersionMinor() > 1);
+
+ } else if (Platform.isLinux()) {
+ if (Platform.isPPC()) {
+ isRTMOS = (Platform.getOsVersionMajor() > 4) ||
+ (Platform.getOsVersionMajor() == 4 && Platform.getOsVersionMinor() > 1);
+ }
+ }
+ return "" + isRTMOS;
+ }
+
+ /**
+ * @return true if VM runs RTM supported CPU and false otherwise.
+ */
+ protected String vmRTMCPU() {
+ boolean vmRTMCPU = (Platform.isPPC() ? CPUInfo.hasFeature("tcheck") : CPUInfo.hasFeature("rtm"));
+
+ return "" + vmRTMCPU;
+ }
+
+ /**
* Dumps the map to the file if the file name is given as the property.
* This functionality could be helpful to know context in the real
* execution.
*
* @param map
< prev index next >