RFR: 8161265: [JVMCI] EnableJVMCI should only be required when its not implied by other flags
doug.simon at oracle.com
Thu Jul 14 22:03:11 UTC 2016
> On 14 Jul 2016, at 21:12, Tom Rodriguez <tom.rodriguez at oracle.com> wrote:
>> Compared to the logic that was there, it’s a huge step forward! There’s so few flags and they’re very unlikely to change that I think the trade off is worth it.
>> If there was some easy way to get the number of flags created by JVMCI_FLAGS, we could add an assert in JVMCIGlobals::check_jvmci_flags_are_consistent against an EXPECTED_JVMCI_FLAGS constant. That would be sufficient as removal of a flag will cause a compilation error, and addition of a flag (without adjusting EXPECTED_JVMCI_FLAGS) will cause a guarantee failure. The only problem is that I don’t see how to get the number of flags created by JVMCI_FLAGS.
> You can do anything with macros. A macro using JVMCI_FLAGS could easily count them.
Yes, but then I have to define the secondary macros as parameters for application of JVMCI_FLAGS and I wanted to avoid that.
> Why not have a macro that generates local bools for each JVMCI flag that checks whether it has been sanity checked. Your new macros would set the appropriate flags and and a final call to JVMCI_FLAGS would assert that they’ve all been sanity checked.
Ok, I’ve implemented that here:
More information about the hotspot-compiler-dev