RFR: 8364090: Dump JFR recording on CrashOnOutOfMemoryError
Erik Gahlin
egahlin at openjdk.org
Fri Jul 25 13:59:54 UTC 2025
On Fri, 25 Jul 2025 09:07:45 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:
>> Could you call the parameter something more fitting? Perhaps emit_old_object_samples, if that is the new purpose of the flag?
>>
>> I think the OldObjectSample event should only be emitted directly from native, if an emergency dump occurs , preferably only on oom. Normal exit should be handled from Java, where a user can configure the event settings.
>
>> Could you call the parameter something more fitting? Perhaps emit_old_object_samples, if that is the new purpose of the flag?
>
> Ok, I will rename to `emit_old_object_samples`.
>
>> I think the OldObjectSample event should only be emitted directly from native, if an emergency dump occurs , preferably only on oom. Normal exit should be handled from Java, where a user can configure the event settings.
>
> Normally, JFR recording should already be stopped at this point because it is stopped by shutdown hook. So I guess this code (`Jfr::on_vm_shutdown` call at here) rarely works. However it might work if shutdown hook would not work for some reasons - OOM for example.
>
> So should we keep this code?
I think you can keep it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26468#discussion_r2231156266
More information about the hotspot-jfr-dev
mailing list