RFR: 8309191: Reduce JDK dependencies of cgroup support

Doug Simon dnsimon at openjdk.org
Wed Aug 16 11:10:21 UTC 2023


On Thu, 1 Jun 2023 10:25:49 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:

> I'm concerned about the hard-coding of delimiter values and the added accidential complexity in order to avoid the Regex engine. Note that this test fails due to the delimiter hard-coding:
> 
> ```
> jdk/internal/platform/cgroup/TestCgroupSubsystemFactory.java
> ```
> 
> This change seems hard to maintain. How would you ensure this won't regress?

There's seems to be a lot of usage of `sscanf` in https://github.com/openjdk/jdk/blob/master/src/hotspot/os/linux/cgroupSubsystem_linux.cpp. Maybe I'm misreading that code, but doesn't it also hard code assumptions about the file format(s)?

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

PR Comment: https://git.openjdk.org/jdk/pull/14216#issuecomment-1680403327


More information about the core-libs-dev mailing list