jmx-dev RFR: 8269851: OperatingSystemMXBean getProcessCpuLoad reports incorrect process cpu usage in containers [v2]

Yasumasa Suenaga ysuenaga at openjdk.java.net
Wed Jul 7 07:55:11 UTC 2021


On Wed, 7 Jul 2021 07:51:49 GMT, xpbob <github.com+7837910+xpbob at openjdk.org> wrote:

>> …ocess cpu usage in containers
>
> xpbob has updated the pull request incrementally with one additional commit since the last revision:
> 
>   remove empty line

In HotSpot, CPU usage for JVM would be calculated at `get_jvm_tickes()` in os_perf_linux.cpp . It refers `/proc/self/stat` - should we refer it in same way?

I discussed about similar issue in #4299 , then we came to an agreement that we should refactor that HotSpot and JMX should share the code. Of course you can fix JMX only in this PR, but it still uses different implementation from HotSpot. I prefer to fix it in code consolidation between HotSpot and JMX.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4702


More information about the jmx-dev mailing list