RFR: 8297718: Make NMT free:ing protocol more granular
Johan Sjölen
jsjolen at openjdk.org
Mon Nov 28 12:48:37 UTC 2022
This PR avoids the double registration of a failed `os::realloc` in NMT by doing the NMT free protocol steps inline (asserting block integrity, marking of MallocHeader, and registrering results to statistics). This is done by creating a new struct `FreePackage` which includes all of the necessary data for registrering results.
I also did some light refactoring which I think makes the protocol clearer, these are done piece wise as separate commits for the reviewers' convenience.
-------------
Commit messages:
- Add MemTracker::record_free()
- Rename record_free_header() to record_free()
- Rename record_free to record_free_block
- Rename MallocHeader::free_recording_data() to MallocHeader::free_package()
- Assert NMT is enabled in MemTracker::record_free()
- Open up protocol
Changes: https://git.openjdk.org/jdk/pull/11390/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11390&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8297718
Stats: 62 lines in 6 files changed: 34 ins; 7 del; 21 mod
Patch: https://git.openjdk.org/jdk/pull/11390.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11390/head:pull/11390
PR: https://git.openjdk.org/jdk/pull/11390
More information about the hotspot-runtime-dev
mailing list