RFR: 8153194: PreserveFPRegistersTest.java runs out of memory in the nightlies

Rahul Raghavan rahul.v.raghavan at oracle.com
Wed Jun 22 17:20:25 UTC 2016


Hi,

Please review the following test fix patch for JDK-8153194.
<webrev.00> :  http://cr.openjdk.java.net/~rraghavan/8153194/webrev.00/ 


Notes:

https://bugs.openjdk.java.net/browse/JDK-8153194 - PreserveFPRegistersTest.java runs out of memory in the nightlies
https://bugs.openjdk.java.net/browse/JDK-8148175 - C1: G1 barriers don't preserve FP registers

- 'hotspot/test/compiler/gcbarriers/PreserveFPRegistersTest.java' was added as part of the old JDK-8148175 fix.
- The 'PreserveFPRegistersTest.java' started failing in nightly tests for 64-bit targets only with -XX:-UseCompressedOops enabled.
- Found wrong hard coded usage of reference size as 32 bits in test caused OutOfMemoryError, for -XX:-UseCompressedOops cases.

Changes done -
- Actual fix of setting reference size using WhiteBox.getHeapOopSize() and removed @ignore.
- Used WhiteBox.g1RegionSize() instead of hard coded value.
- Used -Xmx300m instead of -Xmx128m for run VM options.
  (found this change is required for the test to fail correctly using old JDK9 builds prior to JDK-8148175 fix.
   e.g.: for test to fail with "java.lang.AssertionError: Final value has changed: 0.0 != 6.0" using JDK9-b113.
  Please note same -Xmx300m used for failing case reported in JDK-8148175.
- Added diagnostic output.

Testing done -
- Confirmed revised test fails as expected using old jdk9 builds prior to JDK-8148175 fix (e.g.: JDK9-b113)
   >> [Test finished: compiler/gcbarriers/PreserveFPRegistersTest.java: Failed. Execution failed: `main' threw exception: java.lang.AssertionError: Final value has changed: 0.0 != 6.0]
(for default run and with -XX:-UseCompressedOops)

-  Confirmed revised test is passing for latest source build (.i.e. with JDK-8148175 fix, starting from JDK9-b114)
(with and without -XX:-UseCompressedOops)


Thanks,
Rahul


More information about the hotspot-compiler-dev mailing list