src/linux/classes/jdk/internal/platform/cgroupv1/Metrics.java

changeset 14169
edb84bd2f10f
parent 14148
8310f9fb8d93
child 14174
26c1140d2613
equal deleted inserted replaced
14168:8a367e717840 14169:edb84bd2f10f
55 public static Metrics getInstance() { 55 public static Metrics getInstance() {
56 return INSTANCE; 56 return INSTANCE;
57 } 57 }
58 58
59 private static Metrics initContainerSubSystems() { 59 private static Metrics initContainerSubSystems() {
60 if (!isUseContainerSupport()) {
61 return null;
62 }
60 Metrics metrics = new Metrics(); 63 Metrics metrics = new Metrics();
61 64
62 /** 65 /**
63 * Find the cgroup mount points for subsystems 66 * Find the cgroup mount points for subsystems
64 * by reading /proc/self/mountinfo 67 * by reading /proc/self/mountinfo
456 459
457 public long getBlkIOServiced() { 460 public long getBlkIOServiced() {
458 return SubSystem.getLongEntry(blkio, "blkio.throttle.io_serviced", "Total"); 461 return SubSystem.getLongEntry(blkio, "blkio.throttle.io_serviced", "Total");
459 } 462 }
460 463
464 private static native boolean isUseContainerSupport();
465
461 } 466 }

mercurial