RFR: 8254001: [Metrics] Enhance parsing of cgroup interface files for version detection [v6]
Severin Gehwolf
sgehwolf at openjdk.java.net
Wed Feb 24 17:40:17 UTC 2021
> This is an enhancement which solves two issues:
>
> 1. Multiple reads of relevant cgroup interface files. Now interface files are only read once per file (just like Hotspot).
> 2. Proxies creation of the impl specific subsystem via `determineType()` as before, but now reads all relevant interface files: `/proc/cgroups`, `/proc/self/mountinfo` and `/proc/self/cgroup`. Once read it passes the parsed information to the impl specific subsystem classes for instantiation. This allows for more flexibility of testing as interface files can be mocked and, thus, more cases can be tested that way without having access to these specific systems. For example, proper regression tests for JDK-8217766 and JDK-8253435 have been added now with this in place.
>
> * [x] Tested on Linux x86_64 on cgroups v1 and cgroups v2. Container tests pass.
Severin Gehwolf has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 10 additional commits since the last revision:
- Merge branch 'master' into jdk-8254001-enhance-file-parsing-java-metrics
- Merge branch 'master' into jdk-8254001-enhance-file-parsing-java-metrics
- Add comment to parsing logic of /proc/self/cgroup
- Fix jcheck
- Add documentation and reduce code running in the critical section
- Add some documentation
- Merge branch 'master' into jdk-8254001-enhance-file-parsing-java-metrics
- Merge branch 'master' into jdk-8254001-enhance-file-parsing-java-metrics
- Merge branch 'master' into jdk-8254001-enhance-file-parsing-java-metrics
- 8254001: [Metrics] Enhance parsing of cgroup interface files for version detection
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/1393/files
- new: https://git.openjdk.java.net/jdk/pull/1393/files/078e16db..5d5275e7
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1393&range=05
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1393&range=04-05
Stats: 29136 lines in 793 files changed: 18085 ins; 6354 del; 4697 mod
Patch: https://git.openjdk.java.net/jdk/pull/1393.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1393/head:pull/1393
PR: https://git.openjdk.java.net/jdk/pull/1393
More information about the core-libs-dev
mailing list