RFR(XS) 6625574: MemoryMXBean/Pending.java fails: "pending finalization = 0 but expected > 0"
Mattias Tobiasson
mattias.tobiasson at oracle.com
Mon Mar 3 03:51:32 PST 2014
Staffan, could you please sponsor this fix?
Thanks,
Mattias
----- Original Message -----
From: staffan.larsen at oracle.com
To: mattias.tobiasson at oracle.com
Cc: serviceability-dev at openjdk.java.net
Sent: Friday, February 28, 2014 1:58:44 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
Subject: Re: RFR(XS) 6625574: MemoryMXBean/Pending.java fails: "pending finalization = 0 but expected > 0"
Looks good!
Thanks,
/Staffan
On 28 feb 2014, at 13:56, Mattias Tobiasson <mattias.tobiasson at oracle.com> wrote:
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 6625574.patch
Type: text/x-patch
Size: 1275 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20140303/3f3cee65/6625574.patch
More information about the serviceability-dev
mailing list