changeset 60750:ee2c69f06370

8251560: Remove excessive header file inclusion from systemDictionary.hpp and others Reviewed-by: coleenp
author iklam
date Mon, 31 Aug 2020 08:05:08 -0700
parents 0f51e8ace120
children e10f558e1df5
files src/hotspot/share/aot/aotCodeHeap.cpp src/hotspot/share/ci/ciField.cpp src/hotspot/share/ci/ciReplay.cpp src/hotspot/share/classfile/classFileParser.cpp src/hotspot/share/classfile/classListParser.cpp src/hotspot/share/classfile/classLoadInfo.hpp src/hotspot/share/classfile/classLoader.cpp src/hotspot/share/classfile/classLoaderExt.cpp src/hotspot/share/classfile/dictionary.cpp src/hotspot/share/classfile/dictionary.hpp src/hotspot/share/classfile/javaClasses.cpp src/hotspot/share/classfile/javaClasses.hpp src/hotspot/share/classfile/klassFactory.cpp src/hotspot/share/classfile/systemDictionary.cpp src/hotspot/share/classfile/systemDictionary.hpp src/hotspot/share/classfile/systemDictionaryShared.hpp src/hotspot/share/gc/g1/g1Arguments.cpp src/hotspot/share/gc/g1/g1CollectedHeap.cpp src/hotspot/share/gc/parallel/mutableNUMASpace.cpp src/hotspot/share/gc/parallel/psParallelCompact.cpp src/hotspot/share/gc/shared/gcVMOperations.cpp src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp src/hotspot/share/jvmci/jvmciCompilerToVM.cpp src/hotspot/share/jvmci/jvmciJavaClasses.cpp src/hotspot/share/jvmci/jvmciRuntime.cpp src/hotspot/share/memory/virtualspace.cpp src/hotspot/share/oops/instanceKlass.cpp src/hotspot/share/oops/klass.inline.hpp src/hotspot/share/prims/jvm.cpp src/hotspot/share/prims/jvmtiRedefineClasses.cpp src/hotspot/share/prims/methodHandles.cpp src/hotspot/share/prims/unsafe.cpp src/hotspot/share/runtime/fieldDescriptor.inline.hpp src/hotspot/share/runtime/signature.cpp src/hotspot/share/runtime/signature.hpp
diffstat 35 files changed, 187 insertions(+), 141 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/aot/aotCodeHeap.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/aot/aotCodeHeap.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -44,6 +44,7 @@
 #include "runtime/deoptimization.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/os.hpp"
+#include "runtime/java.hpp"
 #include "runtime/safepointVerifiers.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/vmOperations.hpp"
--- a/src/hotspot/share/ci/ciField.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/ci/ciField.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -32,6 +32,7 @@
 #include "oops/oop.inline.hpp"
 #include "runtime/fieldDescriptor.inline.hpp"
 #include "runtime/handles.inline.hpp"
+#include "runtime/reflectionUtils.hpp"
 
 // ciField
 //
--- a/src/hotspot/share/ci/ciReplay.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/ci/ciReplay.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -39,6 +39,7 @@
 #include "oops/oop.inline.hpp"
 #include "runtime/fieldDescriptor.inline.hpp"
 #include "runtime/handles.inline.hpp"
+#include "runtime/java.hpp"
 #include "utilities/copy.hpp"
 #include "utilities/macros.hpp"
 #include "utilities/utf8.hpp"
--- a/src/hotspot/share/classfile/classFileParser.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/classfile/classFileParser.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -28,6 +28,7 @@
 #include "classfile/classFileStream.hpp"
 #include "classfile/classLoader.hpp"
 #include "classfile/classLoaderData.inline.hpp"
+#include "classfile/classLoadInfo.hpp"
 #include "classfile/defaultMethods.hpp"
 #include "classfile/dictionary.hpp"
 #include "classfile/fieldLayoutBuilder.hpp"
--- a/src/hotspot/share/classfile/classListParser.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/classfile/classListParser.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -36,6 +36,7 @@
 #include "memory/metaspaceShared.hpp"
 #include "memory/resourceArea.hpp"
 #include "runtime/handles.inline.hpp"
+#include "runtime/java.hpp"
 #include "runtime/javaCalls.hpp"
 #include "utilities/defaultStream.hpp"
 #include "utilities/hashtable.inline.hpp"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/share/classfile/classLoadInfo.hpp	Mon Aug 31 08:05:08 2020 -0700
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2020, 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_CLASSFILE_CLASSLOADINFO_HPP
+#define SHARE_CLASSFILE_CLASSLOADINFO_HPP
+
+#include "runtime/handles.hpp"
+
+class InstanceKlass;
+
+template <typename T> class GrowableArray;
+
+class ClassInstanceInfo : public StackObj {
+ private:
+  InstanceKlass* _dynamic_nest_host;
+  Handle _class_data;
+
+ public:
+  ClassInstanceInfo() {
+    _dynamic_nest_host = NULL;
+    _class_data = Handle();
+  }
+  ClassInstanceInfo(InstanceKlass* dynamic_nest_host, Handle class_data) {
+    _dynamic_nest_host = dynamic_nest_host;
+    _class_data = class_data;
+  }
+
+  InstanceKlass* dynamic_nest_host() const { return _dynamic_nest_host; }
+  Handle class_data() const { return _class_data; }
+  friend class ClassLoadInfo;
+};
+
+class ClassLoadInfo : public StackObj {
+ private:
+  Handle                 _protection_domain;
+  const InstanceKlass*   _unsafe_anonymous_host;
+  GrowableArray<Handle>* _cp_patches;
+  ClassInstanceInfo      _class_hidden_info;
+  bool                   _is_hidden;
+  bool                   _is_strong_hidden;
+  bool                   _can_access_vm_annotations;
+
+ public:
+  ClassLoadInfo(Handle protection_domain) {
+    _protection_domain = protection_domain;
+    _unsafe_anonymous_host = NULL;
+    _cp_patches = NULL;
+    _class_hidden_info._dynamic_nest_host = NULL;
+    _class_hidden_info._class_data = Handle();
+    _is_hidden = false;
+    _is_strong_hidden = false;
+    _can_access_vm_annotations = false;
+  }
+
+  ClassLoadInfo(Handle protection_domain, const InstanceKlass* unsafe_anonymous_host,
+                GrowableArray<Handle>* cp_patches, InstanceKlass* dynamic_nest_host,
+                Handle class_data, bool is_hidden, bool is_strong_hidden,
+                bool can_access_vm_annotations) {
+    _protection_domain = protection_domain;
+    _unsafe_anonymous_host = unsafe_anonymous_host;
+    _cp_patches = cp_patches;
+    _class_hidden_info._dynamic_nest_host = dynamic_nest_host;
+    _class_hidden_info._class_data = class_data;
+    _is_hidden = is_hidden;
+    _is_strong_hidden = is_strong_hidden;
+    _can_access_vm_annotations = can_access_vm_annotations;
+  }
+
+  Handle protection_domain()             const { return _protection_domain; }
+  const InstanceKlass* unsafe_anonymous_host() const { return _unsafe_anonymous_host; }
+  GrowableArray<Handle>* cp_patches()    const { return _cp_patches; }
+  const ClassInstanceInfo* class_hidden_info_ptr() const { return &_class_hidden_info; }
+  bool is_hidden()                       const { return _is_hidden; }
+  bool is_strong_hidden()                const { return _is_strong_hidden; }
+  bool can_access_vm_annotations()       const { return _can_access_vm_annotations; }
+};
+
+#endif // SHARE_CLASSFILE_CLASSLOADINFO_HPP
--- a/src/hotspot/share/classfile/classLoader.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/classfile/classLoader.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -29,6 +29,7 @@
 #include "classfile/classLoader.inline.hpp"
 #include "classfile/classLoaderData.inline.hpp"
 #include "classfile/classLoaderExt.hpp"
+#include "classfile/classLoadInfo.hpp"
 #include "classfile/javaClasses.hpp"
 #include "classfile/moduleEntry.hpp"
 #include "classfile/modules.hpp"
--- a/src/hotspot/share/classfile/classLoaderExt.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/classfile/classLoaderExt.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -28,6 +28,7 @@
 #include "classfile/classLoader.inline.hpp"
 #include "classfile/classLoaderExt.hpp"
 #include "classfile/classLoaderData.inline.hpp"
+#include "classfile/classLoadInfo.hpp"
 #include "classfile/klassFactory.hpp"
 #include "classfile/modules.hpp"
 #include "classfile/systemDictionaryShared.hpp"
--- a/src/hotspot/share/classfile/dictionary.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/classfile/dictionary.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -33,6 +33,7 @@
 #include "memory/metaspaceClosure.hpp"
 #include "memory/resourceArea.hpp"
 #include "memory/universe.hpp"
+#include "oops/method.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/oopHandle.inline.hpp"
 #include "runtime/arguments.hpp"
@@ -418,6 +419,23 @@
   _method_type.release(Universe::vm_global());
 }
 
+void SymbolPropertyEntry::print_entry(outputStream* st) const {
+  symbol()->print_value_on(st);
+  st->print("/mode=" INTX_FORMAT, symbol_mode());
+  st->print(" -> ");
+  bool printed = false;
+  if (method() != NULL) {
+    method()->print_value_on(st);
+    printed = true;
+  }
+  if (method_type() != NULL) {
+    if (printed)  st->print(" and ");
+    st->print(INTPTR_FORMAT, p2i((void *)method_type()));
+    printed = true;
+  }
+  st->print_cr(printed ? "" : "(empty)");
+}
+
 SymbolPropertyTable::SymbolPropertyTable(int table_size)
   : Hashtable<Symbol*, mtSymbol>(table_size, sizeof(SymbolPropertyEntry))
 {
--- a/src/hotspot/share/classfile/dictionary.hpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/classfile/dictionary.hpp	Mon Aug 31 08:05:08 2020 -0700
@@ -25,8 +25,6 @@
 #ifndef SHARE_CLASSFILE_DICTIONARY_HPP
 #define SHARE_CLASSFILE_DICTIONARY_HPP
 
-#include "classfile/protectionDomainCache.hpp"
-#include "classfile/systemDictionary.hpp"
 #include "oops/instanceKlass.hpp"
 #include "oops/oop.hpp"
 #include "oops/oopHandle.hpp"
@@ -34,7 +32,7 @@
 #include "utilities/ostream.hpp"
 
 class DictionaryEntry;
-class BoolObjectClosure;
+class ProtectionDomainEntry;
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // The data structure for the class loader data dictionaries.
@@ -208,22 +206,7 @@
     return (SymbolPropertyEntry**)HashtableEntry<Symbol*, mtSymbol>::next_addr();
   }
 
-  void print_entry(outputStream* st) const {
-    symbol()->print_value_on(st);
-    st->print("/mode=" INTX_FORMAT, symbol_mode());
-    st->print(" -> ");
-    bool printed = false;
-    if (method() != NULL) {
-      method()->print_value_on(st);
-      printed = true;
-    }
-    if (method_type() != NULL) {
-      if (printed)  st->print(" and ");
-      st->print(INTPTR_FORMAT, p2i((void *)method_type()));
-      printed = true;
-    }
-    st->print_cr(printed ? "" : "(empty)");
-  }
+  void print_entry(outputStream* st) const;
 };
 
 // A system-internal mapping of symbols to pointers, both managed
--- a/src/hotspot/share/classfile/javaClasses.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/classfile/javaClasses.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -62,6 +62,7 @@
 #include "runtime/java.hpp"
 #include "runtime/javaCalls.hpp"
 #include "runtime/jniHandles.inline.hpp"
+#include "runtime/reflectionUtils.hpp"
 #include "runtime/safepoint.hpp"
 #include "runtime/safepointVerifiers.hpp"
 #include "runtime/thread.inline.hpp"
--- a/src/hotspot/share/classfile/javaClasses.hpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/classfile/javaClasses.hpp	Mon Aug 31 08:05:08 2020 -0700
@@ -28,6 +28,7 @@
 #include "classfile/systemDictionary.hpp"
 #include "jvmtifiles/jvmti.h"
 #include "oops/oop.hpp"
+#include "oops/instanceKlass.hpp"
 #include "runtime/os.hpp"
 
 class RecordComponent;
--- a/src/hotspot/share/classfile/klassFactory.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/classfile/klassFactory.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -28,6 +28,7 @@
 #include "classfile/classLoader.hpp"
 #include "classfile/classLoaderData.hpp"
 #include "classfile/classLoaderData.inline.hpp"
+#include "classfile/classLoadInfo.hpp"
 #include "classfile/klassFactory.hpp"
 #include "memory/filemap.hpp"
 #include "memory/metaspaceShared.hpp"
--- a/src/hotspot/share/classfile/systemDictionary.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/classfile/systemDictionary.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -31,6 +31,7 @@
 #include "classfile/classLoaderData.inline.hpp"
 #include "classfile/classLoaderDataGraph.inline.hpp"
 #include "classfile/classLoaderExt.hpp"
+#include "classfile/classLoadInfo.hpp"
 #include "classfile/dictionary.hpp"
 #include "classfile/javaClasses.inline.hpp"
 #include "classfile/klassFactory.hpp"
@@ -111,46 +112,6 @@
 
 const int defaultProtectionDomainCacheSize = 1009;
 
-ClassLoadInfo::ClassLoadInfo() {
-  _protection_domain = Handle();
-  _unsafe_anonymous_host = NULL;
-  _cp_patches = NULL;
-  _class_hidden_info._dynamic_nest_host = NULL;
-  _class_hidden_info._class_data = Handle();
-  _is_hidden = false;
-  _is_strong_hidden = false;
-  _can_access_vm_annotations = false;
-}
-
-ClassLoadInfo::ClassLoadInfo(Handle protection_domain) {
-  _protection_domain = protection_domain;
-  _unsafe_anonymous_host = NULL;
-  _cp_patches = NULL;
-  _class_hidden_info._dynamic_nest_host = NULL;
-  _class_hidden_info._class_data = Handle();
-  _is_hidden = false;
-  _is_strong_hidden = false;
-  _can_access_vm_annotations = false;
-}
-
-ClassLoadInfo::ClassLoadInfo(Handle protection_domain,
-                             const InstanceKlass* unsafe_anonymous_host,
-                             GrowableArray<Handle>* cp_patches,
-                             InstanceKlass* dynamic_nest_host,
-                             Handle class_data,
-                             bool is_hidden,
-                             bool is_strong_hidden,
-                             bool can_access_vm_annotations) {
-  _protection_domain = protection_domain;
-  _unsafe_anonymous_host = unsafe_anonymous_host;
-  _cp_patches = cp_patches;
-  _class_hidden_info._dynamic_nest_host = dynamic_nest_host;
-  _class_hidden_info._class_data = class_data;
-  _is_hidden = is_hidden;
-  _is_strong_hidden = is_strong_hidden;
-  _can_access_vm_annotations = can_access_vm_annotations;
-}
-
 // ----------------------------------------------------------------------------
 // Java-level SystemLoader and PlatformLoader
 
@@ -2047,6 +2008,10 @@
   }
   return false;
 }
+
+bool SystemDictionary::is_well_known_klass(Klass* k) {
+  return is_well_known_klass(k->name());
+}
 #endif
 
 bool SystemDictionary::resolve_wk_klass(WKID id, TRAPS) {
@@ -2951,6 +2916,19 @@
   return _pd_cache_table->get(protection_domain);
 }
 
+ClassLoaderData* SystemDictionary::class_loader_data(Handle class_loader) {
+  return ClassLoaderData::class_loader_data(class_loader());
+}
+
+bool SystemDictionary::is_wk_klass_loaded(InstanceKlass* klass) {
+  return !(klass == NULL || !klass->is_loaded());
+}
+
+bool SystemDictionary::is_nonpublic_Object_method(Method* m) {
+  assert(m != NULL, "Unexpected NULL Method*");
+  return !m->is_public() && m->method_holder() == SystemDictionary::Object_klass();
+}
+
 // ----------------------------------------------------------------------------
 
 void SystemDictionary::print_on(outputStream *st) {
--- a/src/hotspot/share/classfile/systemDictionary.hpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/classfile/systemDictionary.hpp	Mon Aug 31 08:05:08 2020 -0700
@@ -25,62 +25,10 @@
 #ifndef SHARE_CLASSFILE_SYSTEMDICTIONARY_HPP
 #define SHARE_CLASSFILE_SYSTEMDICTIONARY_HPP
 
-#include "classfile/classLoaderData.hpp"
-#include "oops/objArrayOop.hpp"
+#include "classfile/vmSymbols.hpp"
 #include "oops/oopHandle.hpp"
-#include "oops/symbol.hpp"
-#include "runtime/java.hpp"
-#include "runtime/mutexLocker.hpp"
-#include "runtime/reflectionUtils.hpp"
+#include "runtime/handles.hpp"
 #include "runtime/signature.hpp"
-#include "utilities/hashtable.hpp"
-
-class ClassInstanceInfo : public StackObj {
- private:
-  InstanceKlass* _dynamic_nest_host;
-  Handle _class_data;
-
- public:
-  ClassInstanceInfo() {
-    _dynamic_nest_host = NULL;
-    _class_data = Handle();
-  }
-  ClassInstanceInfo(InstanceKlass* dynamic_nest_host, Handle class_data) {
-    _dynamic_nest_host = dynamic_nest_host;
-    _class_data = class_data;
-  }
-
-  InstanceKlass* dynamic_nest_host() const { return _dynamic_nest_host; }
-  Handle class_data() const { return _class_data; }
-  friend class ClassLoadInfo;
-};
-
-class ClassLoadInfo : public StackObj {
- private:
-  Handle                 _protection_domain;
-  const InstanceKlass*   _unsafe_anonymous_host;
-  GrowableArray<Handle>* _cp_patches;
-  ClassInstanceInfo      _class_hidden_info;
-  bool                   _is_hidden;
-  bool                   _is_strong_hidden;
-  bool                   _can_access_vm_annotations;
-
- public:
-  ClassLoadInfo();
-  ClassLoadInfo(Handle protection_domain);
-  ClassLoadInfo(Handle protection_domain, const InstanceKlass* unsafe_anonymous_host,
-                GrowableArray<Handle>* cp_patches, InstanceKlass* dynamic_nest_host,
-                Handle class_data, bool is_hidden, bool is_strong_hidden,
-                bool can_access_vm_annotations);
-
-  Handle protection_domain()             const { return _protection_domain; }
-  const InstanceKlass* unsafe_anonymous_host() const { return _unsafe_anonymous_host; }
-  GrowableArray<Handle>* cp_patches()    const { return _cp_patches; }
-  const ClassInstanceInfo* class_hidden_info_ptr() const { return &_class_hidden_info; }
-  bool is_hidden()                       const { return _is_hidden; }
-  bool is_strong_hidden()                const { return _is_strong_hidden; }
-  bool can_access_vm_annotations()       const { return _can_access_vm_annotations; }
-};
 
 // The dictionary in each ClassLoaderData stores all loaded classes, either
 // initiatied by its class loader or defined by its class loader:
@@ -123,16 +71,20 @@
 
 class BootstrapInfo;
 class ClassFileStream;
+class ClassLoadInfo;
 class Dictionary;
 class PlaceholderTable;
 class LoaderConstraintTable;
 template <MEMFLAGS F> class HashtableBucket;
 class ResolutionErrorTable;
 class SymbolPropertyTable;
+class PackageEntry;
 class ProtectionDomainCacheTable;
 class ProtectionDomainCacheEntry;
 class GCTimer;
 class EventClassLoad;
+class Symbol;
+class TableStatistics;
 
 #define WK_KLASS_ENUM_NAME(kname)    kname##_knum
 
@@ -445,22 +397,15 @@
   }
   static BasicType box_klass_type(Klass* k);  // inverse of box_klass
 #ifdef ASSERT
-  static bool is_well_known_klass(Klass* k) {
-    return is_well_known_klass(k->name());
-  }
+  static bool is_well_known_klass(Klass* k);
   static bool is_well_known_klass(Symbol* class_name);
 #endif
 
 protected:
   // Returns the class loader data to be used when looking up/updating the
   // system dictionary.
-  static ClassLoaderData *class_loader_data(Handle class_loader) {
-    return ClassLoaderData::class_loader_data(class_loader());
-  }
-
-  static bool is_wk_klass_loaded(InstanceKlass* klass) {
-    return !(klass == NULL || !klass->is_loaded());
-  }
+  static ClassLoaderData *class_loader_data(Handle class_loader);
+  static bool is_wk_klass_loaded(InstanceKlass* klass);
 
 public:
   static bool Object_klass_loaded()         { return is_wk_klass_loaded(WK_KLASS(Object_klass));             }
@@ -670,10 +615,7 @@
            is_system_class_loader(class_loader);
   }
   // Returns TRUE if the method is a non-public member of class java.lang.Object.
-  static bool is_nonpublic_Object_method(Method* m) {
-    assert(m != NULL, "Unexpected NULL Method*");
-    return !m->is_public() && m->method_holder() == SystemDictionary::Object_klass();
-  }
+  static bool is_nonpublic_Object_method(Method* m);
 
   // Return Symbol or throw exception if name given is can not be a valid Symbol.
   static Symbol* class_name_symbol(const char* name, Symbol* exception, TRAPS);
--- a/src/hotspot/share/classfile/systemDictionaryShared.hpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/classfile/systemDictionaryShared.hpp	Mon Aug 31 08:05:08 2020 -0700
@@ -26,7 +26,6 @@
 #define SHARE_CLASSFILE_SYSTEMDICTIONARYSHARED_HPP
 
 #include "oops/klass.hpp"
-#include "classfile/dictionary.hpp"
 #include "classfile/packageEntry.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "memory/filemap.hpp"
@@ -103,6 +102,7 @@
 #define UNREGISTERED_INDEX -9999
 
 class ClassFileStream;
+class Dictionary;
 class DumpTimeSharedClassInfo;
 class DumpTimeSharedClassTable;
 class LambdaProxyClassDictionary;
--- a/src/hotspot/share/gc/g1/g1Arguments.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/gc/g1/g1Arguments.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -34,6 +34,7 @@
 #include "gc/shared/workerPolicy.hpp"
 #include "runtime/globals.hpp"
 #include "runtime/globals_extension.hpp"
+#include "runtime/java.hpp"
 
 static const double MaxRamFractionForYoung = 0.8;
 size_t G1Arguments::MaxMemoryForYoung;
@@ -274,4 +275,4 @@
 
 size_t G1Arguments::heap_max_size_bytes() {
   return MaxHeapSize;
-}
\ No newline at end of file
+}
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -98,6 +98,7 @@
 #include "runtime/atomic.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/init.hpp"
+#include "runtime/java.hpp"
 #include "runtime/orderAccess.hpp"
 #include "runtime/threadSMR.hpp"
 #include "runtime/vmThread.hpp"
--- a/src/hotspot/share/gc/parallel/mutableNUMASpace.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/gc/parallel/mutableNUMASpace.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2020, 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
@@ -29,6 +29,7 @@
 #include "memory/allocation.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/atomic.hpp"
+#include "runtime/java.hpp"
 #include "runtime/thread.inline.hpp"
 #include "runtime/threadSMR.hpp"
 #include "utilities/align.hpp"
--- a/src/hotspot/share/gc/parallel/psParallelCompact.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/gc/parallel/psParallelCompact.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -73,6 +73,7 @@
 #include "oops/oop.inline.hpp"
 #include "runtime/atomic.hpp"
 #include "runtime/handles.inline.hpp"
+#include "runtime/java.hpp"
 #include "runtime/safepoint.hpp"
 #include "runtime/vmThread.hpp"
 #include "services/memTracker.hpp"
--- a/src/hotspot/share/gc/shared/gcVMOperations.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/gc/shared/gcVMOperations.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -36,6 +36,7 @@
 #include "memory/universe.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/init.hpp"
+#include "runtime/java.hpp"
 #include "utilities/dtrace.hpp"
 #include "utilities/macros.hpp"
 #include "utilities/preserveException.hpp"
--- a/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -26,6 +26,7 @@
 #include "jvm.h"
 #include "classfile/classFileParser.hpp"
 #include "classfile/classFileStream.hpp"
+#include "classfile/classLoadInfo.hpp"
 #include "classfile/javaClasses.inline.hpp"
 #include "classfile/moduleEntry.hpp"
 #include "classfile/modules.hpp"
--- a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -50,6 +50,7 @@
 #include "runtime/frame.inline.hpp"
 #include "runtime/interfaceSupport.inline.hpp"
 #include "runtime/jniHandles.inline.hpp"
+#include "runtime/reflectionUtils.hpp"
 #include "runtime/timerTrace.hpp"
 #include "runtime/vframe_hp.hpp"
 
--- a/src/hotspot/share/jvmci/jvmciJavaClasses.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/jvmci/jvmciJavaClasses.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -28,8 +28,9 @@
 #include "jvmci/jvmciJavaClasses.hpp"
 #include "jvmci/jvmciRuntime.hpp"
 #include "memory/resourceArea.hpp"
+#include "runtime/fieldDescriptor.inline.hpp"
 #include "runtime/jniHandles.inline.hpp"
-#include "runtime/fieldDescriptor.inline.hpp"
+#include "runtime/java.hpp"
 
 // ------------------------------------------------------------------
 
--- a/src/hotspot/share/jvmci/jvmciRuntime.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/jvmci/jvmciRuntime.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -43,7 +43,9 @@
 #include "runtime/deoptimization.hpp"
 #include "runtime/fieldDescriptor.inline.hpp"
 #include "runtime/frame.inline.hpp"
+#include "runtime/java.hpp"
 #include "runtime/jniHandles.inline.hpp"
+#include "runtime/reflectionUtils.hpp"
 #include "runtime/sharedRuntime.hpp"
 #if INCLUDE_G1GC
 #include "gc/g1/g1ThreadLocalData.hpp"
--- a/src/hotspot/share/memory/virtualspace.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/memory/virtualspace.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -29,6 +29,7 @@
 #include "oops/compressedOops.hpp"
 #include "oops/markWord.hpp"
 #include "oops/oop.inline.hpp"
+#include "runtime/java.hpp"
 #include "runtime/os.inline.hpp"
 #include "services/memTracker.hpp"
 #include "utilities/align.hpp"
--- a/src/hotspot/share/oops/instanceKlass.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/oops/instanceKlass.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -77,6 +77,7 @@
 #include "runtime/javaCalls.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "runtime/orderAccess.hpp"
+#include "runtime/reflectionUtils.hpp"
 #include "runtime/thread.inline.hpp"
 #include "services/classLoadingService.hpp"
 #include "services/threadService.hpp"
--- a/src/hotspot/share/oops/klass.inline.hpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/oops/klass.inline.hpp	Mon Aug 31 08:05:08 2020 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2020, 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
@@ -26,10 +26,8 @@
 #define SHARE_OOPS_KLASS_INLINE_HPP
 
 #include "classfile/classLoaderData.inline.hpp"
-#include "oops/compressedOops.hpp"
 #include "oops/klass.hpp"
 #include "oops/markWord.hpp"
-#include "oops/oopHandle.inline.hpp"
 
 inline void Klass::set_prototype_header(markWord header) {
   assert(!header.has_bias_pattern() || is_instance_klass(), "biased locking currently only supported for Java instances");
--- a/src/hotspot/share/prims/jvm.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/prims/jvm.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -28,6 +28,7 @@
 #include "classfile/classLoader.hpp"
 #include "classfile/classLoaderData.hpp"
 #include "classfile/classLoaderData.inline.hpp"
+#include "classfile/classLoadInfo.hpp"
 #include "classfile/javaAssertions.hpp"
 #include "classfile/javaClasses.inline.hpp"
 #include "classfile/moduleEntry.hpp"
--- a/src/hotspot/share/prims/jvmtiRedefineClasses.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/prims/jvmtiRedefineClasses.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -24,8 +24,9 @@
 
 #include "precompiled.hpp"
 #include "aot/aotLoader.hpp"
+#include "classfile/classFileStream.hpp"
 #include "classfile/classLoaderDataGraph.hpp"
-#include "classfile/classFileStream.hpp"
+#include "classfile/classLoadInfo.hpp"
 #include "classfile/javaClasses.inline.hpp"
 #include "classfile/metadataOnStackMark.hpp"
 #include "classfile/symbolTable.hpp"
--- a/src/hotspot/share/prims/methodHandles.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/prims/methodHandles.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -51,6 +51,7 @@
 #include "runtime/jniHandles.inline.hpp"
 #include "runtime/timerTrace.hpp"
 #include "runtime/reflection.hpp"
+#include "runtime/reflectionUtils.hpp"
 #include "runtime/safepointVerifiers.hpp"
 #include "runtime/signature.hpp"
 #include "runtime/stubRoutines.hpp"
--- a/src/hotspot/share/prims/unsafe.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/prims/unsafe.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -27,6 +27,7 @@
 #include "jvm.h"
 #include "classfile/classFileStream.hpp"
 #include "classfile/classLoader.hpp"
+#include "classfile/classLoadInfo.hpp"
 #include "classfile/javaClasses.inline.hpp"
 #include "classfile/vmSymbols.hpp"
 #include "jfr/jfrEvents.hpp"
--- a/src/hotspot/share/runtime/fieldDescriptor.inline.hpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/runtime/fieldDescriptor.inline.hpp	Mon Aug 31 08:05:08 2020 -0700
@@ -25,6 +25,7 @@
 #ifndef SHARE_RUNTIME_FIELDDESCRIPTOR_INLINE_HPP
 #define SHARE_RUNTIME_FIELDDESCRIPTOR_INLINE_HPP
 
+#include "runtime/fieldDescriptor.hpp"
 #include "runtime/handles.inline.hpp"
 
 // All fieldDescriptor inline functions that (directly or indirectly) use "_cp()" or "_cp->"
--- a/src/hotspot/share/runtime/signature.cpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/runtime/signature.cpp	Mon Aug 31 08:05:08 2020 -0700
@@ -308,6 +308,12 @@
   return btcode;
 }
 
+Symbol* Signature::strip_envelope(const Symbol* signature) {
+  assert(has_envelope(signature), "precondition");
+  return SymbolTable::new_symbol((char*) signature->bytes() + 1,
+                                 signature->utf8_length() - 2);
+}
+
 static const int jl_len = 10, object_len = 6, jl_object_len = jl_len + object_len;
 static const char jl_str[] = "java/lang/";
 
--- a/src/hotspot/share/runtime/signature.hpp	Mon Aug 31 09:32:44 2020 -0400
+++ b/src/hotspot/share/runtime/signature.hpp	Mon Aug 31 08:05:08 2020 -0700
@@ -25,7 +25,6 @@
 #ifndef SHARE_RUNTIME_SIGNATURE_HPP
 #define SHARE_RUNTIME_SIGNATURE_HPP
 
-#include "classfile/symbolTable.hpp"
 #include "memory/allocation.hpp"
 #include "oops/method.hpp"
 
@@ -131,11 +130,7 @@
   // inside the envelope, by stripping 'L' and ';'.
   // Caller is responsible for decrementing the newly created
   // Symbol's refcount, use TempNewSymbol.
-  static Symbol* strip_envelope(const Symbol* signature) {
-    assert(has_envelope(signature), "precondition");
-    return SymbolTable::new_symbol((char*) signature->bytes() + 1,
-                                   signature->utf8_length() - 2);
-  }
+  static Symbol* strip_envelope(const Symbol* signature);
 
   // Assuming it's either a field or method descriptor, determine
   // whether it is in fact a method descriptor: