RFR: 8161265: [JVMCI] EnableJVMCI should only be required when its not implied by other flags

Tom Rodriguez tom.rodriguez at oracle.com
Thu Jul 14 19:12:19 UTC 2016

> 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.
> -Doug

You can do anything with macros.  A macro using JVMCI_FLAGS could easily count them.  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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160714/ed4e441b/attachment.html>

More information about the hotspot-compiler-dev mailing list