RFR: 8302744: Refactor Hotspot container detection code [v6]
Severin Gehwolf
sgehwolf at openjdk.org
Wed May 29 08:47:07 UTC 2024
On Tue, 28 May 2024 16:30:40 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:
>> 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?
>
> Severin Gehwolf has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 22 additional commits since the last revision:
>
> - Merge branch 'master' into jdk-8302744-cleanup-getcontainer-info
> - Review feedback for the test
> - Make read_string() take the output buffer size
> - Fix style for read_numerical_key_value
> - Use assertions for required parameters
> - Use boolean for tuples
> - Add proper comments for parsing utility functions
> - Add a test for a large string read
> - Add convenience function for 'max' handling
>
> This now makes limit_from_str a private method
> - Fix general read string cases.
> - ... and 12 more: https://git.openjdk.org/jdk/compare/1a8cde0d...39c74bda
GHA test failure on Linux 32 bit x86 seems unrelated to this patch:
[serviceability/jvmti/ObjectMonitorUsage/ObjectMonitorUsage](https://github.com/jerboaa/jdk/actions/runs/9272985669#user-content-serviceability_jvmti_objectmonitorusage_objectmonitorusage)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19060#issuecomment-2136872232
More information about the hotspot-runtime-dev
mailing list