When a user creates a Java event, JFR dynamically generates an event handler class that is used to write down field data efficiently. Today the class is generated in the primoridial class loader, so it is visible from the classloader the event is.
This works, but it creates a small memory leak for every added event class in the boot class loader, since it's not possible to unload the handler class, when the event class is unloaded.
It's a tricky problem to solve, and it may be we need to ship with a small memory leak. The number of event classes is typcially low, at most a couple of hundred, so the leak will be limited.
This works, but it creates a small memory leak for every added event class in the boot class loader, since it's not possible to unload the handler class, when the event class is unloaded.
It's a tricky problem to solve, and it may be we need to ship with a small memory leak. The number of event classes is typcially low, at most a couple of hundred, so the leak will be limited.
- duplicates
-
JDK-8245951 JFR memory leak
-
- Closed
-
- relates to
-
JDK-8174922 Event metadata not cleared when event class is unloaded or unregistered
-
- Resolved
-