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
8257232: CompileThresholdScaling fails to work on 32-bit platforms #1499
Conversation
/issue add JDK-8257232 |
👋 Welcome back jiefu! A progress list of the required criteria for merging this PR into |
@DamonFool This issue is referenced in the PR title - it will now be updated. |
@DamonFool |
@DamonFool The |
1 similar comment
@DamonFool The |
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.
Good.
@DamonFool 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 56 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Thanks @vnkozlov for your review. May I get a second review for this change? |
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.
Looks good to me.
Just an idea for a future RFE (one which I might pick up and work on myself): If the multiply-loop-based log2_intptr
is a performance issue here, it could probably be optimized by building a variant based on count_leading_zeros
. That would require lifting it out from globalDefinitions.hpp
, so powerOfTwo.hpp
might be a good place.
} else { | ||
return log2_intptr(scaled_freq); | ||
intx res = log2_intptr(scaled_freq); |
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.
Could be simplified to return MIN2(log2_intptr(scaled_freq), max_freq_bits);
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.
Could be simplified to
return MIN2(log2_intptr(scaled_freq), max_freq_bits);
OK.
Will use this kind of code style next time.
Thanks.
/integrate |
@DamonFool Since your change was applied there have been 56 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 8f4fa3f. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Hi all,
CompileThresholdScaling is incorrect on 32-bit platforms.
If you run the following command on Linux-32:
It gets the following unexpected warnings:
The failure is that nth_bit(max_freq_bits) [1] = nth_bit(32) [2] = 0 on 32-bit platforms.
So the scaling logic is wrong.
It would be better to fix it.
Thanks.
Best regards,
Jie
[1] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/compilerDefinitions.cpp#L125
[2] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/utilities/globalDefinitions.hpp#L973
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/1499/head:pull/1499
$ git checkout pull/1499