8250627: Use -XX:+/-UseContainerSupport for enabling/disabling Java container metrics

Reviewed-by: aph, dholmes, bobv
This commit is contained in:
Severin Gehwolf 2020-07-24 19:57:06 +02:00
parent 10b9d0b6a6
commit e6517d1ae2
7 changed files with 175 additions and 2 deletions

View file

@ -538,7 +538,15 @@ JVM_ENTRY_NO_ENV(jint, JVM_ActiveProcessorCount(void))
return os::active_processor_count();
JVM_END
JVM_ENTRY_NO_ENV(jboolean, JVM_IsUseContainerSupport(void))
JVMWrapper("JVM_IsUseContainerSupport");
#ifdef LINUX
if (UseContainerSupport) {
return JNI_TRUE;
}
#endif
return JNI_FALSE;
JVM_END
// java.lang.Throwable //////////////////////////////////////////////////////