On Mon, 5 Oct 2020 08:59:34 GMT, Severin Gehwolf <[email protected]> wrote:
>> src/java.base/linux/classes/jdk/internal/platform/CgroupSubsystemFactory.java
>> line 80:
>>
>>> 78: */
>>> 79: private static final Pattern MOUNTINFO_PATTERN =
>>> 80:
>>> Pattern.compile("^[^\\s]+\\s+[^\\s]+\\s+[^\\s]+\\s+([^\\s]+)\\s+([^\\s]+)\\s+[^-]+-\\s+([^\\s]+)\\s+.*$");
>>
>> Only group_3 = fstype is used in the pattern, right?
>
> Yes. I've removed unused groups now, though.
>
> Originally, my thinking was that `mount root` and `mount path` would be
> useful too so I kept it in. It would certainly
> be useful for getting rid of reading `/proc/self/mountinfo` twice on the Java
> side. As a future enhancement we could do
> away with double parsing of mount info by keeping track of relevant cgroup
> controller info. I've filed
> [JDK-8254001](https://bugs.openjdk.java.net/browse/JDK-8254001) to track this.
The latest version goes back to using all three as it's beneficial to track
that info and use it later on for
instantiating the version specific objects.
-------------
PR: https://git.openjdk.java.net/jdk/pull/485