RFR(XS) 6625574: MemoryMXBean/Pending.java fails: "pending finalization = 0 but expected > 0"
Mattias Tobiasson
mattias.tobiasson at oracle.com
Fri Feb 28 04:56:11 PST 2014
Hi,
Could you please review this fix?
The test often fails when run with command line "-Xcomp"
The test creates some objects and stores them in a local variable in the function. The test expects those objects to survive until they are set to null. The problem seems to be that the optimizer realizes that the objects are never used and removes them before the test expects it.
The solution is to move the local variable out to a public static variable. Then the optimizer will not remove it before expected.
webrev:
http://cr.openjdk.java.net/~mtobiass/6625574/webrev.00
bug:
https://bugs.openjdk.java.net/browse/JDK-6625574
Mattias
More information about the serviceability-dev
mailing list