About the perfInit() method in LinuxOperatingSystem.c

Aleksey Shipilev shade at redhat.com
Tue Feb 8 07:44:12 UTC 2022

On 2/8/22 10:26, Poison wrote:
> In JDK8 com.sun.management.OperatingSystemMXBean#getSystemCpuLoad, when the operating system 
> isLinux, the perfInit() method will be called for initialization, but will the initialized 
> variable cause the code in the if block to not be executed?
Yes, but that problem was fixed as part of:
   8226575: OperatingSystemMXBean should be made container aware

...which was backported to 8u272.

Here it is in 8u tip:


More information about the jdk8u-dev mailing list