RFR: 8283903: GetContainerCpuLoad does not return the correct result in share mode [v3]

xpbob duke at openjdk.java.net
Wed Mar 30 09:52:46 UTC 2022


On Wed, 30 Mar 2022 09:04:25 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:

> The intent is to ensure floating point arithmetic on the second expression, right? A clearer way to express this may be the following. This avoids the `1.0` constant:
> 
> ```
> hostTicks = (long) (hostTicks * ((double) containerCPUs)/ totalCPUs)
> ```

1.0 used to convert the data type to floating point and compute the division first

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

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


More information about the serviceability-dev mailing list