RFR: 8297718: Make NMT free:ing protocol more granular [v2]
Johan Sjölen
jsjolen at openjdk.org
Thu Dec 1 13:59:25 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.
Johan Sjölen has updated the pull request incrementally with 10 additional commits since the last revision:
- Add test that asserts block integrity after revival
- Make MallocHeader NONCOPYABLE
- Rest of it
- Adjust comments
- Put back comment, suitably rewritten
- Note reversibility of mark_block_as_dead
- Rename record_free_block to record_free
- Rename record_free to deaccount
- Move FreePackage into MallocHeader and rename
- Rename as revive, delete copy ctr
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/11390/files
- new: https://git.openjdk.org/jdk/pull/11390/files/7ce15cb5..e704c024
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=11390&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=11390&range=00-01
Stats: 62 lines in 7 files changed: 27 ins; 7 del; 28 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