mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8250627: Use -XX:+/-UseContainerSupport for enabling/disabling Java container metrics
Reviewed-by: aph, dholmes, bobv
This commit is contained in:
parent
10b9d0b6a6
commit
e6517d1ae2
7 changed files with 175 additions and 2 deletions
|
@ -160,7 +160,13 @@ public class CgroupMetrics implements Metrics {
|
|||
}
|
||||
|
||||
public static Metrics getInstance() {
|
||||
if (!isUseContainerSupport()) {
|
||||
// Return null on -XX:-UseContainerSupport
|
||||
return null;
|
||||
}
|
||||
return CgroupSubsystemFactory.create();
|
||||
}
|
||||
|
||||
}
|
||||
private static native boolean isUseContainerSupport();
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue