RFR: 8025226: TestPerfCountersAndMemoryPools.java fails with -Xmixed or -Xcomp
Mikael Gerdin
mikael.gerdin at oracle.com
Wed Oct 2 12:31:58 UTC 2013
Erik,
On 10/02/2013 01:36 PM, Erik Helin wrote:
> Based on feedback from Bengt, I was able to remove one call to
> System.gc() and I also added comments that explains why the two other
> calls are necessary.
>
> Please see new webrev at:
> http://cr.openjdk.java.net/~ehelin/8025226/webrev.01/
Still looks good.
/Mikael
>
> Thanks,
> Erik
>
> On 2013-09-30, 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/
>>
>> Bug:
>> https://bugs.openjdk.java.net/browse/JDK-8025226
>>
>> Thanks,
>> Erik
More information about the hotspot-gc-dev
mailing list