Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a flag to return 0 if only one data point has been recorded #18636

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

thallium
Copy link
Contributor

Currently, getProcessCpuLoad() and getSystemCpuLoad() return -1 if only one data point has been recorded. A compatibility flag -XX:[+/-]CpuLoadCompatibility is added to match the behaviour of the RI, which is to return 0.

Fixes: #13389
Related: eclipse-omr/omr#7189
Related: #18634

Currently, getProcessCpuLoad() and getSystemCpuLoad() return -1 if only
one data point has been recorded. A compatibility flag
-XX:[+/-]CpuLoadCompatibility is added to match the behaviour of the RI,
which is to return 0.

Fixes: eclipse-openj9#13389
Related: eclipse-omr/omr#7189

Signed-off-by: Gengchen Tuo <[email protected]>
@thallium
Copy link
Contributor Author

FYI @tajila @pshipton

@pshipton pshipton merged commit 408bdc7 into eclipse-openj9:master Dec 15, 2023
@pshipton
Copy link
Member

@thallium don't forget to open the docs issue
https://github.com/eclipse-openj9/openj9-docs/issues/

@pshipton
Copy link
Member

@TobiAjila did you want this in 0.43?

@tajila
Copy link
Contributor

tajila commented Dec 16, 2023

@TobiAjila did you want this in 0.43?

Yes, lets add to 0.43

@thallium
Copy link
Contributor Author

Docs issue has been open eclipse-openj9/openj9-docs#1232. FYI @pshipton @tajila

@pshipton
Copy link
Member

@thallium pls cherry pick the commit and create a PR on https://github.com/eclipse-openj9/openj9/tree/v0.43.0-release

@thallium
Copy link
Contributor Author

Just found that a comment wasn't updated correctly and there's a minor formatting issue. I will open a PR to fix them first.

thallium added a commit to thallium/openj9 that referenced this pull request Dec 17, 2023
A comment wasn't updated correctly and there's a minor formatting issue in eclipse-openj9#18636

Signed-off-by: Gengchen Tuo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

getProcessCpuLoad() always return -1 in first call on jdk11
3 participants