[jdk8u-dev] RFR: 8351359: OperatingSystemMXBean: values from getCpuLoad and getProcessCpuLoad are stale after 24.8 days (Windows)

Paul Hohensee phh at openjdk.org
Wed Oct 29 16:33:41 UTC 2025


On Tue, 23 Sep 2025 08:42:55 GMT, Voznia Anton <duke at openjdk.org> wrote:

> Hi,
> 
> It's a clean backport of JDK-8351359.
> I didn't include `#include <sysinfoapi.h>` as it is in [the original commit](https://github.com/openjdk/jdk/commit/900b3ff7ee933520efe2438fb7c841a4e6a93d17) because of compilation problem.
> Instead of that, there is already included `windows.h` that contains the `GetTickCount64()` function. It's redundant to include `sysinfoapi.h`.
> The changes are related to Windows only.
> 
> Testing:
> - manual testing code that calls `getProcessCpuLoad()` on windows server 2025, intel cpu
> - testing x86 and x64 builds
> - Pre-submit tests

GHA failures appear unrelated.

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

Marked as reviewed by phh (Reviewer).

PR Review: https://git.openjdk.org/jdk8u-dev/pull/701#pullrequestreview-3394761142


More information about the jdk8u-dev mailing list