RFR(S): 8236938: [TESTBUG] JFR event MetaspaceAllocationFailure is not tested

mikhailo.seledtsov at oracle.com mikhailo.seledtsov at oracle.com
Mon Mar 2 19:26:13 UTC 2020


Hi Harold,

   Thank you for review. Right, this test is only for 
TestMetaspaceAllocationFailure. I have updated the comment.


Thanks,

Misha

On 3/2/20 11:09 AM, Harold Seigel wrote:
>
> Hi Misha,
>
> The change looks good, just one question.
>
> Is this comment in TestMetaspaceAllocationFailure.java correct?  I 
> didn't see jdk.MetaspaceOOM event testing.
>
>       26  * @summary Test jdk.MetaspaceAllocationFailure and jdk.MetaspaceOOM events.
>
> Thanks, Harold
> On 2/27/2020 10:51 AM, mikhailo.seledtsov at oracle.com wrote:
>> Please review this new test for JFR event MetaspaceAllocationFailure.
>>
>> The test fills the metaspace by generating classes in a loop, until 
>> the desired event is delivered to the receiver.
>> By creating a new instance of class loader for each iteration test 
>> allows metaspace to be cleaned up once MetaspaceAllocationFailure
>> condition is detected, thus not causing full-blown OOME. However, on 
>> occasion, it may happen, hence the try/catch clause.
>> Ran this at least 100 times, works well and reliably.
>>
>> Also moved the class generator utility from Runtime test library to 
>> common test library; renamed it to avoid name clash with
>> another already existing GeneratingClassLoader.
>>
>>     JBS: https://bugs.openjdk.java.net/browse/JDK-8236938
>>     Webrev: http://cr.openjdk.java.net/~mseledtsov/8236938.01/
>>     Testing:
>>         1. Ran over 100 times on Linux, Windows and MAC: All PASS
>>         2. Ran all runtime tests that rely on the class loader 
>> generator runtime library.
>>
>>
>> Thank you,
>> Misha
>>


More information about the hotspot-jfr-dev mailing list