RFR: 8224201: Simplify JVM flag macro expansions

Stefan Karlsson stefan.karlsson at oracle.com
Tue May 21 09:20:28 UTC 2019


Hi Thomas,


On 2019-05-21 06:47, Thomas Stüfe wrote:
> Hi Stefan,
> 
> this is a nice cleanup!

Thanks!

> 
> Looks good to my naked eye.
> 
> I would probably compare a precompiled globals.cpp from before your 
> patch and after it and check the diffs.

I assume that you meant preprocessed and not precompiled here. I 
compared the the output from gcc -E, and the difference I see is the 
expected move of the JVMCI flag definitions.

> 
> Non-PCH builds too, as Vladimir suggested.

I always run with non-PCH locally, but our build infrastructure uses PCH 
by default. I reran with non-PCH and found no problems.

  Maybe also with some features
> switched off, e.g. jvmci.

Tested building with -jvmci locally, and it worked. I checked the gcc -E 
output for globals.cpp, and the JVMCI flags are removed as expected.

I tried to build without COMPILER2, but that is broken even without my 
patches.

> 
> If all tests well I do not need another webrev.

Thanks!

StefanK

> 
> Cheers, Thomas
> 
> On Mon, May 20, 2019 at 12:56 PM Stefan Karlsson 
> <stefan.karlsson at oracle.com <mailto:stefan.karlsson at oracle.com>> wrote:
> 
>     Hi all,
> 
>     Please review this patch to simplify how we generate the different
>     parts
>     of the JVM flags code.
> 
>     https://cr.openjdk.java.net/~stefank/8224201/webrev.01/
>     https://bugs.openjdk.java.net/browse/JDK-8224201
> 
>     Notable parts of the patch:
>     - Introduces a ALL_FLAGS macro, used to expand code for all flags.
>     - Uses the ALL_FLAGS where appropriate.
>     - Constraints list didn't expand JVMCI flags. Fixed by using ALL_FLAGS.
>     - Moved <sub-system>_globals.hpp generated declarations to be expanded
>     in globals.hpp.
>     - Unified FLAG_MEMBER and FLAG_MEMBER_WITH_TYPE into FLAG_MEMBER_ENUM
>     and change names accordingly.
> 
>     This change makes it easier to do future changes to the JVM flags
>     handling code. For example: "JDK-8224203Remove need to specify type
>     when
>     using FLAG_SET macros"
> 
>     Compiled on tier1 platforms.
> 
>     Thanks,
>     StefanK
> 


More information about the hotspot-dev mailing list