RFR: 8307458: Add periodic heap usage JFR events [v2]

Stefan Karlsson stefank at openjdk.org
Tue May 16 14:51:48 UTC 2023


On Tue, 16 May 2023 09:57:05 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
>
> Erik Helin has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Comments from Axel

Marked as reviewed by stefank (Reviewer).

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

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


More information about the hotspot-dev mailing list