8275735: [linux] Remove deprecated Metrics api (kernel memory limit)

Reviewed-by: hseigel, mchung
This commit is contained in:
Severin Gehwolf 2021-11-02 10:39:41 +00:00
parent b7a06be98d
commit 9971a2cab3
6 changed files with 4 additions and 104 deletions

View file

@ -53,16 +53,6 @@ public interface CgroupV1Metrics extends Metrics {
*/
public long getKernelMemoryFailCount();
/**
* Returns the maximum amount of kernel physical memory, in bytes, that
* can be allocated in the Isolation Group.
*
* @return The maximum amount of memory in bytes or -1 if
* there is no limit set.
*
*/
public long getKernelMemoryLimit();
/**
* Returns the largest amount of kernel physical memory, in bytes, that
* have been allocated in the Isolation Group.
@ -93,16 +83,6 @@ public interface CgroupV1Metrics extends Metrics {
*/
public long getTcpMemoryFailCount();
/**
* Returns the maximum amount of networking physical memory, in bytes,
* that can be allocated in the Isolation Group.
*
* @return The maximum amount of memory in bytes or -1 if
* there is no limit.
*
*/
public long getTcpMemoryLimit();
/**
* Returns the largest amount of networking physical memory, in bytes,
* that have been allocated in the Isolation Group.

View file

@ -48,11 +48,6 @@ public class CgroupV1MetricsImpl extends CgroupMetrics implements CgroupV1Metric
return metrics.getKernelMemoryFailCount();
}
@Override
public long getKernelMemoryLimit() {
return metrics.getKernelMemoryLimit();
}
@Override
public long getKernelMemoryMaxUsage() {
return metrics.getKernelMemoryMaxUsage();
@ -68,11 +63,6 @@ public class CgroupV1MetricsImpl extends CgroupMetrics implements CgroupV1Metric
return metrics.getTcpMemoryFailCount();
}
@Override
public long getTcpMemoryLimit() {
return metrics.getTcpMemoryLimit();
}
@Override
public long getTcpMemoryMaxUsage() {
return metrics.getTcpMemoryMaxUsage();

View file

@ -332,10 +332,6 @@ public class CgroupV1Subsystem implements CgroupSubsystem, CgroupV1Metrics {
return getLongValue(memory, "memory.kmem.failcnt");
}
public long getKernelMemoryLimit() {
return CgroupV1SubsystemController.longValOrUnlimited(getLongValue(memory, "memory.kmem.limit_in_bytes"));
}
public long getKernelMemoryMaxUsage() {
return getLongValue(memory, "memory.kmem.max_usage_in_bytes");
}
@ -348,10 +344,6 @@ public class CgroupV1Subsystem implements CgroupSubsystem, CgroupV1Metrics {
return getLongValue(memory, "memory.kmem.tcp.failcnt");
}
public long getTcpMemoryLimit() {
return CgroupV1SubsystemController.longValOrUnlimited(getLongValue(memory, "memory.kmem.tcp.limit_in_bytes"));
}
public long getTcpMemoryMaxUsage() {
return getLongValue(memory, "memory.kmem.tcp.max_usage_in_bytes");
}