RFR: 8364090: Dump JFR recording on CrashOnOutOfMemoryError [v4]
Yasumasa Suenaga
ysuenaga at openjdk.org
Wed Jul 30 08:37:38 UTC 2025
On Wed, 30 Jul 2025 07:13:38 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:
>> I updated the test. I hope it works on your environment.
>>
>> - Revise JVM option for the test process (`-Xmx` and `-XX:TLABSize` are copied from TestClassLoaderLeak.java)
>> - Use `EventStream` to check JFR events as Erik shown
>> - Repeat the test if `OldObjectSample` does not appear on the flight record
>> - Remove `var` from test code
>
> I will try running it. I think readability can be improved if everything under shouldCrash is grouped together, e.g.
>
>
> if (oldObjects.get() > 0L) {
> if (shouldCrash) {
> Asserts.assertEquals("VM Error", shutdownReason);
> Asserts.assertEquals("Out of Memory", dumpReason);
> } else {
> Asserts.assertEquals("No remaining non-daemon Java threads", shutdownReason);
> }
> return;
> }
@egahlin
I updated testcase as you shown.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26468#discussion_r2241927247
More information about the hotspot-jfr-dev
mailing list