--- old/src/java.base/share/classes/jdk/internal/platform/Metrics.java 2020-01-21 20:26:21.876273918 +0100 +++ new/src/java.base/share/classes/jdk/internal/platform/Metrics.java 2020-01-21 20:26:21.739273611 +0100 @@ -50,23 +50,6 @@ public interface Metrics { /** - * Returned for metrics of type long if the underlying implementation - * has determined that no limit is being imposed. - */ - public static final long LONG_RETVAL_UNLIMITED = -1; - /** - * Returned for metrics of type long if the underlying implementation - * doesn't support that metric. - */ - public static final long LONG_RETVAL_NOT_SUPPORTED = -2; - public static final double DOUBLE_RETVAL_NOT_SUPPORTED = LONG_RETVAL_NOT_SUPPORTED; - /** - * Returned for metrics of type Boolean if the underlying implementation - * doesn't support that metric. - */ - public static final Boolean BOOL_RETVAL_NOT_SUPPORTED = null; - - /** * Returns an instance of the Metrics class. * * @return Metrics object or null if not supported on this platform. @@ -288,28 +271,6 @@ */ public int[] getEffectiveCpuSetMems(); - /** - * Returns the (attempts per second * 1000), if enabled, that the - * operating system tries to satisfy a memory request for any - * process in the current Isolation Group when no free memory is - * readily available. Use {@link #isCpuSetMemoryPressureEnabled()} to - * determine if this support is enabled. - * - * @return Memory pressure or 0 if not enabled or -2 if metric is not - * available. - * - */ - public double getCpuSetMemoryPressure(); - - /** - * Returns the state of the memory pressure detection support. - * - * @return true if support is available and enabled. null if metric is - * not available. false otherwise. - * - */ - public Boolean isCpuSetMemoryPressureEnabled(); - /***************************************************************** * Memory Subsystem ****************************************************************/ @@ -335,16 +296,6 @@ public long getMemoryLimit(); /** - * Returns the largest amount of physical memory, in bytes, that - * have been allocated in the Isolation Group. - * - * @return The largest amount of memory in bytes or -2 if this - * metric is not available. - * - */ - public long getMemoryMaxUsage(); - - /** * Returns the amount of physical memory, in bytes, that is currently * allocated in the current Isolation Group. * @@ -355,76 +306,6 @@ public long getMemoryUsage(); /** - * Returns the number of times that kernel memory requests in the - * Isolation Group have exceeded the kernel memory limit. - * - * @return The number of exceeded requests or -2 if metric - * is not available. - * - */ - 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 or -2 if this metric is not available. - * - */ - public long getKernelMemoryLimit(); - - /** - * Returns the largest amount of kernel physical memory, in bytes, that - * have been allocated in the Isolation Group. - * - * @return The largest amount of memory in bytes or -2 if this - * metric is not available. - * - */ - public long getKernelMemoryMaxUsage(); - - /** - * Returns the amount of kernel physical memory, in bytes, that - * is currently allocated in the current Isolation Group. - * - * @return The amount of memory in bytes allocated or -2 if this - * metric is not available. - * - */ - public long getKernelMemoryUsage(); - - /** - * Returns the number of times that networking memory requests in the - * Isolation Group have exceeded the kernel memory limit. - * - * @return The number of exceeded requests or -2 if the metric - * is not available. - * - */ - 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 or -2 if this metric is not available. - * - */ - public long getTcpMemoryLimit(); - - /** - * Returns the largest amount of networking physical memory, in bytes, - * that have been allocated in the Isolation Group. - * - * @return The largest amount of memory in bytes or -2 if this - * metric is not available. - * - */ - public long getTcpMemoryMaxUsage(); - - /** * Returns the amount of networking physical memory, in bytes, that * is currently allocated in the current Isolation Group. * @@ -435,16 +316,6 @@ public long getTcpMemoryUsage(); /** - * Returns the number of times that user memory requests in the - * Isolation Group have exceeded the memory + swap limit. - * - * @return The number of exceeded requests or -2 if the metric - * is not available. - * - */ - public long getMemoryAndSwapFailCount(); - - /** * Returns the maximum amount of physical memory and swap space, * in bytes, that can be allocated in the Isolation Group. * @@ -455,16 +326,6 @@ public long getMemoryAndSwapLimit(); /** - * Returns the largest amount of physical memory and swap space, - * in bytes, that have been allocated in the Isolation Group. - * - * @return The largest amount of memory in bytes or -2 if this - * metric is not available. - * - */ - public long getMemoryAndSwapMaxUsage(); - - /** * Returns the amount of physical memory and swap space, in bytes, * that is currently allocated in the current Isolation Group. * @@ -475,18 +336,6 @@ public long getMemoryAndSwapUsage(); /** - * Returns the state of the Operating System Out of Memory termination - * policy. - * - * @return Returns true if operating system will terminate processes - * in the Isolation Group that exceed the amount of available - * memory, otherwise false. null will be returned if this - * capability is not available on the current operating system. - * - */ - public Boolean isMemoryOOMKillEnabled(); - - /** * Returns the hint to the operating system that allows groups * to specify the minimum amount of physical memory that they need to * achieve reasonable performance in low memory systems. This allows