RFR: 8277930: Add unsafe allocation event to jfr
Denghui Dong
ddong at openjdk.java.net
Tue Nov 30 02:40:06 UTC 2021
On Mon, 29 Nov 2021 14:39:16 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
> I'd suggest also adding an event for `Unsafe::freeMemory`, as well as recording the memory address in both event types. With that, it should be possible to match up allocations with frees, and leaks could be identified by looking for allocations that don't have a corresponding free with the same address.
Unsafe also support reallocating memory, which complexes the analysis of direct memory leak.
And I think we need a mechanism to filter events by allocation size, but AFAIK, there is no general mechanism to achieve it at present.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6591
More information about the hotspot-dev
mailing list