RFR: 8332362: Implement os::committed_in_range for MacOS and AIX [v7]
Robert Toyonaga
duke at openjdk.org
Mon Jun 17 19:50:35 UTC 2024
> ### Summary
> This change adds `os::committed_in_range` to `src/hotspot/os/posix/os_posix.cpp` so that AIX and MacOS can use it. It is mostly the same as the prior implementation in `os_linux.cpp`, but takes into account AIX may have unaligned stacks and variable page sizes, and that mincore uses a different argument type on linux. This will allow AIX and MacOS to report true liveness information for thread stacks reported by NMT. Previously this was only possible on Windows and Linux.
>
> **Testing**
> - `TestAlwaysPreTouchStacks.java` is updated to also test the case when stacks are large but mostly not paged in.
> - A few new unit tests in `test_committed_virtualmemory.cpp` to check`os::committed_in_range`. I've excluded these tests on Windows because it reports the committed region as fully paged in.
> - tier1
>
> I've tested on Linux and Windows. I don't have a Mac to test on, but the Mac GHA tests are passing. Not yet tested on AIX.
Robert Toyonaga has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains ten commits:
- Apply feedback. Clean up. Copyright headers.
- Merge branch 'master' into JDK-8332362
- Add #else branch for non-AIX platforms.
- Revert to the old behaviour for AIX.
- Simplification. Just cast address to char* on aix.
- Fix mincore argument type for aix. Shorten typedefs for various platforms.
- Remove debug log. Enable tests for aix.
- Simplify. Remove AIX specific path. Check alignement on AIX too.
- Implement os::committed_in_range for posix. Add tests.
-------------
Changes: https://git.openjdk.org/jdk/pull/19455/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19455&range=06
Stats: 250 lines in 5 files changed: 161 ins; 83 del; 6 mod
Patch: https://git.openjdk.org/jdk/pull/19455.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19455/head:pull/19455
PR: https://git.openjdk.org/jdk/pull/19455
More information about the hotspot-runtime-dev
mailing list