changeset 2469:d660c00d91bf

8166002: Emulate client build on platforms with reduced virtual address space Summary: The default VM ergonomics on Windows/x86 (32-bit) are changed to client like. Reviewed-by: kvn, iveresov
author jcm
date Tue, 17 Jan 2017 21:39:22 -0800
parents 2cbdf0b3aa54
children 80194979fde3
files test/jtreg-ext/requires/VMProps.java test/lib/jdk/test/lib/Platform.java
diffstat 2 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/test/jtreg-ext/requires/VMProps.java	Fri Jan 13 18:26:33 2017 +0100
+++ b/test/jtreg-ext/requires/VMProps.java	Tue Jan 17 21:39:22 2017 -0800
@@ -64,6 +64,7 @@
         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());
         vmGC(map); // vm.gc.X = true/false
 
@@ -169,6 +170,17 @@
     }
 
     /**
+     * @return true if VM runs in emulated-client mode and false otherwise.
+     */
+    protected String vmEmulatedClient() {
+        String vmInfo = System.getProperty("java.vm.info");
+        if (vmInfo == null) {
+            return "false";
+        }
+        return "" + vmInfo.contains(" emulated-client");
+    }
+
+    /**
      * @return supported CPU features
      */
     protected String cpuFeatures() {
--- a/test/lib/jdk/test/lib/Platform.java	Fri Jan 13 18:26:33 2017 +0100
+++ b/test/lib/jdk/test/lib/Platform.java	Tue Jan 17 21:39:22 2017 -0800
@@ -63,6 +63,10 @@
         return vmName.contains("Embedded");
     }
 
+    public static boolean isEmulatedClient() {
+        return vmInfo.contains(" emulated-client");
+    }
+
     public static boolean isTieredSupported() {
         return compiler.contains("Tiered Compilers");
     }