Integrated: 8351142: Add JFR monitor deflation and statistics events
Aleksey Shipilev
shade at openjdk.org
Wed Mar 12 19:28:03 UTC 2025
On Tue, 4 Mar 2025 14:47:09 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`
This pull request has now been integrated.
Changeset: 895f64a1
Author: Aleksey Shipilev <shade at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/895f64a18d7c752332ef9255c0b118bf25bdbb90
Stats: 286 lines in 13 files changed: 275 ins; 6 del; 5 mod
8351142: Add JFR monitor deflation and statistics events
Reviewed-by: egahlin, dholmes, lmesnik
-------------
PR: https://git.openjdk.org/jdk/pull/23900
More information about the hotspot-dev
mailing list