[jdk11u-dev] RFR: 8254001: [Metrics] Enhance parsing of cgroup interface files for version detection

Severin Gehwolf sgehwolf at openjdk.java.net
Wed Apr 27 23:05:05 UTC 2022


On Thu, 7 Apr 2022 15:34:54 GMT, Andrew Azores <duke at openjdk.java.net> wrote:

> Backport commit [a50725db2ab621e1a17cb5505f78e4bc73972a27](https://github.com/openjdk/jdk/commit/a50725db) for [JDK-8254001](https://bugs.openjdk.java.net/browse/JDK-8254001), enhancement to cgroups interface parsing and version detection.
> 
> The patch applied mostly cleanly with only two minor conflicts in `CgroupV1Subsystem.java`. These conflicts were simply hunks that failed to apply because the surrounding context did not match due to later changes in the internal implementation that are not present in JDK11. Since the patch being backported wholly replaces or removes these implementations anyway, my resolution was to simply remove the old implementation and accept the new implementation from the backport patch.

Once change required due to an out-of-order backport to 11u.

LGTM. Hopefully we'll get the OCA verification resolved soon.

@robilad Hi! Could you please help with OCA verification for Andrew? He works for Red Hat and is covered by Red Hat's OCA. Thanks!

@robilad Gentle ping?

src/java.base/linux/classes/jdk/internal/platform/CgroupSubsystemFactory.java line 197:

> 195:                 action = (tokens -> setCgroupV2Path(infos, tokens));
> 196:             }
> 197:             selfCgroupLines.map(line -> line.split(":"))

This will have to also include the fix from JDK-8272124 so that not regress. See: https://github.com/openjdk/jdk/commit/4d6593ce0243457e7431a5990957a8f880e0a3fb

It'll be covered by `TestCgroupSubsystemFactory` once [JDK-8284102](https://bugs.openjdk.java.net/browse/JDK-8284102), a 11u-only bug, gets fixed.

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

Changes requested by sgehwolf (Reviewer).

PR: https://git.openjdk.java.net/jdk11u-dev/pull/1020Marked as reviewed by sgehwolf (Reviewer).


More information about the jdk-updates-dev mailing list