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

Erik Helin ehelin at openjdk.org
Tue May 16 09:57:05 UTC 2023


> 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

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/13867/files
  - new: https://git.openjdk.org/jdk/pull/13867/files/73c71aa0..5b277905

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=13867&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13867&range=00-01

  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/13867.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13867/head:pull/13867

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


More information about the hotspot-dev mailing list