-
Notifications
You must be signed in to change notification settings - Fork 5.8k
JDK-8324637: [aix] Implement support for reporting swap space in jdk.management #17569
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
Conversation
👋 Welcome back mbaesken! A progress list of the required criteria for merging this PR into |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't try this and don't use AIX, but it looks good.
It follows the same pattern as the other AIX cases in the file.
Although the others (e.g. line 200) don't throw_internal_error if the call returns -1, they just return -1. You might want to do that for consistency of behaviour.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit, otherwise good.
if (perfstat_memory_total(NULL, &memory_info, sizeof(perfstat_memory_total_t), 1) == -1) { | ||
throw_internal_error(env, "perfstat_memory_total failed"); | ||
} | ||
return available ? (jlong)(memory_info.pgsp_free * 4L * 1024L) : (jlong)(memory_info.pgsp_total * 4L * 1024L); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the cast? perfstat_memory_total_t members are all 64-bit, no?
Also, can we shorten this to:
return (available ? memory_info.pgsp_free : memory_info.pgsp_total) * 4096;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the cast? perfstat_memory_total_t members are all 64-bit, no?
Also, can we shorten this to:
return (available ? memory_info.pgsp_free : memory_info.pgsp_total) * 4096;
Hi Thomas, I see no types defined here https://www.ibm.com/docs/pt/aix/7.2?topic=interfaces-perfstat-memory-total-interface but most likely you are correct and they are 64bit.
@MBaesken This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 4 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
Hi I wanted to be consistent to the other OS in get_total_or_available_swap_space_size, that#s why the throw_internal_error . |
Ok yes, you can choose who to be consistent with... 8-) |
/integrate |
Going to push as commit 33324a5.
Your commit was automatically rebased without conflicts. |
The get_total_or_available_swap_space_size coding misses AIX support, we only return 0. This should be enhanced.
The perfstat API can be used, see https://www.ibm.com/docs/pt/aix/7.2?topic=interfaces-perfstat-memory-total-interface .
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/17569/head:pull/17569
$ git checkout pull/17569
Update a local copy of the PR:
$ git checkout pull/17569
$ git pull https://git.openjdk.org/jdk.git pull/17569/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 17569
View PR using the GUI difftool:
$ git pr show -t 17569
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/17569.diff
Webrev
Link to Webrev Comment