RFR: 8268098: jdk.CPULoad event reports incorrect CPU usage inside a container
Yasumasa Suenaga
ysuenaga at openjdk.java.net
Thu Jun 3 04:48:37 UTC 2021
On Thu, 3 Jun 2021 02:40:16 GMT, David Holmes <dholmes at openjdk.org> wrote:
> I'm a bit confused. We seem to have this logic in two places - one in the VM and one in the JDK libraries. Shouldn't this fix look like the fix for JDK-8265836? Can we have just one chunk of code that handles all this?
I think it is better if we share the code between VM and JDK libraries (MBean). I think we can do it if we can add the functions to get metrics of native resources to JmmInterface, but it will be big refactoring.
This problem affects JFR and CPU time in thread dump AFAICS, so I want to fix it for next major release at first.
The logic in this PR is different from JDK-8265836, but it uses CPU time rather than elapsed time - it is same with JDK-8265836. So I cannot see the problem which is reported in JDK-8265836.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4299
More information about the hotspot-runtime-dev
mailing list