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
8247910: Improve alignment and power-of-2 utilities using C++14 #126
Conversation
/reviewers 2 |
|
/label hotspot |
@kimbarrett |
@kimbarrett |
@kimbarrett To determine the appropriate audience for reviewing this pull request, one or more labels corresponding to different subsystems will normally be applied automatically. However, no automatic labelling rule matches the changes in this pull request. In order to have an RFR email automatically sent to the correct mailing list, you will need to add one or more labels manually using the |
Mailing list message from Thomas Schatzl on hotspot-dev: Hi, On 11.09.20 10:50, Kim Barrett wrote:
in utilities/align.hpp:63: 62 constexpr T align_down(T size, A alignment) { The comment mentions "lognot" twice, at least it took me a while to If you think it's better to keep lognot, fine with me too, I'll mark Thanks, |
Mailing list message from Kim Barrett on hotspot-dev:
I thought that was widespread usage; I guess my roots are showing. I'll
Thanks for reviewing. |
/issue add 8238956 |
@kimbarrett |
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!
@kimbarrett This change now passes all automated pre-integration checks. In addition to the automated checks, the change must also fulfill all project specific requirements After integration, the commit message will be:
Since the source branch of this PR was last updated there have been 20 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 automatic rebasing, please merge
|
Mailing list message from Kim Barrett on hotspot-dev: Thanks. |
/integrate |
@kimbarrett Since your change was applied there have been 20 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit af8c678. |
Mailing list message from Thomas St��fe on hotspot-dev: Hi, unfortunately this breaks my builds on Ubuntu 16.4. I am using gcc 5.4.0 Creating hotspot/variant-server/libjvm/gtest/gtestLauncher from 1 file(s) ^ ^ ^ ^ Cheers, Thomas On Tue, Sep 15, 2020 at 12:09 AM Kim Barrett <kim.barrett at oracle.com> wrote:
|
Mailing list message from Thomas St��fe on hotspot-dev: ... Okay I worked around the problem by upgrading to gcc 7. However, should we not make sure that we are buildable on the lowest Thanks, Thomas On Wed, Sep 23, 2020 at 8:14 AM Thomas St?fe <thomas.stuefe at gmail.com>
|
Mailing list message from Kim Barrett on hotspot-dev:
gcc5 is the first version of gcc that *claims* to completely support C++14. That?s the only reason Rather than potentially contort code to support what is now a pretty old version, I?d prefer we |
Mailing list message from Andrew Haley on hotspot-dev: On 23/09/2020 09:24, Kim Barrett wrote:
I'd prefer that too, but it's not just about us developers: there are I'd say that if we can use GCC 5 with minor changes we should do so, -- |
Mailing list message from Kim Barrett on hotspot-dev:
Sure, but the code that?s failing is nothing out of the ordinary for C++14. I?m I?m also not in a good position to try to track down the problem; if Thomas or
|
Mailing list message from Kim Barrett on hotspot-dev:
I don?t see anything here to indicate what platform this is for. It?s not, by any chance, arm32? |
Mailing list message from Thomas St��fe on hotspot-dev: On Wed, Sep 23, 2020, 16:43 Kim Barrett <kim.barrett at oracle.com> wrote:
Sorry. No, plain old x64. Upgrading to gcc 7 also fixed another problem I had where the gtests would Unfortunately I do not have time to follow up on this. Maybe later. That is, Thomas |
Please review this change which updates the alignment and power-of-2
utilities (utilities/align.hpp and utilities/powerOfTwo.hpp) to use
C++14 features.
Where possible, the alignment functions are now constexpr. This
eliminates the need for alternate macros that needed to be used in
constexpr contexts.
Use <type_traits> and rather than HotSpot workalikes.
We no longer need max_value(), as the problematic platform for
std::numeric_limits::max() was Solaris.
Testing: tier1
Progress
Issues
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/126/head:pull/126
$ git checkout pull/126