Integrated: 8307458: Add periodic heap usage JFR events

Erik Helin ehelin at openjdk.org
Tue May 16 18:57:07 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

This pull request has now been integrated.

Changeset: cb8b8cdd
Author:    Erik Helin <ehelin at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/cb8b8cdd6861a0843f3b1036155eac9f9afc432a
Stats:     188 lines in 7 files changed: 188 ins; 0 del; 0 mod

8307458: Add periodic heap usage JFR events

Reviewed-by: stefank, aboldtch

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

PR: https://git.openjdk.org/jdk/pull/13867


More information about the hotspot-dev mailing list