[jdk8u-dev] RFR: 8231111: Cgroups v2: Rework Metrics in java.base so as to recognize unified hierarchy
Jonathan Dowland
jdowland at openjdk.org
Wed Sep 21 10:19:21 UTC 2022
This is a backport of [4def210a22faaec6b47912dd314e6365ea48d28f](https://github.com/openjdk/jdk/commit/4def210a22faaec6b47912dd314e6365ea48d28f) for jdk8u-dev as part of an effort to backport cgroups v2 support.
It does not apply clean. Paths need unshuffling. A number of changes were needed for 8u support. I've structured the PR as separate commits, with each change made in a separate commit for (hopefully) ease of review.
Not all the new tests pass: TestDockerMemoryMetrics failing one, specifically:
Exception in thread "main" java.lang.RuntimeException: Memory and swap limit not equal, expected : [209715200, 1073741824], got : [209715200, 864026624]
I think this is fixed in a further patch to backport, and will confirm.
-------------
Commit messages:
- TestCgroupSubsystemController: rework use of Files.writeString
- CgroupSubsystemController: fix library paths
- TestCgroupSubsystemController: fix jtreg @library path
- Replace Arrays.compare with Arrays.equals
- incorporate (part of) 8275713: TestDockerMemoryMetrics test fails on recent runc
- update mapfile for new JNI method name
- tests for the backport
- CgroupSubsystemFactory: remove logging lines
- Metrics => CgroupV1Subsystem.java
- Metrics.java: easy commit, mostly doc-only hunks
- ... and 5 more: https://git.openjdk.org/jdk8u-dev/compare/ba408e55...1c5cdd6e
Changes: https://git.openjdk.org/jdk8u-dev/pull/121/files
Webrev: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=121&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8231111
Stats: 5335 lines in 33 files changed: 3621 ins; 1582 del; 132 mod
Patch: https://git.openjdk.org/jdk8u-dev/pull/121.diff
Fetch: git fetch https://git.openjdk.org/jdk8u-dev pull/121/head:pull/121
PR: https://git.openjdk.org/jdk8u-dev/pull/121
More information about the jdk8u-dev
mailing list