RFR(S): 8236938: [TESTBUG] JFR event MetaspaceAllocationFailure is not tested
mikhailo.seledtsov at oracle.com
mikhailo.seledtsov at oracle.com
Thu Feb 27 15:51:03 UTC 2020
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