RFR: 8302744: Refactor Hotspot container detection code
Severin Gehwolf
sgehwolf at openjdk.org
Fri May 3 09:14:19 UTC 2024
Please review this container detection code refactoring in hotspot. The main point of this is to
- get rid of the `GET_CONTAINER_INFO` macros which hide too many things under the hood
- prevent refactoring of the code (since `GET_CONTAINER_INFO` macros short-return and are therefore not portable; at least not without some risk)
- make the code easier to understand
- allow for better testing via `gtest`
- separate multi-line parsing from single line parsing for clarity.
Testing:
- [x] GHA
- [x] `gtest:cgroupTest` tests
- [x] Container tests on Linux with cgroup v1 (legacy) and cgroup v2. All pass.
Thoughts?
-------------
Commit messages:
- 8302744: Refactor Hotspot container detection code
Changes: https://git.openjdk.org/jdk/pull/19060/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19060&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8302744
Stats: 1031 lines in 6 files changed: 580 ins; 319 del; 132 mod
Patch: https://git.openjdk.org/jdk/pull/19060.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19060/head:pull/19060
PR: https://git.openjdk.org/jdk/pull/19060
More information about the hotspot-runtime-dev
mailing list