mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8217766: Container Support doesn't work for some Join Controllers combinations
Reviewed-by: rriggs, sgehwolf
This commit is contained in:
parent
adc6d241ba
commit
30342b596b
2 changed files with 36 additions and 107 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -124,13 +124,13 @@ public class Metrics implements jdk.internal.platform.Metrics {
|
|||
/**
|
||||
* createSubSystem objects and initialize mount points
|
||||
*/
|
||||
private static void createSubSystem(Metrics metric, String [] mountentry) {
|
||||
private static void createSubSystem(Metrics metric, String[] mountentry) {
|
||||
if (mountentry.length < 5) return;
|
||||
|
||||
Path p = Paths.get(mountentry[4]);
|
||||
String subsystemName = p.getFileName().toString();
|
||||
String[] subsystemNames = p.getFileName().toString().split(",");
|
||||
|
||||
if (subsystemName != null) {
|
||||
for (String subsystemName: subsystemNames) {
|
||||
switch (subsystemName) {
|
||||
case "memory":
|
||||
metric.setMemorySubSystem(new SubSystem(mountentry[3], mountentry[4]));
|
||||
|
@ -138,11 +138,6 @@ public class Metrics implements jdk.internal.platform.Metrics {
|
|||
case "cpuset":
|
||||
metric.setCpuSetSubSystem(new SubSystem(mountentry[3], mountentry[4]));
|
||||
break;
|
||||
case "cpu,cpuacct":
|
||||
case "cpuacct,cpu":
|
||||
metric.setCpuSubSystem(new SubSystem(mountentry[3], mountentry[4]));
|
||||
metric.setCpuAcctSubSystem(new SubSystem(mountentry[3], mountentry[4]));
|
||||
break;
|
||||
case "cpuacct":
|
||||
metric.setCpuAcctSubSystem(new SubSystem(mountentry[3], mountentry[4]));
|
||||
break;
|
||||
|
@ -162,7 +157,7 @@ public class Metrics implements jdk.internal.platform.Metrics {
|
|||
/**
|
||||
* setSubSystemPath based on the contents of /proc/self/cgroup
|
||||
*/
|
||||
private static void setSubSystemPath(Metrics metric, String [] entry) {
|
||||
private static void setSubSystemPath(Metrics metric, String[] entry) {
|
||||
String controller;
|
||||
String base;
|
||||
SubSystem subsystem = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue