RFR: 8334254: Cleanup CGroups initialization code [v2]

Johan Sjölen jsjolen at openjdk.org
Fri Jun 28 11:50:19 UTC 2024


On Sun, 23 Jun 2024 08:46:20 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

>> Hi,
>> 
>> Please consider this patch which attempts to improve the code quality of some of the cgroups code, somewhat.
>> 
>> 1. Get rid of `#define`s and upgrade to a `CG_INFO` enum, with some helpers
>> 2. Make some of the code prettier by removing copy-pasted and edited code
>> 3. Make `CgroupInfo` RAII, ridding us of the `cleanup` function
>> 4. `set_subsystem_path` is **only** used at construction time, only call it at that time and make those functions private. Also remove `virtual`ness, as this is unnecessary now.
>> 
>> Testing:
>> 
>> 1. cgroupTest group in gtest.
>> 
>> Thank you.
>
> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Review comments

Hi Thomas,

Thanks for having a look, I'll fix the const char stuff ASAP.

-------------

PR Review: https://git.openjdk.org/jdk/pull/19709#pullrequestreview-2147772062


More information about the hotspot-runtime-dev mailing list