test/hotspot/jtreg/runtime/CompressedOops/UseCompressedOops.java
changeset 53774 622c26f0673f
parent 53530 f5671b2e74df
child 54034 fa9b16328e6a
--- a/test/hotspot/jtreg/runtime/CompressedOops/UseCompressedOops.java	Fri Feb 15 12:09:53 2019 +0100
+++ b/test/hotspot/jtreg/runtime/CompressedOops/UseCompressedOops.java	Fri Feb 15 07:53:03 2019 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2018, 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
@@ -45,7 +45,9 @@
 
     public static void main(String[] args) throws Exception {
         testCompressedOopsModesGCs();
-        testCompressedOopsModesGCs("-XX:+UseLargePages");
+        if (!Platform.isOSX() && !Platform.isAix()) {
+            testCompressedOopsModesGCs("-XX:+UseLargePages");
+        }
     }
 
     public static void testCompressedOopsModesGCs(String... flags) throws Exception {
@@ -73,7 +75,7 @@
         Collections.addAll(args, flags2);
 
         if (Platform.is64bit()) {
-            // Explicitly turn of compressed oops
+            // Explicitly turn off compressed oops
             testCompressedOops(args, "-XX:-UseCompressedOops", "-Xmx32m")
                 .shouldNotContain("Compressed Oops")
                 .shouldHaveExitValue(0);
@@ -88,11 +90,13 @@
                 .shouldContain("Compressed Oops mode")
                 .shouldHaveExitValue(0);
 
-            // Skip the following three test cases if we're on OSX or Solaris.
+            // Skip the following seven test cases if we're on OSX, Windows, or Solaris.
             //
-            // OSX doesn't seem to care about HeapBaseMinAddress and Solaris
-            // puts the heap way up, forcing different behaviour.
-            if (!Platform.isOSX() && !Platform.isSolaris()) {
+            // OSX doesn't seem to care about HeapBaseMinAddress.  Windows memory
+            // locations are affected by ASLR.  Solaris puts the heap way up,
+            // forcing different behaviour.
+            if (!Platform.isOSX() && !Platform.isWindows() && !Platform.isSolaris()) {
+
                 // Larger than 4gb heap should result in zero based with shift 3
                 testCompressedOops(args, "-XX:+UseCompressedOops", "-Xmx5g")
                     .shouldContain("Zero based")
@@ -179,8 +183,8 @@
     private static OutputAnalyzer testCompressedOops(ArrayList<String> flags1, String... flags2) throws Exception {
         ArrayList<String> args = new ArrayList<>();
 
-        // Always run with these three:
-        args.add("-XX:+PrintCompressedOopsMode");
+        // Always run with these two:
+        args.add("-Xlog:gc+heap+coops=trace");
         args.add("-Xms32m");
 
         // Add the extra flags