8224599: Remove globals_ext.hpp
Reviewed-by: coleenp, kvn, gziemski, ehelin
This commit is contained in:
parent
ffa889731a
commit
7384f6cdcf
src/hotspot/share
gc
cms
g1
parallel
shared
runtime
test/hotspot/gtest/runtime
@ -25,7 +25,7 @@
|
||||
#ifndef SHARE_GC_CMS_JVMFLAGCONSTRAINTSCMS_HPP
|
||||
#define SHARE_GC_CMS_JVMFLAGCONSTRAINTSCMS_HPP
|
||||
|
||||
#include "runtime/globals.hpp"
|
||||
#include "runtime/flags/jvmFlag.hpp"
|
||||
#include "utilities/globalDefinitions.hpp"
|
||||
|
||||
// CMS Flag Constraints
|
||||
|
@ -25,7 +25,7 @@
|
||||
#ifndef SHARE_GC_G1_JVMFLAGCONSTRAINTSG1_HPP
|
||||
#define SHARE_GC_G1_JVMFLAGCONSTRAINTSG1_HPP
|
||||
|
||||
#include "runtime/globals.hpp"
|
||||
#include "runtime/flags/jvmFlag.hpp"
|
||||
#include "utilities/globalDefinitions.hpp"
|
||||
|
||||
// G1 Flag Constraints
|
||||
|
@ -25,7 +25,7 @@
|
||||
#ifndef SHARE_GC_PARALLEL_JVMFLAGCONSTRAINTSPARALLEL_HPP
|
||||
#define SHARE_GC_PARALLEL_JVMFLAGCONSTRAINTSPARALLEL_HPP
|
||||
|
||||
#include "runtime/globals.hpp"
|
||||
#include "runtime/flags/jvmFlag.hpp"
|
||||
#include "utilities/globalDefinitions.hpp"
|
||||
|
||||
// Parallel Subconstraints
|
||||
|
@ -25,6 +25,7 @@
|
||||
#ifndef SHARE_GC_SHARED_JVMFLAGCONSTRAINTSGC_HPP
|
||||
#define SHARE_GC_SHARED_JVMFLAGCONSTRAINTSGC_HPP
|
||||
|
||||
#include "runtime/flags/jvmFlag.hpp"
|
||||
#include "utilities/globalDefinitions.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#if INCLUDE_CMSGC
|
||||
|
@ -339,9 +339,8 @@ bool JVMFlag::is_constant_in_binary() const {
|
||||
}
|
||||
|
||||
bool JVMFlag::is_unlocker() const {
|
||||
return strcmp(_name, "UnlockDiagnosticVMOptions") == 0 ||
|
||||
strcmp(_name, "UnlockExperimentalVMOptions") == 0 ||
|
||||
is_unlocker_ext();
|
||||
return strcmp(_name, "UnlockDiagnosticVMOptions") == 0 ||
|
||||
strcmp(_name, "UnlockExperimentalVMOptions") == 0;
|
||||
}
|
||||
|
||||
bool JVMFlag::is_unlocked() const {
|
||||
@ -351,7 +350,7 @@ bool JVMFlag::is_unlocked() const {
|
||||
if (is_experimental()) {
|
||||
return UnlockExperimentalVMOptions;
|
||||
}
|
||||
return is_unlocked_ext();
|
||||
return true;
|
||||
}
|
||||
|
||||
void JVMFlag::clear_diagnostic() {
|
||||
@ -388,18 +387,18 @@ JVMFlag::MsgType JVMFlag::get_locked_message(char* buf, int buflen) const {
|
||||
_name);
|
||||
return JVMFlag::NOTPRODUCT_FLAG_BUT_PRODUCT_BUILD;
|
||||
}
|
||||
return get_locked_message_ext(buf, buflen);
|
||||
return JVMFlag::NONE;
|
||||
}
|
||||
|
||||
bool JVMFlag::is_writeable() const {
|
||||
return is_manageable() || (is_product() && is_read_write()) || is_writeable_ext();
|
||||
return is_manageable() || (is_product() && is_read_write());
|
||||
}
|
||||
|
||||
// All flags except "manageable" are assumed to be internal flags.
|
||||
// Long term, we need to define a mechanism to specify which flags
|
||||
// are external/stable and change this function accordingly.
|
||||
bool JVMFlag::is_external() const {
|
||||
return is_manageable() || is_external_ext();
|
||||
return is_manageable();
|
||||
}
|
||||
|
||||
// Helper function for JVMFlag::print_on().
|
||||
@ -881,7 +880,6 @@ static JVMFlag flagTable[] = {
|
||||
IGNORE_RANGE, \
|
||||
IGNORE_CONSTRAINT, \
|
||||
IGNORE_WRITEABLE)
|
||||
FLAGTABLE_EXT
|
||||
{0, NULL, NULL}
|
||||
};
|
||||
|
||||
|
@ -206,11 +206,6 @@ public:
|
||||
bool is_writeable() const;
|
||||
bool is_external() const;
|
||||
|
||||
bool is_unlocker_ext() const;
|
||||
bool is_unlocked_ext() const;
|
||||
bool is_writeable_ext() const;
|
||||
bool is_external_ext() const;
|
||||
|
||||
void clear_diagnostic();
|
||||
|
||||
JVMFlag::MsgType get_locked_message(char*, int) const;
|
||||
|
@ -269,8 +269,6 @@ void JVMFlagConstraintList::init(void) {
|
||||
EMIT_CONSTRAINT_CHECK,
|
||||
IGNORE_WRITEABLE)
|
||||
|
||||
EMIT_CONSTRAINTS_FOR_GLOBALS_EXT
|
||||
|
||||
EMIT_CONSTRAINT_END
|
||||
}
|
||||
|
||||
|
@ -334,8 +334,6 @@ void JVMFlagRangeList::init(void) {
|
||||
IGNORE_CONSTRAINT,
|
||||
IGNORE_WRITEABLE)
|
||||
|
||||
EMIT_RANGES_FOR_GLOBALS_EXT
|
||||
|
||||
EMIT_RANGE_END
|
||||
}
|
||||
|
||||
|
@ -126,8 +126,6 @@ void JVMFlagWriteableList::init(void) {
|
||||
IGNORE_CONSTRAINT,
|
||||
EMIT_WRITEABLE_CHECK)
|
||||
|
||||
EMIT_WRITEABLES_FOR_GLOBALS_EXT
|
||||
|
||||
EMIT_WRITEABLE_END
|
||||
}
|
||||
|
||||
|
@ -78,5 +78,3 @@ ALL_FLAGS(MATERIALIZE_DEVELOPER_FLAG, \
|
||||
IGNORE_RANGE, \
|
||||
IGNORE_CONSTRAINT, \
|
||||
IGNORE_WRITEABLE)
|
||||
|
||||
MATERIALIZE_FLAGS_EXT
|
||||
|
@ -2494,8 +2494,4 @@ ALL_FLAGS(DECLARE_DEVELOPER_FLAG, \
|
||||
IGNORE_CONSTRAINT, \
|
||||
IGNORE_WRITEABLE)
|
||||
|
||||
// Extensions
|
||||
|
||||
#include "runtime/globals_ext.hpp"
|
||||
|
||||
#endif // SHARE_RUNTIME_GLOBALS_HPP
|
||||
|
@ -1,69 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SHARE_RUNTIME_GLOBALS_EXT_HPP
|
||||
#define SHARE_RUNTIME_GLOBALS_EXT_HPP
|
||||
|
||||
#include "runtime/flags/jvmFlag.hpp"
|
||||
|
||||
// globals_extension.hpp extension
|
||||
|
||||
// Additional JVMFlagsEnum values
|
||||
#define JVMFLAGSENUM_EXT
|
||||
|
||||
|
||||
// globals.cpp extension
|
||||
|
||||
// Additional flag definitions
|
||||
#define MATERIALIZE_FLAGS_EXT
|
||||
|
||||
// Additional flag descriptors: see flagTable definition
|
||||
#define FLAGTABLE_EXT
|
||||
|
||||
|
||||
// Default method implementations
|
||||
|
||||
inline bool JVMFlag::is_unlocker_ext() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool JVMFlag::is_unlocked_ext() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool JVMFlag::is_writeable_ext() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool JVMFlag::is_external_ext() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
inline JVMFlag::MsgType JVMFlag::get_locked_message_ext(char* buf, int buflen) const {
|
||||
assert(buf != NULL, "Buffer cannot be NULL");
|
||||
buf[0] = '\0';
|
||||
return JVMFlag::NONE;
|
||||
}
|
||||
|
||||
#endif // SHARE_RUNTIME_GLOBALS_EXT_HPP
|
@ -25,6 +25,7 @@
|
||||
#ifndef SHARE_RUNTIME_GLOBALS_EXTENSION_HPP
|
||||
#define SHARE_RUNTIME_GLOBALS_EXTENSION_HPP
|
||||
|
||||
#include "runtime/flags/jvmFlag.hpp"
|
||||
#include "runtime/globals.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
@ -64,7 +65,6 @@ typedef enum {
|
||||
IGNORE_RANGE,
|
||||
IGNORE_CONSTRAINT,
|
||||
IGNORE_WRITEABLE)
|
||||
JVMFLAGSENUM_EXT
|
||||
NUM_JVMFlagsEnum
|
||||
} JVMFlagsEnum;
|
||||
|
||||
|
@ -25,10 +25,6 @@
|
||||
#ifndef SHARE_RUNTIME_OS_EXT_HPP
|
||||
#define SHARE_RUNTIME_OS_EXT_HPP
|
||||
|
||||
#define EMIT_RANGES_FOR_GLOBALS_EXT // NOP
|
||||
#define EMIT_CONSTRAINTS_FOR_GLOBALS_EXT // NOP
|
||||
#define EMIT_WRITEABLES_FOR_GLOBALS_EXT // NOP
|
||||
|
||||
public:
|
||||
static void init_globals_ext() {} // Run from init_globals().
|
||||
// See os.hpp/cpp and init.cpp.
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "precompiled.hpp"
|
||||
#include "runtime/globals.hpp"
|
||||
#include "runtime/flags/flagSetting.hpp"
|
||||
#include "runtime/flags/jvmFlag.hpp"
|
||||
#include "unittest.hpp"
|
||||
|
||||
#define TEST_FLAG(f, type, value) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user