RFR: 8302744: Refactor Hotspot container detection code [v2]
Severin Gehwolf
sgehwolf at openjdk.org
Thu May 23 14:00:31 UTC 2024
On Tue, 21 May 2024 16:01:11 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>> 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 ten additional commits since the last revision:
>>
>> - Fix TestMemoryAwareness for cgroup v2
>>
>> It only reads the swap value, thus doesn't print:
>> "Memory and Swap Limit is" but rather prints:
>> "Swap Limit is". This is fine, since for cg v2
>> the memory limit and the swap limits are in different
>> files.
>> - Fix whitespace
>> - Handle cpu quota for cgroups v1 specially
>> - Try a different approach.
>>
>> Hybrid MACRO usage and locked down reading primitives.
>> - Add key-value read function
>> - Add basic testing for read functions
>> - Add generic julong/char* read functions
>> - Merge branch 'master' into jdk-8302744-cleanup-getcontainer-info
>> - 8302744: Refactor Hotspot container detection code
>
> src/hotspot/os/linux/cgroupSubsystem_linux.cpp line 659:
>
>> 657: PRAGMA_FORMAT_NONLITERAL_IGNORED // Only string/number literal formats used. See read_*() functions.
>> 658: template <typename T>
>> 659: bool CgroupController::read_from_file(const char* filename, const char* scan_fmt, T result) {
>
> `read_value_from_ file`?
No longer there.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19060#discussion_r1611748692
More information about the hotspot-runtime-dev
mailing list