RFR: 8025226: TestPerfCountersAndMemoryPools.java fails with -Xmixed or -Xcomp

Erik Helin erik.helin at oracle.com
Mon Sep 30 15:36:21 UTC 2013


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/

Bug:
https://bugs.openjdk.java.net/browse/JDK-8025226

Thanks,
Erik



More information about the hotspot-gc-dev mailing list