RFR: 8256916: Add JFR event for OutOfMemoryError

Yasumasa Suenaga ysuenaga at openjdk.java.net
Tue Jan 19 01:37:49 UTC 2021


On Fri, 15 Jan 2021 09:59:08 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

> As you say: "move throwing events into HotSpot makes big change" - I agree and Erik has already stated that many have tried already to make this kind of change, but attempts have faltered because the impact / disruptions are unclear. Do you fully understand the consequences of how it will change the way users work with exceptions in JFR? If C2 optimizations now start to remove exception sites that were previously reported?

I believe the user who hooks JavaErrorThrow event wants to know the occurrence of OOME.
Let's think about the user who want to restart the system automatically if the fatal error happens.
The user defines OOME as an event that should be restarted and monitored by remote recording. If JavaErrorThrow event for OOME cannot be hooked, it is meaningless.

I understand all `Throwable` s cannot be hooked due to C2 optimization, but most of them should be hooked. They should be hooked as well as unified logging at least, and we can do it like this PR.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1403


More information about the hotspot-jfr-dev mailing list