RFR: 8351142: Add JFR monitor deflation and statistics events [v4]
Erik Gahlin
egahlin at openjdk.org
Wed Mar 12 13:49:55 UTC 2025
On Wed, 12 Mar 2025 12:21:38 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> We already have JFR JavaMonitorInflate event, which tells when the monitor is inflated. We are missing JavaMonitorDeflate event, which would tell us when the monitor is deflated. This makes it hard to see the monitor lifecycle, and/or estimate the population of currently inflated monitors. I believe we should add JavaMonitorDeflate event. It would also be useful to have the statistics for the number of currently used/deflating monitors. Deflation event alone would require post-processing to investigate this, so it would be good to have the statistics event as well.
>>
>> This would also replace two of the RT counters that are going away in [JDK-8348829](https://bugs.openjdk.org/browse/JDK-8348829).
>>
>> Monitor deflation is done asynchronously in `MonitorDeflationThread`, so the additional overhead of recording the deflation events would likely be performance neutral. We still only enable the statistics event by default to be on a safer side.
>>
>> Additional testing:
>> - [x] Linux x86_64 server fastdebug, `jdk_jfr`
>
> Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 12 commits:
>
> - peakCount it is
> - Merge branch 'master' into JDK-8351142-jfr-deflate-event
> - Touch up descriptions
> - Fix test in release builds
> - Merge branch 'master' into JDK-8351142-jfr-deflate-event
> - Merge branch 'master' into JDK-8351142-jfr-deflate-event
> - Test updates
> - Rework statistics event to be actually statistics
> - Filter JFR HiddenWait consistently
> - Event metadata touchups
> - ... and 2 more: https://git.openjdk.org/jdk/compare/1d147ccb...edd9beaf
Marked as reviewed by egahlin (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/23900#pullrequestreview-2678549616
More information about the hotspot-dev
mailing list