jdk8u-dev icon indicating copy to clipboard operation
jdk8u-dev copied to clipboard

8351359: OperatingSystemMXBean: values from getCpuLoad and getProcessCpuLoad are stale after 24.8 days (Windows)

Open antonvoznia opened this issue 4 months ago • 8 comments

Hi,

It's a clean backport of JDK-8351359. I didn't include #include <sysinfoapi.h> as it is in the original commit 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

Progress

  • [x] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • [x] Change must not contain extraneous whitespace
  • [ ] JDK-8351359 needs maintainer approval
  • [x] Commit message must refer to an issue

Issue

  • JDK-8351359: OperatingSystemMXBean: values from getCpuLoad and getProcessCpuLoad are stale after 24.8 days (Windows) (Bug - P4 - Requested)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/701/head:pull/701
$ git checkout pull/701

Update a local copy of the PR:
$ git checkout pull/701
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/701/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 701

View PR using the GUI difftool:
$ git pr show -t 701

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/701.diff

Using Webrev

Link to Webrev Comment

antonvoznia avatar Sep 23 '25 08:09 antonvoznia

Hi @antonvoznia, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user antonvoznia" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

bridgekeeper[bot] avatar Sep 23 '25 08:09 bridgekeeper[bot]

❗ This change is not yet ready to be integrated. See the Progress checklist in the description for automated requirements.

openjdk[bot] avatar Sep 23 '25 08:09 openjdk[bot]

This backport pull request has now been updated with issue from the original commit.

openjdk[bot] avatar Sep 23 '25 08:09 openjdk[bot]

@antonvoznia This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Oct 22 '25 03:10 bridgekeeper[bot]

Webrevs

mlbridge[bot] avatar Oct 27 '25 20:10 mlbridge[bot]

⚠️ @antonvoznia This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

openjdk[bot] avatar Oct 29 '25 16:10 openjdk[bot]

@phohensee thank you!

/approval request Clean backport to solve the issue in jdk8. I didn't take #include <sysinfoapi.h> in the backport as redundant include. The changes were tested.

antonvoznia avatar Oct 30 '25 08:10 antonvoznia

@antonvoznia 8351359: The approval request has been created successfully.

openjdk[bot] avatar Oct 30 '25 08:10 openjdk[bot]