Integrated: 8317360: Missing null checks in JfrCheckpointManager and JfrStringPool initialization routines

Markus Grönlund mgronlun at openjdk.org
Wed Oct 25 16:41:53 UTC 2023


On Mon, 23 Oct 2023 15:13:26 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> I guess it is fine, but it is weird to see the abrupt return from the `initialize` methods that allocate stuff. Isn't this effectively a memory leak when JFR could not initialize for some reason?

All JFR subsystems expose a create() and a destroy(), and some also an initialize(), which are lifecycle controlling entry points for JfrRecorder::create().

If any subsystem returns false as part of the transactional JfrRecorder::create(), every subsystem destroy() is invoked. This is so that starting JFR dynamically would not exit the VM in case of initialization failure.

Thank you, @shipilev and @egahlin for the reivews.

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

PR Comment: https://git.openjdk.org/jdk/pull/16310#issuecomment-1775447771
PR Comment: https://git.openjdk.org/jdk/pull/16310#issuecomment-1779325372


More information about the hotspot-jfr-dev mailing list