RFR: 8302744: Refactor Hotspot container detection code [v3]
Severin Gehwolf
sgehwolf at openjdk.org
Mon May 27 19:19:04 UTC 2024
On Mon, 27 May 2024 10:22:12 GMT, Thomas Stuefe <stuefe 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 16 additional commits since the last revision:
>>
>> - 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.
>> - Get rid of the templated function
>> - Use enum class for TupleValue
>> - Merge branch 'master' into jdk-8302744-cleanup-getcontainer-info
>> - 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
>> - ... and 6 more: https://git.openjdk.org/jdk/compare/ea458d21...c41d3183
>
> src/hotspot/os/linux/cgroupSubsystem_linux.cpp line 668:
>
>> 666: fclose(fp);
>> 667: return false;
>> 668: }
>
> Do we really explicitly need to handle empty file here? If not, just scratch this section and rely on the block below.
You are right. The loop conditional is sufficient.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19060#discussion_r1616338130
More information about the hotspot-runtime-dev
mailing list