[jdk8u-dev] RFR: 8351359: OperatingSystemMXBean: values from getCpuLoad and getProcessCpuLoad are stale after 24.8 days (Windows)
Voznia Anton
duke at openjdk.org
Mon Oct 27 20:55:50 UTC 2025
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
-------------
Commit messages:
- Fix copyright year.
- Fix comment.
- 8351359: OperatingSystemMXBean: values from getCpuLoad and getProcessCpuLoad are stale after 24.8 days (Windows)
Changes: https://git.openjdk.org/jdk8u-dev/pull/701/files
Webrev: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=701&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8351359
Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk8u-dev/pull/701.diff
Fetch: git fetch https://git.openjdk.org/jdk8u-dev.git pull/701/head:pull/701
PR: https://git.openjdk.org/jdk8u-dev/pull/701
More information about the jdk8u-dev
mailing list