RFR: 8307458: Add periodic heap usage JFR events
Erik Helin
ehelin at openjdk.org
Mon May 8 14:20:01 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
-------------
Commit messages:
- 8307458: Add periodic heap usage JFR events
Changes: https://git.openjdk.org/jdk/pull/13867/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13867&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8307458
Stats: 188 lines in 7 files changed: 188 ins; 0 del; 0 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