RFR: 8277930: Add unsafe allocation event to jfr [v8]
xpbob
duke at openjdk.java.net
Tue Dec 7 07:29:17 UTC 2021
On Tue, 7 Dec 2021 06:21:54 GMT, xpbob <duke at openjdk.java.net> wrote:
>> Unsafe is used in many Java frameworks.
>> When the framework has a unsafe memory leak , there is no way to know what code is causing it.
>> Add unsafe allocation event to jfr.
>> Records the size and stack allocated.
>> This event is off by default
>
> xpbob has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 10 additional commits since the last revision:
>
> - Merge branch 'openjdk:master' into JDK-8277930
> - add new line for file
> - remove whitespace
> - remove event in metadata
> - add java event
> - Merge branch 'openjdk:master' into JDK-8277930
> - remove whitespace
> - add free and Reallocate event
> - Merge branch 'openjdk:master' into JDK-8277930
> - 8277930: Add unsafe allocation event to jfr
code without unsafe event
----
c.unsafe.UnsafeTest.mallocAndFree 8 avgt 20 66.237 ± 0.672 ns/op
c.unsafe.UnsafeTest.mallocAndFree 12 avgt 20 66.596 ± 0.286 ns/op
c.unsafe.UnsafeTest.mallocAndFree 16 avgt 20 66.219 ± 0.621 ns/op
c.unsafe.UnsafeTest.mallocAndFree 24 avgt 20 66.715 ± 0.329 ns/op
c.unsafe.UnsafeTest.mallocAndFree 32 avgt 20 65.959 ± 0.714 ns/op
c.unsafe.UnsafeTest.mallocAndFree 4096 avgt 20 71.858 ± 3.306 ns/op
code with java event
---
c.unsafe.UnsafeTest.mallocAndFree 8 avgt 20 66.705 ± 0.213 ns/op
c.unsafe.UnsafeTest.mallocAndFree 12 avgt 20 66.621 ± 0.340 ns/op
c.unsafe.UnsafeTest.mallocAndFree 16 avgt 20 66.693 ± 0.197 ns/op
c.unsafe.UnsafeTest.mallocAndFree 24 avgt 20 66.039 ± 0.683 ns/op
c.unsafe.UnsafeTest.mallocAndFree 32 avgt 20 66.035 ± 0.593 ns/op
c.unsafe.UnsafeTest.mallocAndFree 4096 avgt 20 71.809 ± 3.535 ns/op
-------------
PR: https://git.openjdk.java.net/jdk/pull/6591
More information about the hotspot-jfr-dev
mailing list