RFR: 8307458: Add periodic heap usage JFR events

Stefan Karlsson stefank at openjdk.org
Mon May 8 14:36:32 UTC 2023


On Mon, 8 May 2023 14:08:58 GMT, Erik Helin <ehelin at openjdk.org> wrote:

> Hi all,
> 
> please review this patch that adds two new JFR events:
> 
> - `GCHeapMemoryUsage`
> - `GCHeapMemoryPoolUsage`
> 
> The two new events are periodic (period configurable as usual) and should contain the same information as a call to [`MemoryMXBean.getHeapMemoryUsage`](https://docs.oracle.com/en/java/javase/20/docs/api/java.management/java/lang/management/MemoryMXBean.html#getHeapMemoryUsage()) and/or [`MemoryPoolMXBean.getUsage`](https://docs.oracle.com/en/java/javase/20/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getUsage()). Having this data accessible via JFR (in addition to MXBeans) is useful for tools working primarily with JFR recordings, for example [JMC](https://openjdk.org/projects/jmc/).
> 
> ### Testing
> - [x] Tier 1 - 3 on Linux x64, Linux aarch64, Windows x64, macOS aarch64
> - [x] Added two new JTReg tests for the new events
> - [x] Local testing on macOS aarch64
> 
> Thanks,
> Erik

Looks good.

-------------

Marked as reviewed by stefank (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/13867#pullrequestreview-1416925915


More information about the hotspot-dev mailing list