RFR: 8343893: Test jdk/jfr/event/runtime/TestNativeMemoryUsageEvents.java failed: heap should have grown and NMT should show that: expected 0 > 0 [v2]
Johan Sjölen
jsjolen at openjdk.org
Mon Nov 18 12:28:29 UTC 2024
> # Background
>
> With the implementation of [JDK-8312132](https://bugs.openjdk.org/browse/JDK-8312132) we added the `MemoryFileTracker` (MFT). Unfortunately, this work failed to implement JFR integration. This, in turn, meant that (generational) ZGC has not correctly reported its heap usage via the NMT JFR events. We (as in Oracle) never saw this issue in testing, as we didn't run this test for all possible GC configurations. With an update of our test configurations this is no longer the case: We run this test for all possible GCs and the test now fails for generational ZGC.
>
> # The fix
>
> I implemented JFR events for the MFT by adding all of its reserved and committed memory into the JFR data, similarly to the `VirtualMemoryTracker`. I also added an explicit `run` using `ZGC` to the failing test, to ensure that any actual regressions are found.
Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
Add include
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/22204/files
- new: https://git.openjdk.org/jdk/pull/22204/files/7164f615..76f8bff4
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=22204&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=22204&range=00-01
Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/22204.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/22204/head:pull/22204
PR: https://git.openjdk.org/jdk/pull/22204
More information about the hotspot-jfr-dev
mailing list