RFR: 8327152: NMT: use BitMap for committed memory regions in summary mode
Afshin Zafari
azafari at openjdk.org
Tue Mar 5 09:01:09 UTC 2024
In summary mode, we don't show/use the stack traces. So, it is possible to use `BitMap` for sub-regions of a reserved region. A bit is used for every page in the reserved region and is 1 when committed and 0 when uncommitted.
No need to handle split/merge/exclude and any other similar operations on sub-regions. We just set/clear the bits accordingly.
To find the actual amount of committed/uncommitted memory, we just count the 1 bits before the operation and adjust the request size appropriately. For example:
1 2
Bit index: 01234567890123456789012
Current state of a reserved region: 11111000000111110000111
commit sub-region [8,15): ^-----^
already-committed = 4
actual-committed = (15 - 8) - 4 = 3
-------------
Commit messages:
- 8327152: NMT: use BitMap for committed memory regions in summary mode
Changes: https://git.openjdk.org/jdk/pull/18090/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18090&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8327152
Stats: 79 lines in 3 files changed: 71 ins; 0 del; 8 mod
Patch: https://git.openjdk.org/jdk/pull/18090.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/18090/head:pull/18090
PR: https://git.openjdk.org/jdk/pull/18090
More information about the hotspot-runtime-dev
mailing list