Skip to content

Commit 673aaaf

Browse files
committed
relax flag attributions (ala JDK-7123237)
1 parent 7eca234 commit 673aaaf

File tree

4 files changed

+1
-37
lines changed

4 files changed

+1
-37
lines changed

src/hotspot/share/runtime/arguments.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3782,7 +3782,6 @@ static void apply_debugger_ergo() {
37823782

37833783
jint Arguments::parse(const JavaVMInitArgs* initial_cmd_args) {
37843784
assert(verify_special_jvm_flags(false), "deprecated and obsolete flag table inconsistent");
3785-
JVMFlag::check_all_flag_declarations();
37863785

37873786
// If flag "-XX:Flags=flags-file" is used it will be the first option to be processed.
37883787
const char* hotspotrc = ".hotspotrc";

src/hotspot/share/runtime/flags/debug_globals.hpp

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,6 @@
3838
// just in case someone may add such a flag in the future.
3939
//
4040

41-
#ifndef ASSERT
42-
43-
#define DEBUG_RUNTIME_FLAGS(develop, \
44-
develop_pd, \
45-
product, \
46-
product_pd, \
47-
notproduct, \
48-
range, \
49-
constraint) \
50-
\
51-
52-
#else
53-
5441
#define DEBUG_RUNTIME_FLAGS(develop, \
5542
develop_pd, \
5643
product, \
@@ -59,14 +46,12 @@
5946
range, \
6047
constraint) \
6148
\
62-
product(ccstr, DummyManageableStringFlag, NULL, MANAGEABLE, \
49+
notproduct(ccstr, DummyManageableStringFlag, NULL, MANAGEABLE, \
6350
"Dummy flag for testing string handling in WriteableFlags") \
6451
\
6552

6653
// end of DEBUG_RUNTIME_FLAGS
6754

68-
#endif // ASSERT
69-
7055
DECLARE_FLAGS(DEBUG_RUNTIME_FLAGS)
7156

7257
#endif // SHARE_RUNTIME_DEBUG_GLOBALS_HPP

src/hotspot/share/runtime/flags/jvmFlag.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -681,25 +681,6 @@ void JVMFlag::assert_valid_flag_enum(JVMFlagsEnum i) {
681681
assert(0 <= int(i) && int(i) < NUM_JVMFlagsEnum, "must be");
682682
}
683683

684-
void JVMFlag::check_all_flag_declarations() {
685-
for (JVMFlag* current = &flagTable[0]; current->_name != NULL; current++) {
686-
int flags = static_cast<int>(current->_flags);
687-
// Backwards compatibility. This will be relaxed/removed in JDK-7123237.
688-
int mask = JVMFlag::KIND_DIAGNOSTIC | JVMFlag::KIND_MANAGEABLE | JVMFlag::KIND_EXPERIMENTAL;
689-
if ((flags & mask) != 0) {
690-
assert((flags & mask) == JVMFlag::KIND_DIAGNOSTIC ||
691-
(flags & mask) == JVMFlag::KIND_MANAGEABLE ||
692-
(flags & mask) == JVMFlag::KIND_EXPERIMENTAL,
693-
"%s can be declared with at most one of "
694-
"DIAGNOSTIC, MANAGEABLE or EXPERIMENTAL", current->_name);
695-
assert((flags & KIND_NOT_PRODUCT) == 0 &&
696-
(flags & KIND_DEVELOP) == 0,
697-
"%s has an optional DIAGNOSTIC, MANAGEABLE or EXPERIMENTAL "
698-
"attribute; it must be declared as a product flag", current->_name);
699-
}
700-
}
701-
}
702-
703684
#endif // ASSERT
704685

705686
void JVMFlag::printFlags(outputStream* out, bool withComments, bool printRanges, bool skipDefaults) {

src/hotspot/share/runtime/flags/jvmFlag.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ class JVMFlag {
179179
static JVMFlag* fuzzy_match(const char* name, size_t length, bool allow_locked = false);
180180

181181
static void assert_valid_flag_enum(JVMFlagsEnum i) NOT_DEBUG_RETURN;
182-
static void check_all_flag_declarations() NOT_DEBUG_RETURN;
183182

184183
inline JVMFlagsEnum flag_enum() const {
185184
JVMFlagsEnum i = static_cast<JVMFlagsEnum>(this - JVMFlag::flags);

0 commit comments

Comments
 (0)