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

Stefan Karlsson stefan.karlsson at oracle.com
Mon May 20 11:12:07 UTC 2019


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