Skip to content

Commit 5144190

Browse files
committed
8243208: Clean up JVMFlag implementation
Reviewed-by: dholmes, coleenp, gziemski
1 parent 976acdd commit 5144190

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1595
-1373
lines changed

src/hotspot/cpu/aarch64/globals_aarch64.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,11 @@ define_pd_global(intx, InitArrayShortSize, BytesPerLong);
7575
define_pd_global(intx, InlineSmallCode, 1000);
7676
#endif
7777

78-
#define ARCH_FLAGS(develop, \
79-
product, \
80-
diagnostic, \
81-
experimental, \
82-
notproduct, \
83-
range, \
84-
constraint) \
78+
#define ARCH_FLAGS(develop, \
79+
product, \
80+
notproduct, \
81+
range, \
82+
constraint) \
8583
\
8684
product(bool, NearCpool, true, \
8785
"constant pool is close to instructions") \
@@ -113,4 +111,6 @@ define_pd_global(intx, InlineSmallCode, 1000);
113111
"Value -1 means off.") \
114112
range(-1, 4096)
115113

114+
// end of ARCH_FLAGS
115+
116116
#endif // CPU_AARCH64_GLOBALS_AARCH64_HPP

src/hotspot/cpu/arm/globals_arm.hpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,12 @@ define_pd_global(bool, CompactStrings, false);
7070

7171
define_pd_global(intx, InitArrayShortSize, 8*BytesPerLong);
7272

73-
#define ARCH_FLAGS(develop, \
74-
product, \
75-
diagnostic, \
76-
experimental, \
77-
notproduct, \
78-
range, \
73+
#define ARCH_FLAGS(develop, \
74+
product, \
75+
notproduct, \
76+
range, \
7977
constraint)
78+
79+
// end of ARCH_FLAGS
80+
8081
#endif // CPU_ARM_GLOBALS_ARM_HPP

src/hotspot/cpu/ppc/globals_ppc.hpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,11 @@ define_pd_global(bool, CompactStrings, true);
7575
define_pd_global(intx, InitArrayShortSize, 9*BytesPerLong);
7676

7777
// Platform dependent flag handling: flags only defined on this platform.
78-
#define ARCH_FLAGS(develop, \
79-
product, \
80-
diagnostic, \
81-
experimental, \
82-
notproduct, \
83-
range, \
84-
constraint) \
78+
#define ARCH_FLAGS(develop, \
79+
product, \
80+
notproduct, \
81+
range, \
82+
constraint) \
8583
\
8684
product(uintx, PowerArchitecturePPC64, 0, \
8785
"Specify the PowerPC family version in use. If not provided, " \
@@ -161,7 +159,7 @@ define_pd_global(intx, InitArrayShortSize, 9*BytesPerLong);
161159
product(bool, UseRTMLocking, false, \
162160
"Enable RTM lock eliding for inflated locks in compiled code") \
163161
\
164-
experimental(bool, UseRTMForStackLocks, false, \
162+
product(bool, UseRTMForStackLocks, false, EXPERIMENTAL, \
165163
"Enable RTM lock eliding for stack locks in compiled code") \
166164
\
167165
product(bool, UseRTMDeopt, false, \
@@ -171,33 +169,35 @@ define_pd_global(intx, InitArrayShortSize, 9*BytesPerLong);
171169
"Number of RTM retries on lock abort or busy") \
172170
range(0, max_jint) \
173171
\
174-
experimental(int, RTMSpinLoopCount, 100, \
172+
product(int, RTMSpinLoopCount, 100, EXPERIMENTAL, \
175173
"Spin count for lock to become free before RTM retry") \
176174
range(0, 32767) /* immediate operand limit on ppc */ \
177175
\
178-
experimental(int, RTMAbortThreshold, 1000, \
176+
product(int, RTMAbortThreshold, 1000, EXPERIMENTAL, \
179177
"Calculate abort ratio after this number of aborts") \
180178
range(0, max_jint) \
181179
\
182-
experimental(int, RTMLockingThreshold, 10000, \
180+
product(int, RTMLockingThreshold, 10000, EXPERIMENTAL, \
183181
"Lock count at which to do RTM lock eliding without " \
184182
"abort ratio calculation") \
185183
range(0, max_jint) \
186184
\
187-
experimental(int, RTMAbortRatio, 50, \
185+
product(int, RTMAbortRatio, 50, EXPERIMENTAL, \
188186
"Lock abort ratio at which to stop use RTM lock eliding") \
189187
range(0, 100) /* natural range */ \
190188
\
191-
experimental(int, RTMTotalCountIncrRate, 64, \
189+
product(int, RTMTotalCountIncrRate, 64, EXPERIMENTAL, \
192190
"Increment total RTM attempted lock count once every n times") \
193191
range(1, 32767) /* immediate operand limit on ppc */ \
194192
constraint(RTMTotalCountIncrRateConstraintFunc,AfterErgo) \
195193
\
196-
experimental(intx, RTMLockingCalculationDelay, 0, \
194+
product(intx, RTMLockingCalculationDelay, 0, EXPERIMENTAL, \
197195
"Number of milliseconds to wait before start calculating aborts " \
198196
"for RTM locking") \
199197
\
200-
experimental(bool, UseRTMXendForLockBusy, true, \
201-
"Use RTM Xend instead of Xabort when lock busy") \
198+
product(bool, UseRTMXendForLockBusy, true, EXPERIMENTAL, \
199+
"Use RTM Xend instead of Xabort when lock busy")
200+
201+
// end of ARCH_FLAGS
202202

203203
#endif // CPU_PPC_GLOBALS_PPC_HPP

src/hotspot/cpu/s390/globals_s390.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,11 @@ define_pd_global(bool, CompactStrings, true);
7575
// 8146801 (Short Array Allocation): No performance work done here yet.
7676
define_pd_global(intx, InitArrayShortSize, 1*BytesPerLong);
7777

78-
#define ARCH_FLAGS(develop, \
79-
product, \
80-
diagnostic, \
81-
experimental, \
82-
notproduct, \
83-
range, \
84-
constraint) \
78+
#define ARCH_FLAGS(develop, \
79+
product, \
80+
notproduct, \
81+
range, \
82+
constraint) \
8583
\
8684
/* Reoptimize code-sequences of calls at runtime, e.g. replace an */ \
8785
/* indirect call by a direct call. */ \
@@ -117,4 +115,6 @@ define_pd_global(intx, InitArrayShortSize, 1*BytesPerLong);
117115
product(bool, TraceTraps, false, "Trace all traps the signal handler" \
118116
"handles.")
119117

118+
// end of ARCH_FLAGS
119+
120120
#endif // CPU_S390_GLOBALS_S390_HPP

src/hotspot/cpu/x86/globals_x86.hpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,11 @@ define_pd_global(bool, PreserveFramePointer, false);
8989

9090
define_pd_global(intx, InitArrayShortSize, 8*BytesPerLong);
9191

92-
#define ARCH_FLAGS(develop, \
93-
product, \
94-
diagnostic, \
95-
experimental, \
96-
notproduct, \
97-
range, \
98-
constraint) \
92+
#define ARCH_FLAGS(develop, \
93+
product, \
94+
notproduct, \
95+
range, \
96+
constraint) \
9997
\
10098
develop(bool, IEEEPrecision, true, \
10199
"Enables IEEE precision (for INTEL only)") \
@@ -114,7 +112,7 @@ define_pd_global(intx, InitArrayShortSize, 8*BytesPerLong);
114112
product(bool, UseCLMUL, false, \
115113
"Control whether CLMUL instructions can be used on x86/x64") \
116114
\
117-
diagnostic(bool, UseIncDec, true, \
115+
product(bool, UseIncDec, true, DIAGNOSTIC, \
118116
"Use INC, DEC instructions on x86") \
119117
\
120118
product(bool, UseNewLongLShift, false, \
@@ -148,7 +146,7 @@ define_pd_global(intx, InitArrayShortSize, 8*BytesPerLong);
148146
product(bool, UseRTMLocking, false, \
149147
"Enable RTM lock eliding for inflated locks in compiled code") \
150148
\
151-
experimental(bool, UseRTMForStackLocks, false, \
149+
product(bool, UseRTMForStackLocks, false, EXPERIMENTAL, \
152150
"Enable RTM lock eliding for stack locks in compiled code") \
153151
\
154152
product(bool, UseRTMDeopt, false, \
@@ -158,33 +156,33 @@ define_pd_global(intx, InitArrayShortSize, 8*BytesPerLong);
158156
"Number of RTM retries on lock abort or busy") \
159157
range(0, max_jint) \
160158
\
161-
experimental(int, RTMSpinLoopCount, 100, \
159+
product(int, RTMSpinLoopCount, 100, EXPERIMENTAL, \
162160
"Spin count for lock to become free before RTM retry") \
163161
range(0, max_jint) \
164162
\
165-
experimental(int, RTMAbortThreshold, 1000, \
163+
product(int, RTMAbortThreshold, 1000, EXPERIMENTAL, \
166164
"Calculate abort ratio after this number of aborts") \
167165
range(0, max_jint) \
168166
\
169-
experimental(int, RTMLockingThreshold, 10000, \
167+
product(int, RTMLockingThreshold, 10000, EXPERIMENTAL, \
170168
"Lock count at which to do RTM lock eliding without " \
171169
"abort ratio calculation") \
172170
range(0, max_jint) \
173171
\
174-
experimental(int, RTMAbortRatio, 50, \
172+
product(int, RTMAbortRatio, 50, EXPERIMENTAL, \
175173
"Lock abort ratio at which to stop use RTM lock eliding") \
176174
range(0, 100) /* natural range */ \
177175
\
178-
experimental(int, RTMTotalCountIncrRate, 64, \
176+
product(int, RTMTotalCountIncrRate, 64, EXPERIMENTAL, \
179177
"Increment total RTM attempted lock count once every n times") \
180178
range(1, max_jint) \
181179
constraint(RTMTotalCountIncrRateConstraintFunc,AfterErgo) \
182180
\
183-
experimental(intx, RTMLockingCalculationDelay, 0, \
181+
product(intx, RTMLockingCalculationDelay, 0, EXPERIMENTAL, \
184182
"Number of milliseconds to wait before start calculating aborts " \
185183
"for RTM locking") \
186184
\
187-
experimental(bool, UseRTMXendForLockBusy, true, \
185+
product(bool, UseRTMXendForLockBusy, true, EXPERIMENTAL, \
188186
"Use RTM Xend instead of Xabort when lock busy") \
189187
\
190188
/* assembler */ \
@@ -203,21 +201,23 @@ define_pd_global(intx, InitArrayShortSize, 8*BytesPerLong);
203201
product(bool, UseBMI2Instructions, false, \
204202
"Use BMI2 instructions") \
205203
\
206-
diagnostic(bool, UseLibmIntrinsic, true, \
204+
product(bool, UseLibmIntrinsic, true, DIAGNOSTIC, \
207205
"Use Libm Intrinsics") \
208206
\
209207
/* Minimum array size in bytes to use AVX512 intrinsics */ \
210208
/* for copy, inflate and fill which don't bail out early based on any */ \
211209
/* condition. When this value is set to zero compare operations like */ \
212210
/* compare, vectorizedMismatch, compress can also use AVX512 intrinsics.*/\
213-
diagnostic(int, AVX3Threshold, 4096, \
211+
product(int, AVX3Threshold, 4096, DIAGNOSTIC, \
214212
"Minimum array size in bytes to use AVX512 intrinsics" \
215213
"for copy, inflate and fill. When this value is set as zero" \
216214
"compare operations can also use AVX512 intrinsics.") \
217215
range(0, max_jint) \
218216
\
219-
diagnostic(bool, IntelJccErratumMitigation, true, \
217+
product(bool, IntelJccErratumMitigation, true, DIAGNOSTIC, \
220218
"Turn off JVM mitigations related to Intel micro code " \
221219
"mitigations for the Intel JCC erratum")
222220

221+
// end of ARCH_FLAGS
222+
223223
#endif // CPU_X86_GLOBALS_X86_HPP

src/hotspot/cpu/zero/globals_zero.hpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,18 @@ define_pd_global(bool, PreserveFramePointer, false);
7373
// No performance work done here yet.
7474
define_pd_global(bool, CompactStrings, false);
7575

76-
#define ARCH_FLAGS(develop, \
77-
product, \
78-
diagnostic, \
79-
experimental, \
80-
notproduct, \
81-
range, \
82-
constraint) \
76+
#define ARCH_FLAGS(develop, \
77+
product, \
78+
notproduct, \
79+
range, \
80+
constraint) \
8381
\
8482
product(bool, UseFastEmptyMethods, true, \
8583
"Use fast method entry code for empty methods") \
8684
\
8785
product(bool, UseFastAccessorMethods, true, \
88-
"Use fast method entry code for accessor methods") \
89-
\
86+
"Use fast method entry code for accessor methods")
87+
88+
// end of ARCH_FLAGS
9089

9190
#endif // CPU_ZERO_GLOBALS_ZERO_HPP

src/hotspot/os/aix/globals_aix.hpp

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,16 @@
2727
#define OS_AIX_GLOBALS_AIX_HPP
2828

2929
//
30-
// Defines Aix specific flags. They are not available on other platforms.
30+
// Declare Aix specific flags. They are not available on other platforms.
3131
//
3232
// (Please keep the switches sorted alphabetically.)
33-
#define RUNTIME_OS_FLAGS(develop, \
34-
develop_pd, \
35-
product, \
36-
product_pd, \
37-
diagnostic, \
38-
diagnostic_pd, \
39-
notproduct, \
40-
range, \
41-
constraint) \
33+
#define RUNTIME_OS_FLAGS(develop, \
34+
develop_pd, \
35+
product, \
36+
product_pd, \
37+
notproduct, \
38+
range, \
39+
constraint) \
4240
\
4341
/* Whether to allow the VM to run if EXTSHM=ON. EXTSHM is an environment */ \
4442
/* variable used on AIX to activate certain hacks which allow more shm segments */\
@@ -77,9 +75,9 @@
7775
/* explicit commit behaviour. This flag, if true, causes the VM to touch */ \
7876
/* memory on os::commit_memory() (which normally is a noop). */ \
7977
product(bool, UseExplicitCommit, false, \
80-
"Explicit commit for virtual memory.") \
81-
\
78+
"Explicit commit for virtual memory.")
8279

80+
// end of RUNTIME_OS_FLAGS
8381

8482
//
8583
// Defines Aix-specific default values. The flags are available on all

src/hotspot/os/bsd/globals_bsd.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@
2626
#define OS_BSD_GLOBALS_BSD_HPP
2727

2828
//
29-
// Defines Bsd specific flags. They are not available on other platforms.
29+
// Declare Bsd specific flags. They are not available on other platforms.
3030
//
31-
#define RUNTIME_OS_FLAGS(develop, \
32-
develop_pd, \
33-
product, \
34-
product_pd, \
35-
diagnostic, \
36-
diagnostic_pd, \
37-
notproduct, \
38-
range, \
31+
#define RUNTIME_OS_FLAGS(develop, \
32+
develop_pd, \
33+
product, \
34+
product_pd, \
35+
notproduct, \
36+
range, \
3937
constraint)
4038

39+
// end of RUNTIME_OS_FLAGS
40+
4141
//
4242
// Defines Bsd-specific default values. The flags are available on all
4343
// platforms, but they may have different default values on other platforms.

0 commit comments

Comments
 (0)