RFR: 8025226: TestPerfCountersAndMemoryPools.java fails with -Xmixed or -Xcomp
Mikael Gerdin
mikael.gerdin at oracle.com
Tue Oct 1 11:42:57 UTC 2013
Erik,
On 09/30/2013 05:36 PM, Erik Helin wrote:
> Hi all,
>
> this change fixes the test
> hotspot/test/gc/metaspace/TestPerfCountersAndMemoryPools.java which was
> broken when running with -Xcomp or -Xmixed. The problem was that the
> call to MemoryUsage.getUsed() triggered allocations of metadata. Since
> the performance counters are only updated at the end of a GC, this
> caused the performance counter and the memory pool for used metadata to
> differ in how much they reported.
>
> The solution is to only run the test in the interpreter by using -Xint.
>
> I also added the tag @library tag which was missing from the test. The
> test had never been run on "its own" before, the testlibrary had always
> been compiled by another test before the test was run.
>
> Finally, the test now only loops through the MemoryPoolMXBeans once to
> find the correct memory pool.
>
> Webrev:
> http://cr.openjdk.java.net/~ehelin/8025226/webrev.00/
It's too bad that you have to override with Xint but I see the problem
where Xcomp or Xmixed can trigger metadata allocations when you call
functions.
Ship it!
/Mikael
>
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8025226
>
> Thanks,
> Erik
>
More information about the hotspot-gc-dev
mailing list