RFR: 8331560: Refactor Hotspot container detection code so that subsystem delegates to controllers [v4]
Severin Gehwolf
sgehwolf at openjdk.org
Wed Jun 19 14:49:15 UTC 2024
On Mon, 17 Jun 2024 10:44:43 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 pull request now contains 36 commits:
>>
>> - Tabs
>> - Templated class use references
>> - initializer lists
>> - Style nit
>> - Get rid of multiple inheritance
>> - Merge branch 'master' into jdk-8331560-cgroup-controller-delegation
>> - Review feedback
>> - Clean up
>> - Appropriately handle version specific printing
>> - Fix inheritance hierarchy
>> - ... and 26 more: https://git.openjdk.org/jdk/compare/cc64aeac...6aff2076
>
> src/hotspot/os/linux/cgroupV1Subsystem_linux.hpp line 144:
>
>> 142: _cpuacct(cpuacct),
>> 143: _pids(pids) {
>> 144: }
>
> Pre-existing: No destructor freeing these.
A `CgroupSubsystem` instance lives as long as the JVM lives. I'm not sure this is worth the extra complexity. For example, I'd rather avoid copying those path strings around and free them again (`CgroupV1Controller` and `CgroupV2Controller` destructors don't free, for example, because they get re-used latter avoiding this extra copying around). Instead essentially use those singletons and let the OS cleanup handle de-allocation.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19085#discussion_r1646334279
More information about the hotspot-runtime-dev
mailing list