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

Harold Seigel harold.seigel at oracle.com
Mon Mar 2 19:09:36 UTC 2020


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