RFR: 8224203: Remove need to specify type when using FLAG_SET macros

Per Liden per.liden at oracle.com
Tue May 21 12:04:25 UTC 2019


Looks good to me. Nice cleanup!

/Per

On 5/20/19 1:12 PM, Stefan Karlsson wrote:
> Hi all,
> 
> Please review this patch to remove the need to specify type when using 
> the FLAG_SET macros.
> 
> https://cr.openjdk.java.net/~stefank/8224203/webrev.01/
> https://bugs.openjdk.java.net/browse/JDK-8224203
> 
> This patch builds on top of the changes in:
>   "8224201: Simplify JVM flag macro expansions"
>   https://mail.openjdk.java.net/pipermail/hotspot-dev/2019-May/038184.html
> 
> global_extensions.hpp contains the actual change to JVM flag setters. It 
> expands one inline function per flag. For example:
> inline JVMFlag::Error Flag_G1HeapRegionSize_set(size_t value, 
> JVMFlag::Flags origin) {
>     return JVMFlagEx::size_tAtPut(Flag_G1HeapRegionSize_enum, value, 
> origin);
> }
> 
> The rest of the files contain removal of the type arguments.
> 
> For example:
> -    FLAG_SET_ERGO(size_t, G1HeapRegionSize, GrainBytes);
> +    FLAG_SET_ERGO(G1HeapRegionSize, GrainBytes);
> 
> Compiles on all tier1 platforms.
> 
> Thanks,
> StefanK


More information about the hotspot-dev mailing list