# HG changeset patch # User hseigel # Date 1550235183 18000 # Node ID 622c26f0673fe9f6d3fa14665951738f82cb855a # Parent 454d54d8af1c3b4ce2bb4faa8879e00ec261684b 8079353: [TESTBUG] runtime/CompressedOops/UseCompressedOops.java failed on Windows when getting disjoint instead of zero based coops Summary: On Windows, don't run sub-tests that can be affected by ASLR. Reviewed-by: coleenp, mseledtsov diff -r 454d54d8af1c -r 622c26f0673f test/hotspot/jtreg/ProblemList.txt --- a/test/hotspot/jtreg/ProblemList.txt Fri Feb 15 12:09:53 2019 +0100 +++ b/test/hotspot/jtreg/ProblemList.txt Fri Feb 15 07:53:03 2019 -0500 @@ -82,7 +82,6 @@ runtime/handshake/HandshakeWalkSuspendExitTest.java 8214174 generic-all runtime/SharedArchiveFile/SASymbolTableTest.java 8193639 solaris-all -runtime/CompressedOops/UseCompressedOops.java 8079353 windows-all ############################################################################# diff -r 454d54d8af1c -r 622c26f0673f test/hotspot/jtreg/runtime/CompressedOops/UseCompressedOops.java --- 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 flags1, String... flags2) throws Exception { ArrayList 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