8243208: Clean up JVMFlag implementation#82
Conversation
|
👋 Welcome back iklam! A progress list of the required criteria for merging this PR into |
|
@iklam The following labels will be automatically applied to this pull request: When this pull request is ready to be reviewed, an RFR email will be sent to the corresponding mailing lists. If you would like to change these labels, use the |
Webrevs
|
dholmes-ora
left a comment
There was a problem hiding this comment.
One query below and a couple of style nits. Otherwise LGTM!
|
@iklam 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:
There are currently no new commits on the ➡️ To integrate this PR with the above commit message to the |
… (c) added JVMFlag::check_all_flag_declarations(), (d) removed product_rw which is not used by any flags
|
Re: Gerard Ziemski's comments on hotspot-dev@openjdk.java.net:
JVMFlagLimit is used for both constraints and ranges. I updated the comments:
So far there are only 2 cases so I think the explicit checking may be enough. If we have more cases in the future we can have a more general solution.
I think this macro is fairly easy to read, so adding an expanded example may not have much benefit: In JDK-8081833, I plan to use templates to replaces the nearly identical code in jvmFlagRangeList.cpp/jvmFlagConstraintList.cpp, and these macros should go away. (I fixed other minor nits found by Gerard.) |
dholmes-ora
left a comment
There was a problem hiding this comment.
Updates seem okay. One query below.
| s++; | ||
| } | ||
| return h; | ||
| } |
There was a problem hiding this comment.
Can this function just call hash_code(s, strlen(s)) ?
There was a problem hiding this comment.
strlen() is not constexpr so it can't be used here. I added my hand-rolled string_len function in bf90a37 so we can share a single copy of the hash calculation loop.
|
Looks good. I had a couple of minor comments.
|
| s++; | ||
| } | ||
| return h; | ||
| } |
|
Re: Gerard Ziemski's comments on hotspot-dev@openjdk.java.net: I made the changes in 15547eb I added Changed to static constexpr int HAS_RANGE = 1, etc. I added There's no need to initialize _hashes and _table in a loop. Each of the elements in these two arrays are individually initialized by the expansion of this macro: There was a bug in my previous version that unnecessarily initialized flagTable_verify_constexpr[] is needed for build-time checking only, and cannot be combined with flagTable[]. I've updated the comments to clarify: |
|
Mailing list message from David Holmes on shenandoah-dev: Hi Ioi, On 10/09/2020 1:41 am, Ioi Lam wrote:
Yes sorry for the noise. Obviously most flags are not writeable - their I'm somewhat surprised that none of our product or develop flags are I wonder if "writeable" should be an attribute like Thanks, |
|
/integrate |
|
Mailing list message from Lindenmaier, Goetz on hotspot-dev: Hi, Since this change was pushed, we see the following build error on Windows: We are compiling with Microsoft Visual Studio 2017. (Is it the right way to write a mail to bring this up, or Best regards, |
|
Mailing list message from David Holmes on hotspot-dev: Hi Goetz, On 14/09/2020 4:13 pm, Lindenmaier, Goetz wrote:
You can write a mail or just file a bug. :) Is this 32-bit Windows? We have not seen any issue in our 64-bit builds. Thanks,
|
|
Mailing list message from Lindenmaier, Goetz on hotspot-dev: Hi David, It fails in the 32 and 64-bit build with the same message. Best regards,
|
|
Mailing list message from David Holmes on hotspot-dev: On 14/09/2020 5:02 pm, Lindenmaier, Goetz wrote:
We are building with VS2019, so may be a VS bug - possibly constExpr constexpr JVMFlagLookup _flag_lookup_table; David
|
|
Maybe it's complaining about this "*" in jvmFlagLookup.hpp? How about this: |
|
Seeing Windows build failures on some of my Windows build nodes as well. Filed https://bugs.openjdk.java.net/browse/JDK-8253089, please discuss there. |
Relax testing for goodness of results
The initial commit d85cbd6 is the same patch as 8243208-cleanup-jvmflag-impl.v02 published in hotspot-dev@openjdk.java.net.
The rest of the review will continue on GitHub. I will add new commits to respond to comments to the above e-mail.
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/82/head:pull/82$ git checkout pull/82