On 1/04/2021 5:05 am, Ioi Lam wrote:
On Wed, 31 Mar 2021 12:58:50 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:
Ioi Lam has updated the pull request incrementally with one additional commit
since the last revision:
relax flag attributions (ala JDK-7123237)
src/hotspot/share/runtime/flags/debug_globals.hpp line 38:
36: // have any MANAGEABLE flags of the ccstr type, but we really need to
37: // make sure the implementation is correct (in terms of memory allocation)
38: // just in case someone may add such a flag in the future.
Could you have just added a develop flag to the manageable flags instead?
I had to use a `product` flag due to the following code, which should have been
removed as part of
[JDK-8243208](https://bugs.openjdk.java.net/browse/JDK-8243208), but I was
afraid to do so because I didn't have a test case. I.e., all of our
diagnostic/manageable/experimental flags were `product` flags.
With this PR, now I have a test case -- I changed `DummyManageableStringFlag`
to a `notproduct` flag, and removed the following code. I am re-running
tiers1-4 now.
Sorry but I don't understand how a test involving one flag replaces a
chunk of code that validated every flag declaration ??
David
-----
void JVMFlag::check_all_flag_declarations() {
for (JVMFlag* current = &flagTable[0]; current->_name != NULL; current++) {
int flags = static_cast<int>(current->_flags);
// Backwards compatibility. This will be relaxed/removed in JDK-7123237.
int mask = JVMFlag::KIND_DIAGNOSTIC | JVMFlag::KIND_MANAGEABLE |
JVMFlag::KIND_EXPERIMENTAL;
if ((flags & mask) != 0) {
assert((flags & mask) == JVMFlag::KIND_DIAGNOSTIC ||
(flags & mask) == JVMFlag::KIND_MANAGEABLE ||
(flags & mask) == JVMFlag::KIND_EXPERIMENTAL,
"%s can be declared with at most one of "
"DIAGNOSTIC, MANAGEABLE or EXPERIMENTAL", current->_name);
assert((flags & KIND_NOT_PRODUCT) == 0 &&
(flags & KIND_DEVELOP) == 0,
"%s has an optional DIAGNOSTIC, MANAGEABLE or EXPERIMENTAL "
"attribute; it must be declared as a product flag",
current->_name);
}
}
}
-------------
PR: https://git.openjdk.java.net/jdk/pull/3254