changeset 57941:3277a7454dc5

8224599: Remove globals_ext.hpp Reviewed-by: coleenp, kvn, gziemski, ehelin
author stefank
date Wed, 04 Sep 2019 11:05:20 +0200
parents 647d623650d3
children a0a67b6b8183
files src/hotspot/share/gc/cms/jvmFlagConstraintsCMS.hpp src/hotspot/share/gc/g1/jvmFlagConstraintsG1.hpp src/hotspot/share/gc/parallel/jvmFlagConstraintsParallel.hpp src/hotspot/share/gc/shared/jvmFlagConstraintsGC.hpp src/hotspot/share/runtime/flags/jvmFlag.cpp src/hotspot/share/runtime/flags/jvmFlag.hpp src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp src/hotspot/share/runtime/flags/jvmFlagWriteableList.cpp src/hotspot/share/runtime/globals.cpp src/hotspot/share/runtime/globals.hpp src/hotspot/share/runtime/globals_ext.hpp src/hotspot/share/runtime/globals_extension.hpp src/hotspot/share/runtime/os_ext.hpp test/hotspot/gtest/runtime/test_globals.cpp
diffstat 15 files changed, 12 insertions(+), 102 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/gc/cms/jvmFlagConstraintsCMS.hpp	Mon Sep 09 09:05:30 2019 +0200
+++ b/src/hotspot/share/gc/cms/jvmFlagConstraintsCMS.hpp	Wed Sep 04 11:05:20 2019 +0200
@@ -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
--- a/src/hotspot/share/gc/g1/jvmFlagConstraintsG1.hpp	Mon Sep 09 09:05:30 2019 +0200
+++ b/src/hotspot/share/gc/g1/jvmFlagConstraintsG1.hpp	Wed Sep 04 11:05:20 2019 +0200
@@ -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
--- a/src/hotspot/share/gc/parallel/jvmFlagConstraintsParallel.hpp	Mon Sep 09 09:05:30 2019 +0200
+++ b/src/hotspot/share/gc/parallel/jvmFlagConstraintsParallel.hpp	Wed Sep 04 11:05:20 2019 +0200
@@ -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
--- a/src/hotspot/share/gc/shared/jvmFlagConstraintsGC.hpp	Mon Sep 09 09:05:30 2019 +0200
+++ b/src/hotspot/share/gc/shared/jvmFlagConstraintsGC.hpp	Wed Sep 04 11:05:20 2019 +0200
@@ -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
--- a/src/hotspot/share/runtime/flags/jvmFlag.cpp	Mon Sep 09 09:05:30 2019 +0200
+++ b/src/hotspot/share/runtime/flags/jvmFlag.cpp	Wed Sep 04 11:05:20 2019 +0200
@@ -339,9 +339,8 @@
 }
 
 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 @@
   if (is_experimental()) {
     return UnlockExperimentalVMOptions;
   }
-  return is_unlocked_ext();
+  return true;
 }
 
 void JVMFlag::clear_diagnostic() {
@@ -388,18 +387,18 @@
                  _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 @@
              IGNORE_RANGE, \
              IGNORE_CONSTRAINT, \
              IGNORE_WRITEABLE)
-  FLAGTABLE_EXT
   {0, NULL, NULL}
 };
 
--- a/src/hotspot/share/runtime/flags/jvmFlag.hpp	Mon Sep 09 09:05:30 2019 +0200
+++ b/src/hotspot/share/runtime/flags/jvmFlag.hpp	Wed Sep 04 11:05:20 2019 +0200
@@ -206,11 +206,6 @@
   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;
--- a/src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp	Mon Sep 09 09:05:30 2019 +0200
+++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp	Wed Sep 04 11:05:20 2019 +0200
@@ -269,8 +269,6 @@
             EMIT_CONSTRAINT_CHECK,
             IGNORE_WRITEABLE)
 
-  EMIT_CONSTRAINTS_FOR_GLOBALS_EXT
-
   EMIT_CONSTRAINT_END
 }
 
--- a/src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp	Mon Sep 09 09:05:30 2019 +0200
+++ b/src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp	Wed Sep 04 11:05:20 2019 +0200
@@ -334,8 +334,6 @@
             IGNORE_CONSTRAINT,
             IGNORE_WRITEABLE)
 
-  EMIT_RANGES_FOR_GLOBALS_EXT
-
   EMIT_RANGE_END
 }
 
--- a/src/hotspot/share/runtime/flags/jvmFlagWriteableList.cpp	Mon Sep 09 09:05:30 2019 +0200
+++ b/src/hotspot/share/runtime/flags/jvmFlagWriteableList.cpp	Wed Sep 04 11:05:20 2019 +0200
@@ -126,8 +126,6 @@
             IGNORE_CONSTRAINT,
             EMIT_WRITEABLE_CHECK)
 
-  EMIT_WRITEABLES_FOR_GLOBALS_EXT
-
   EMIT_WRITEABLE_END
 }
 
--- a/src/hotspot/share/runtime/globals.cpp	Mon Sep 09 09:05:30 2019 +0200
+++ b/src/hotspot/share/runtime/globals.cpp	Wed Sep 04 11:05:20 2019 +0200
@@ -78,5 +78,3 @@
           IGNORE_RANGE,                   \
           IGNORE_CONSTRAINT,              \
           IGNORE_WRITEABLE)
-
-MATERIALIZE_FLAGS_EXT
--- a/src/hotspot/share/runtime/globals.hpp	Mon Sep 09 09:05:30 2019 +0200
+++ b/src/hotspot/share/runtime/globals.hpp	Wed Sep 04 11:05:20 2019 +0200
@@ -2494,8 +2494,4 @@
           IGNORE_CONSTRAINT,          \
           IGNORE_WRITEABLE)
 
-// Extensions
-
-#include "runtime/globals_ext.hpp"
-
 #endif // SHARE_RUNTIME_GLOBALS_HPP
--- a/src/hotspot/share/runtime/globals_ext.hpp	Mon Sep 09 09:05:30 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -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
--- a/src/hotspot/share/runtime/globals_extension.hpp	Mon Sep 09 09:05:30 2019 +0200
+++ b/src/hotspot/share/runtime/globals_extension.hpp	Wed Sep 04 11:05:20 2019 +0200
@@ -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 @@
             IGNORE_RANGE,
             IGNORE_CONSTRAINT,
             IGNORE_WRITEABLE)
-  JVMFLAGSENUM_EXT
   NUM_JVMFlagsEnum
 } JVMFlagsEnum;
 
--- a/src/hotspot/share/runtime/os_ext.hpp	Mon Sep 09 09:05:30 2019 +0200
+++ b/src/hotspot/share/runtime/os_ext.hpp	Wed Sep 04 11:05:20 2019 +0200
@@ -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.
--- a/test/hotspot/gtest/runtime/test_globals.cpp	Mon Sep 09 09:05:30 2019 +0200
+++ b/test/hotspot/gtest/runtime/test_globals.cpp	Wed Sep 04 11:05:20 2019 +0200
@@ -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)                                \