8191102: Incorrect include file use in classLoader.hpp
authorhseigel
Mon, 05 Mar 2018 10:29:23 -0500
changeset 49340 4e82736053ae
parent 49339 e651c3ea6ea8
child 49341 4ad0085ad6d2
8191102: Incorrect include file use in classLoader.hpp Summary: Move appropriate methods to <fiile>.inline.hpp files. Create <file>.inline.hpp files when needed. Reviewed-by: coleenp, dholmes
src/hotspot/share/aot/aotCodeHeap.cpp
src/hotspot/share/aot/aotCompiledMethod.cpp
src/hotspot/share/ci/ciEnv.cpp
src/hotspot/share/ci/ciMethod.cpp
src/hotspot/share/ci/ciReplay.cpp
src/hotspot/share/classfile/classFileParser.cpp
src/hotspot/share/classfile/classLoader.cpp
src/hotspot/share/classfile/classLoader.hpp
src/hotspot/share/classfile/classLoader.inline.hpp
src/hotspot/share/classfile/classLoaderData.inline.hpp
src/hotspot/share/classfile/classLoaderExt.cpp
src/hotspot/share/classfile/dictionary.cpp
src/hotspot/share/classfile/dictionary.hpp
src/hotspot/share/classfile/dictionary.inline.hpp
src/hotspot/share/classfile/javaClasses.cpp
src/hotspot/share/classfile/systemDictionary.cpp
src/hotspot/share/classfile/verifier.cpp
src/hotspot/share/code/codeCache.cpp
src/hotspot/share/code/compiledIC.cpp
src/hotspot/share/code/compiledMethod.cpp
src/hotspot/share/code/compiledMethod.hpp
src/hotspot/share/code/compiledMethod.inline.hpp
src/hotspot/share/code/nmethod.cpp
src/hotspot/share/compiler/compileBroker.cpp
src/hotspot/share/interpreter/bytecode.cpp
src/hotspot/share/interpreter/bytecode.hpp
src/hotspot/share/interpreter/bytecode.inline.hpp
src/hotspot/share/interpreter/bytecodeInterpreter.cpp
src/hotspot/share/interpreter/bytecodeTracer.cpp
src/hotspot/share/interpreter/interpreterRuntime.cpp
src/hotspot/share/interpreter/linkResolver.cpp
src/hotspot/share/jvmci/compilerRuntime.cpp
src/hotspot/share/jvmci/jvmciCompilerToVM.cpp
src/hotspot/share/jvmci/jvmciEnv.cpp
src/hotspot/share/memory/filemap.cpp
src/hotspot/share/oops/array.hpp
src/hotspot/share/oops/array.inline.hpp
src/hotspot/share/oops/constantPool.cpp
src/hotspot/share/oops/constantPool.hpp
src/hotspot/share/oops/constantPool.inline.hpp
src/hotspot/share/oops/cpCache.cpp
src/hotspot/share/oops/cpCache.hpp
src/hotspot/share/oops/cpCache.inline.hpp
src/hotspot/share/oops/method.cpp
src/hotspot/share/oops/method.hpp
src/hotspot/share/oops/method.inline.hpp
src/hotspot/share/oops/methodData.cpp
src/hotspot/share/oops/methodData.hpp
src/hotspot/share/oops/methodData.inline.hpp
src/hotspot/share/prims/jvmtiTagMap.cpp
src/hotspot/share/prims/methodComparator.cpp
src/hotspot/share/prims/whitebox.cpp
src/hotspot/share/runtime/compilationPolicy.cpp
src/hotspot/share/runtime/javaCalls.cpp
src/hotspot/share/runtime/rframe.cpp
src/hotspot/share/runtime/sharedRuntime.cpp
src/hotspot/share/runtime/simpleThresholdPolicy.hpp
src/hotspot/share/runtime/simpleThresholdPolicy.inline.hpp
--- a/src/hotspot/share/aot/aotCodeHeap.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/aot/aotCodeHeap.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -34,7 +34,7 @@
 #include "interpreter/abstractInterpreter.hpp"
 #include "jvmci/compilerRuntime.hpp"
 #include "jvmci/jvmciRuntime.hpp"
-#include "oops/method.hpp"
+#include "oops/method.inline.hpp"
 #include "runtime/os.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/vm_operations.hpp"
--- a/src/hotspot/share/aot/aotCompiledMethod.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/aot/aotCompiledMethod.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, 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
@@ -35,7 +35,7 @@
 #include "gc/shared/gcLocker.hpp"
 #include "jvmci/compilerRuntime.hpp"
 #include "jvmci/jvmciRuntime.hpp"
-#include "oops/method.hpp"
+#include "oops/method.inline.hpp"
 #include "runtime/java.hpp"
 #include "runtime/os.hpp"
 #include "runtime/sharedRuntime.hpp"
--- a/src/hotspot/share/ci/ciEnv.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/ci/ciEnv.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -46,6 +46,9 @@
 #include "memory/oopFactory.hpp"
 #include "memory/resourceArea.hpp"
 #include "memory/universe.inline.hpp"
+#include "oops/constantPool.inline.hpp"
+#include "oops/cpCache.inline.hpp"
+#include "oops/method.inline.hpp"
 #include "oops/methodData.hpp"
 #include "oops/objArrayKlass.hpp"
 #include "oops/objArrayOop.inline.hpp"
--- a/src/hotspot/share/ci/ciMethod.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/ci/ciMethod.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -42,6 +42,7 @@
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/generateOopMap.hpp"
+#include "oops/method.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/nativeLookup.hpp"
 #include "runtime/deoptimization.hpp"
--- a/src/hotspot/share/ci/ciReplay.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/ci/ciReplay.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, 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
@@ -33,6 +33,7 @@
 #include "memory/allocation.inline.hpp"
 #include "memory/oopFactory.hpp"
 #include "memory/resourceArea.hpp"
+#include "oops/method.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "utilities/copy.hpp"
 #include "utilities/macros.hpp"
--- a/src/hotspot/share/classfile/classFileParser.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/classfile/classFileParser.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -46,6 +46,7 @@
 #include "memory/resourceArea.hpp"
 #include "memory/universe.inline.hpp"
 #include "oops/annotations.hpp"
+#include "oops/constantPool.inline.hpp"
 #include "oops/fieldStreams.hpp"
 #include "oops/instanceKlass.hpp"
 #include "oops/instanceMirrorKlass.hpp"
--- a/src/hotspot/share/classfile/classLoader.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/classfile/classLoader.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -26,7 +26,7 @@
 #include "jvm.h"
 #include "jimage.hpp"
 #include "classfile/classFileStream.hpp"
-#include "classfile/classLoader.hpp"
+#include "classfile/classLoader.inline.hpp"
 #include "classfile/classLoaderData.inline.hpp"
 #include "classfile/classLoaderExt.hpp"
 #include "classfile/javaClasses.hpp"
@@ -51,6 +51,7 @@
 #include "memory/universe.inline.hpp"
 #include "oops/instanceKlass.hpp"
 #include "oops/instanceRefKlass.hpp"
+#include "oops/method.inline.hpp"
 #include "oops/objArrayOop.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/symbol.hpp"
--- a/src/hotspot/share/classfile/classLoader.hpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/classfile/classLoader.hpp	Mon Mar 05 10:29:23 2018 -0500
@@ -27,7 +27,6 @@
 
 #include "jimage.hpp"
 #include "runtime/handles.hpp"
-#include "runtime/orderAccess.hpp"
 #include "runtime/perfData.hpp"
 #include "utilities/exceptions.hpp"
 #include "utilities/macros.hpp"
@@ -49,13 +48,9 @@
 private:
   ClassPathEntry* volatile _next;
 public:
-  // Next entry in class path
-  ClassPathEntry* next() const { return OrderAccess::load_acquire(&_next); }
+  ClassPathEntry* next() const;
   virtual ~ClassPathEntry() {}
-  void set_next(ClassPathEntry* next) {
-    // may have unlocked readers, so ensure visibility.
-    OrderAccess::release_store(&_next, next);
-  }
+  void set_next(ClassPathEntry* next);
   virtual bool is_modules_image() const = 0;
   virtual bool is_jar_file() const = 0;
   virtual const char* name() const = 0;
@@ -396,25 +391,7 @@
 
   static int compute_Object_vtable();
 
-  static ClassPathEntry* classpath_entry(int n) {
-    assert(n >= 0, "sanity");
-    if (n == 0) {
-      assert(has_jrt_entry(), "No class path entry at 0 for exploded module builds");
-      return ClassLoader::_jrt_entry;
-    } else {
-      // The java runtime image is always the first entry
-      // in the FileMapInfo::_classpath_entry_table. Even though
-      // the _jrt_entry is not included in the _first_append_entry
-      // linked list, it must be accounted for when comparing the
-      // class path vs. the shared archive class path.
-      ClassPathEntry* e = ClassLoader::_first_append_entry;
-      while (--n >= 1) {
-        assert(e != NULL, "Not that many classpath entries.");
-        e = e->next();
-      }
-      return e;
-    }
-  }
+  static ClassPathEntry* classpath_entry(int n);
 
   static bool is_in_patch_mod_entries(Symbol* module_name);
 
@@ -423,38 +400,13 @@
 
   // Helper function used by CDS code to get the number of boot classpath
   // entries during shared classpath setup time.
-  static int num_boot_classpath_entries() {
-    assert(DumpSharedSpaces, "Should only be called at CDS dump time");
-    assert(has_jrt_entry(), "must have a java runtime image");
-    int num_entries = 1; // count the runtime image
-    ClassPathEntry* e = ClassLoader::_first_append_entry;
-    while (e != NULL) {
-      num_entries ++;
-      e = e->next();
-    }
-    return num_entries;
-  }
+  static int num_boot_classpath_entries();
 
-  static ClassPathEntry* get_next_boot_classpath_entry(ClassPathEntry* e) {
-    if (e == ClassLoader::_jrt_entry) {
-      return ClassLoader::_first_append_entry;
-    } else {
-      return e->next();
-    }
-  }
+  static ClassPathEntry* get_next_boot_classpath_entry(ClassPathEntry* e);
 
   // Helper function used by CDS code to get the number of app classpath
   // entries during shared classpath setup time.
-  static int num_app_classpath_entries() {
-    assert(DumpSharedSpaces, "Should only be called at CDS dump time");
-    int num_entries = 0;
-    ClassPathEntry* e= ClassLoader::_app_classpath_entries;
-    while (e != NULL) {
-      num_entries ++;
-      e = e->next();
-    }
-    return num_entries;
-  }
+  static int num_app_classpath_entries();
 
   static void  check_shared_classpath(const char *path);
   static void  finalize_shared_paths_misc_info();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/share/classfile/classLoader.inline.hpp	Mon Mar 05 10:29:23 2018 -0500
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2018, 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_VM_CLASSFILE_CLASSLOADER_INLINE_HPP
+#define SHARE_VM_CLASSFILE_CLASSLOADER_INLINE_HPP
+
+#include "classfile/classLoader.hpp"
+#include "runtime/orderAccess.inline.hpp"
+
+// Next entry in class path
+inline ClassPathEntry* ClassPathEntry::next() const { return OrderAccess::load_acquire(&_next); }
+
+inline void ClassPathEntry::set_next(ClassPathEntry* next) {
+  // may have unlocked readers, so ensure visibility.
+  OrderAccess::release_store(&_next, next);
+}
+
+inline ClassPathEntry* ClassLoader::classpath_entry(int n) {
+  assert(n >= 0, "sanity");
+  if (n == 0) {
+    assert(has_jrt_entry(), "No class path entry at 0 for exploded module builds");
+    return ClassLoader::_jrt_entry;
+  } else {
+    // The java runtime image is always the first entry
+    // in the FileMapInfo::_classpath_entry_table. Even though
+    // the _jrt_entry is not included in the _first_append_entry
+    // linked list, it must be accounted for when comparing the
+    // class path vs. the shared archive class path.
+    ClassPathEntry* e = ClassLoader::_first_append_entry;
+    while (--n >= 1) {
+      assert(e != NULL, "Not that many classpath entries.");
+      e = e->next();
+    }
+    return e;
+  }
+}
+
+#if INCLUDE_CDS
+
+// Helper function used by CDS code to get the number of boot classpath
+// entries during shared classpath setup time.
+
+inline int ClassLoader::num_boot_classpath_entries() {
+  assert(DumpSharedSpaces, "Should only be called at CDS dump time");
+  assert(has_jrt_entry(), "must have a java runtime image");
+  int num_entries = 1; // count the runtime image
+  ClassPathEntry* e = ClassLoader::_first_append_entry;
+  while (e != NULL) {
+    num_entries ++;
+    e = e->next();
+  }
+  return num_entries;
+}
+
+inline ClassPathEntry* ClassLoader::get_next_boot_classpath_entry(ClassPathEntry* e) {
+  if (e == ClassLoader::_jrt_entry) {
+    return ClassLoader::_first_append_entry;
+  } else {
+    return e->next();
+  }
+}
+
+// Helper function used by CDS code to get the number of app classpath
+// entries during shared classpath setup time.
+inline int ClassLoader::num_app_classpath_entries() {
+  assert(DumpSharedSpaces, "Should only be called at CDS dump time");
+  int num_entries = 0;
+  ClassPathEntry* e= ClassLoader::_app_classpath_entries;
+  while (e != NULL) {
+    num_entries ++;
+    e = e->next();
+  }
+  return num_entries;
+}
+
+#endif // INCLUDE_CDS
+
+#endif // SHARE_VM_CLASSFILE_CLASSLOADER_INLINE_HPP
--- a/src/hotspot/share/classfile/classLoaderData.inline.hpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/classfile/classLoaderData.inline.hpp	Mon Mar 05 10:29:23 2018 -0500
@@ -22,6 +22,9 @@
  *
  */
 
+#ifndef SHARE_VM_CLASSFILE_CLASSLOADERDATA_INLINE_HPP
+#define SHARE_VM_CLASSFILE_CLASSLOADERDATA_INLINE_HPP
+
 #include "classfile/classLoaderData.hpp"
 #include "classfile/javaClasses.hpp"
 #include "oops/oop.inline.hpp"
@@ -76,3 +79,5 @@
   assert(count <= _num_array_classes, "Sanity");
   Atomic::sub(count, &_num_array_classes);
 }
+
+#endif // SHARE_VM_CLASSFILE_CLASSLOADERDATA_INLINE_HPP
--- a/src/hotspot/share/classfile/classLoaderExt.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/classfile/classLoaderExt.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -26,7 +26,7 @@
 #include "classfile/classFileParser.hpp"
 #include "classfile/classFileStream.hpp"
 #include "classfile/classListParser.hpp"
-#include "classfile/classLoader.hpp"
+#include "classfile/classLoader.inline.hpp"
 #include "classfile/classLoaderExt.hpp"
 #include "classfile/classLoaderData.inline.hpp"
 #include "classfile/klassFactory.hpp"
--- a/src/hotspot/share/classfile/dictionary.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/classfile/dictionary.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -25,7 +25,7 @@
 #include "precompiled.hpp"
 #include "classfile/classLoaderData.inline.hpp"
 #include "classfile/sharedClassUtil.hpp"
-#include "classfile/dictionary.hpp"
+#include "classfile/dictionary.inline.hpp"
 #include "classfile/protectionDomainCache.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/systemDictionaryShared.hpp"
--- a/src/hotspot/share/classfile/dictionary.hpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/classfile/dictionary.hpp	Mon Mar 05 10:29:23 2018 -0500
@@ -29,7 +29,6 @@
 #include "classfile/systemDictionary.hpp"
 #include "oops/instanceKlass.hpp"
 #include "oops/oop.hpp"
-#include "runtime/orderAccess.hpp"
 #include "utilities/hashtable.hpp"
 #include "utilities/ostream.hpp"
 
@@ -170,12 +169,8 @@
   ProtectionDomainEntry* pd_set() const            { return _pd_set; }
   void set_pd_set(ProtectionDomainEntry* new_head) {  _pd_set = new_head; }
 
-  ProtectionDomainEntry* pd_set_acquire() const    {
-    return OrderAccess::load_acquire(&_pd_set);
-  }
-  void release_set_pd_set(ProtectionDomainEntry* new_head) {
-    OrderAccess::release_store(&_pd_set, new_head);
-  }
+  ProtectionDomainEntry* pd_set_acquire() const;
+  void release_set_pd_set(ProtectionDomainEntry* new_head);
 
   // Tells whether the initiating class' protection domain can access the klass in this entry
   bool is_valid_protection_domain(Handle protection_domain) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/share/classfile/dictionary.inline.hpp	Mon Mar 05 10:29:23 2018 -0500
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2018, 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_VM_CLASSFILE_DICTIONARY_INLINE_HPP
+#define SHARE_VM_CLASSFILE_DICTIONARY_INLINE_HPP
+
+#include "classfile/dictionary.hpp"
+#include "runtime/orderAccess.inline.hpp"
+
+inline ProtectionDomainEntry* DictionaryEntry::pd_set_acquire() const {
+  return OrderAccess::load_acquire(&_pd_set);
+}
+
+inline void DictionaryEntry::release_set_pd_set(ProtectionDomainEntry* new_head) {
+  OrderAccess::release_store(&_pd_set, new_head);
+}
+
+#endif // SHARE_VM_CLASSFILE_DICTIONARY_INLINE_HPP
--- a/src/hotspot/share/classfile/javaClasses.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/classfile/javaClasses.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -43,7 +43,7 @@
 #include "oops/instanceKlass.hpp"
 #include "oops/instanceMirrorKlass.hpp"
 #include "oops/klass.hpp"
-#include "oops/method.hpp"
+#include "oops/method.inline.hpp"
 #include "oops/objArrayOop.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/symbol.hpp"
--- a/src/hotspot/share/classfile/systemDictionary.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/classfile/systemDictionary.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -56,6 +56,7 @@
 #include "oops/instanceKlass.hpp"
 #include "oops/instanceRefKlass.hpp"
 #include "oops/klass.inline.hpp"
+#include "oops/method.inline.hpp"
 #include "oops/methodData.hpp"
 #include "oops/objArrayKlass.hpp"
 #include "oops/objArrayOop.inline.hpp"
--- a/src/hotspot/share/classfile/verifier.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/classfile/verifier.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -38,6 +38,7 @@
 #include "logging/logStream.hpp"
 #include "memory/oopFactory.hpp"
 #include "memory/resourceArea.hpp"
+#include "oops/constantPool.inline.hpp"
 #include "oops/instanceKlass.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/typeArrayOop.hpp"
--- a/src/hotspot/share/code/codeCache.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/code/codeCache.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -36,7 +36,7 @@
 #include "memory/allocation.inline.hpp"
 #include "memory/iterator.hpp"
 #include "memory/resourceArea.hpp"
-#include "oops/method.hpp"
+#include "oops/method.inline.hpp"
 #include "oops/objArrayOop.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/verifyOopClosure.hpp"
--- a/src/hotspot/share/code/compiledIC.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/code/compiledIC.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -34,7 +34,7 @@
 #include "memory/metadataFactory.hpp"
 #include "memory/oopFactory.hpp"
 #include "memory/resourceArea.hpp"
-#include "oops/method.hpp"
+#include "oops/method.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/symbol.hpp"
 #include "runtime/icache.hpp"
--- a/src/hotspot/share/code/compiledMethod.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/code/compiledMethod.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -28,8 +28,9 @@
 #include "code/scopeDesc.hpp"
 #include "code/codeCache.hpp"
 #include "prims/methodHandles.hpp"
-#include "interpreter/bytecode.hpp"
+#include "interpreter/bytecode.inline.hpp"
 #include "memory/resourceArea.hpp"
+#include "oops/method.inline.hpp"
 #include "runtime/mutexLocker.hpp"
 
 CompiledMethod::CompiledMethod(Method* method, const char* name, CompilerType type, const CodeBlobLayout& layout, int frame_complete_offset, int frame_size, ImmutableOopMapSet* oop_maps, bool caller_must_gc_arguments)
--- a/src/hotspot/share/code/compiledMethod.hpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/code/compiledMethod.hpp	Mon Mar 05 10:29:23 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -54,9 +54,9 @@
   void    set_pc_at(int index, address a)      { assert(index >= 0 && index < cache_size,""); _pc[index] = a; }
   address handler_at(int index)                { assert(index >= 0 && index < count(),""); return _handler[index]; }
   void    set_handler_at(int index, address a) { assert(index >= 0 && index < cache_size,""); _handler[index] = a; }
-  int     count()                              { return OrderAccess::load_acquire(&_count); }
+  int     count();
   // increment_count is only called under lock, but there may be concurrent readers.
-  void    increment_count()                    { OrderAccess::release_store(&_count, _count + 1); }
+  void    increment_count();
 
  public:
 
@@ -290,7 +290,7 @@
   // Note: _exception_cache may be read concurrently. We rely on memory_order_consume here.
   ExceptionCache* exception_cache() const         { return _exception_cache; }
   void set_exception_cache(ExceptionCache *ec)    { _exception_cache = ec; }
-  void release_set_exception_cache(ExceptionCache *ec) { OrderAccess::release_store(&_exception_cache, ec); }
+  void release_set_exception_cache(ExceptionCache *ec);
   address handler_for_exception_and_pc(Handle exception, address pc);
   void add_handler_for_exception_and_pc(Handle exception, address pc, address handler);
   void clean_exception_cache(BoolObjectClosure* is_alive);
--- a/src/hotspot/share/code/compiledMethod.inline.hpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/code/compiledMethod.inline.hpp	Mon Mar 05 10:29:23 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -38,6 +38,9 @@
     ;
 }
 
+inline void CompiledMethod::release_set_exception_cache(ExceptionCache *ec) {
+  OrderAccess::release_store(&_exception_cache, ec);
+}
 
 // -----------------------------------------------------------------------------
 // CompiledMethod::get_deopt_original_pc
@@ -56,4 +59,13 @@
   return NULL;
 }
 
+
+// class ExceptionCache methods
+
+inline int ExceptionCache::count() { return OrderAccess::load_acquire(&_count); }
+
+// increment_count is only called under lock, but there may be concurrent readers.
+inline void ExceptionCache::increment_count() { OrderAccess::release_store(&_count, _count + 1); }
+
+
 #endif //SHARE_VM_CODE_COMPILEDMETHOD_INLINE_HPP
--- a/src/hotspot/share/code/nmethod.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/code/nmethod.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -40,6 +40,7 @@
 #include "logging/log.hpp"
 #include "logging/logStream.hpp"
 #include "memory/resourceArea.hpp"
+#include "oops/method.inline.hpp"
 #include "oops/methodData.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/jvmtiImpl.hpp"
--- a/src/hotspot/share/compiler/compileBroker.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/compiler/compileBroker.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -39,7 +39,7 @@
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/methodData.hpp"
-#include "oops/method.hpp"
+#include "oops/method.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/nativeLookup.hpp"
 #include "prims/whitebox.hpp"
--- a/src/hotspot/share/interpreter/bytecode.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/interpreter/bytecode.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -23,9 +23,10 @@
  */
 
 #include "precompiled.hpp"
-#include "interpreter/bytecode.hpp"
+#include "interpreter/bytecode.inline.hpp"
 #include "interpreter/linkResolver.hpp"
 #include "oops/constantPool.hpp"
+#include "oops/cpCache.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/fieldType.hpp"
 #include "runtime/handles.inline.hpp"
--- a/src/hotspot/share/interpreter/bytecode.hpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/interpreter/bytecode.hpp	Mon Mar 05 10:29:23 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -229,7 +229,7 @@
                                                           is_invokedynamic()   ||
                                                           is_invokehandle(); }
 
-  bool has_appendix()                            { return cpcache_entry()->has_appendix(); }
+  bool has_appendix();
 
   int size_of_parameters() const;
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/share/interpreter/bytecode.inline.hpp	Mon Mar 05 10:29:23 2018 -0500
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018, 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_VM_INTERPRETER_BYTECODE_INLINE_HPP
+#define SHARE_VM_INTERPRETER_BYTECODE_INLINE_HPP
+
+#include "interpreter/bytecode.hpp"
+#include "oops/cpCache.inline.hpp"
+
+inline bool Bytecode_invoke::has_appendix() { return cpcache_entry()->has_appendix(); }
+
+#endif // SHARE_VM_INTERPRETER_BYTECODE_INLINE_HPP
--- a/src/hotspot/share/interpreter/bytecodeInterpreter.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/interpreter/bytecodeInterpreter.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -33,6 +33,7 @@
 #include "interpreter/interpreterRuntime.hpp"
 #include "logging/log.hpp"
 #include "memory/resourceArea.hpp"
+#include "oops/method.inline.hpp"
 #include "oops/methodCounters.hpp"
 #include "oops/objArrayKlass.hpp"
 #include "oops/objArrayOop.inline.hpp"
--- a/src/hotspot/share/interpreter/bytecodeTracer.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/interpreter/bytecodeTracer.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -30,6 +30,7 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
 #include "memory/resourceArea.hpp"
+#include "oops/constantPool.inline.hpp"
 #include "oops/methodData.hpp"
 #include "oops/method.hpp"
 #include "runtime/mutexLocker.hpp"
--- a/src/hotspot/share/interpreter/interpreterRuntime.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/interpreter/interpreterRuntime.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -39,6 +39,7 @@
 #include "memory/resourceArea.hpp"
 #include "memory/universe.inline.hpp"
 #include "oops/constantPool.hpp"
+#include "oops/cpCache.inline.hpp"
 #include "oops/instanceKlass.hpp"
 #include "oops/methodData.hpp"
 #include "oops/objArrayKlass.hpp"
--- a/src/hotspot/share/interpreter/linkResolver.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/interpreter/linkResolver.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -39,6 +39,7 @@
 #include "logging/logStream.hpp"
 #include "memory/resourceArea.hpp"
 #include "memory/universe.inline.hpp"
+#include "oops/cpCache.inline.hpp"
 #include "oops/instanceKlass.hpp"
 #include "oops/method.hpp"
 #include "oops/objArrayKlass.hpp"
--- a/src/hotspot/share/jvmci/compilerRuntime.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/jvmci/compilerRuntime.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, 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,6 +26,7 @@
 #include "classfile/symbolTable.hpp"
 #include "interpreter/linkResolver.hpp"
 #include "jvmci/compilerRuntime.hpp"
+#include "oops/cpCache.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/compilationPolicy.hpp"
 #include "runtime/deoptimization.hpp"
--- a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -29,8 +29,10 @@
 #include "interpreter/linkResolver.hpp"
 #include "memory/oopFactory.hpp"
 #include "memory/resourceArea.hpp"
+#include "oops/cpCache.inline.hpp"
 #include "oops/generateOopMap.hpp"
 #include "oops/fieldStreams.hpp"
+#include "oops/method.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/objArrayOop.inline.hpp"
 #include "oops/typeArrayOop.inline.hpp"
--- a/src/hotspot/share/jvmci/jvmciEnv.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/jvmci/jvmciEnv.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, 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
@@ -38,6 +38,9 @@
 #include "memory/oopFactory.hpp"
 #include "memory/resourceArea.hpp"
 #include "memory/universe.inline.hpp"
+#include "oops/constantPool.inline.hpp"
+#include "oops/cpCache.inline.hpp"
+#include "oops/method.inline.hpp"
 #include "oops/methodData.hpp"
 #include "oops/objArrayKlass.hpp"
 #include "oops/oop.inline.hpp"
--- a/src/hotspot/share/memory/filemap.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/memory/filemap.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -24,7 +24,7 @@
 
 #include "precompiled.hpp"
 #include "jvm.h"
-#include "classfile/classLoader.hpp"
+#include "classfile/classLoader.inline.hpp"
 #include "classfile/compactHashtable.inline.hpp"
 #include "classfile/sharedClassUtil.hpp"
 #include "classfile/stringTable.hpp"
--- a/src/hotspot/share/oops/array.hpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/oops/array.hpp	Mon Mar 05 10:29:23 2018 -0500
@@ -27,7 +27,6 @@
 
 #include "memory/allocation.hpp"
 #include "memory/metaspace.hpp"
-#include "runtime/orderAccess.hpp"
 #include "utilities/align.hpp"
 
 // Array for metadata allocation
@@ -122,8 +121,8 @@
   T*   adr_at(const int i)             { assert(i >= 0 && i< _length, "oob: 0 <= %d < %d", i, _length); return &_data[i]; }
   int  find(const T& x)                { return index_of(x); }
 
-  T at_acquire(const int which)              { return OrderAccess::load_acquire(adr_at(which)); }
-  void release_at_put(int which, T contents) { OrderAccess::release_store(adr_at(which), contents); }
+  T at_acquire(const int which);
+  void release_at_put(int which, T contents);
 
   static int size(int length) {
     size_t bytes = align_up(byte_sizeof(length), BytesPerWord);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/share/oops/array.inline.hpp	Mon Mar 05 10:29:23 2018 -0500
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2018, 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_VM_OOPS_ARRAY_INLINE_HPP
+#define SHARE_VM_OOPS_ARRAY_INLINE_HPP
+
+#include "oops/array.hpp"
+#include "runtime/orderAccess.inline.hpp"
+
+template <typename T>
+inline T Array<T>::at_acquire(const int which) { return OrderAccess::load_acquire(adr_at(which)); }
+
+template <typename T>
+inline void Array<T>::release_at_put(int which, T contents) { OrderAccess::release_store(adr_at(which), contents); }
+
+#endif // SHARE_VM_OOPS_ARRAY_INLINE_HPP
--- a/src/hotspot/share/oops/constantPool.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/oops/constantPool.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -38,7 +38,9 @@
 #include "memory/metaspaceShared.hpp"
 #include "memory/oopFactory.hpp"
 #include "memory/resourceArea.hpp"
-#include "oops/constantPool.hpp"
+#include "oops/array.inline.hpp"
+#include "oops/constantPool.inline.hpp"
+#include "oops/cpCache.inline.hpp"
 #include "oops/instanceKlass.hpp"
 #include "oops/objArrayKlass.hpp"
 #include "oops/objArrayOop.inline.hpp"
@@ -51,6 +53,10 @@
 #include "runtime/vframe.hpp"
 #include "utilities/copy.hpp"
 
+constantTag ConstantPool::tag_at(int which) const { return (constantTag)tags()->at_acquire(which); }
+
+void ConstantPool::release_tag_at_put(int which, jbyte t) { tags()->release_at_put(which, t); }
+
 ConstantPool* ConstantPool::allocate(ClassLoaderData* loader_data, int length, TRAPS) {
   Array<u1>* tags = MetadataFactory::new_array<u1>(loader_data, length, 0, CHECK_NULL);
   int size = ConstantPool::size(length);
--- a/src/hotspot/share/oops/constantPool.hpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/oops/constantPool.hpp	Mon Mar 05 10:29:23 2018 -0500
@@ -131,7 +131,7 @@
 
   void set_tags(Array<u1>* tags)               { _tags = tags; }
   void tag_at_put(int which, jbyte t)          { tags()->at_put(which, t); }
-  void release_tag_at_put(int which, jbyte t)  { tags()->release_at_put(which, t); }
+  void release_tag_at_put(int which, jbyte t);
 
   u1* tag_addr_at(int which) const             { return tags()->adr_at(which); }
 
@@ -143,14 +143,7 @@
  private:
   intptr_t* base() const { return (intptr_t*) (((char*) this) + sizeof(ConstantPool)); }
 
-  CPSlot slot_at(int which) const {
-    assert(is_within_bounds(which), "index out of bounds");
-    assert(!tag_at(which).is_unresolved_klass() && !tag_at(which).is_unresolved_klass_in_error(), "Corrupted constant pool");
-    // Uses volatile because the klass slot changes without a lock.
-    intptr_t adr = OrderAccess::load_acquire(obj_at_addr(which));
-    assert(adr != 0 || which == 0, "cp entry for klass should not be zero");
-    return CPSlot(adr);
-  }
+  CPSlot slot_at(int which) const;
 
   void slot_at_put(int which, CPSlot s) const {
     assert(is_within_bounds(which), "index out of bounds");
@@ -380,7 +373,7 @@
 
   // Tag query
 
-  constantTag tag_at(int which) const { return (constantTag)tags()->at_acquire(which); }
+  constantTag tag_at(int which) const;
 
   // Fetching constants
 
@@ -409,16 +402,7 @@
     return klass_slot_at(which).name_index();
   }
 
-  Klass* resolved_klass_at(int which) const {  // Used by Compiler
-    guarantee(tag_at(which).is_klass(), "Corrupted constant pool");
-    // Must do an acquire here in case another thread resolved the klass
-    // behind our back, lest we later load stale values thru the oop.
-    CPKlassSlot kslot = klass_slot_at(which);
-    assert(tag_at(kslot.name_index()).is_symbol(), "sanity");
-
-    Klass** adr = resolved_klasses()->adr_at(kslot.resolved_klass_index());
-    return OrderAccess::load_acquire(adr);
-  }
+  Klass* resolved_klass_at(int which) const;  // Used by Compiler
 
   // RedefineClasses() API support:
   Symbol* klass_at_noresolve(int which) { return klass_name_at(which); }
@@ -475,23 +459,11 @@
   // Method oops internally created for method handles may also
   // use pseudo-strings to link themselves to related metaobjects.
 
-  bool is_pseudo_string_at(int which) {
-    assert(tag_at(which).is_string(), "Corrupted constant pool");
-    return slot_at(which).is_pseudo_string();
-  }
+  bool is_pseudo_string_at(int which);
 
-  oop pseudo_string_at(int which, int obj_index) {
-    assert(is_pseudo_string_at(which), "must be a pseudo-string");
-    oop s = resolved_references()->obj_at(obj_index);
-    return s;
-  }
+  oop pseudo_string_at(int which, int obj_index);
 
-  oop pseudo_string_at(int which) {
-    assert(is_pseudo_string_at(which), "must be a pseudo-string");
-    int obj_index = cp_to_object_index(which);
-    oop s = resolved_references()->obj_at(obj_index);
-    return s;
-  }
+  oop pseudo_string_at(int which);
 
   void pseudo_string_at_put(int which, int obj_index, oop x) {
     assert(tag_at(which).is_string(), "Corrupted constant pool");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/share/oops/constantPool.inline.hpp	Mon Mar 05 10:29:23 2018 -0500
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2018, 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_VM_OOPS_CONSTANTPOOL_INLINE_HPP
+#define SHARE_VM_OOPS_CONSTANTPOOL_INLINE_HPP
+
+#include "oops/constantPool.hpp"
+#include "runtime/orderAccess.inline.hpp"
+
+inline CPSlot ConstantPool::slot_at(int which) const {
+  assert(is_within_bounds(which), "index out of bounds");
+  assert(!tag_at(which).is_unresolved_klass() && !tag_at(which).is_unresolved_klass_in_error(), "Corrupted constant pool");
+  // Uses volatile because the klass slot changes without a lock.
+  intptr_t adr = OrderAccess::load_acquire(obj_at_addr(which));
+  assert(adr != 0 || which == 0, "cp entry for klass should not be zero");
+  return CPSlot(adr);
+}
+
+inline Klass* ConstantPool::resolved_klass_at(int which) const {  // Used by Compiler
+  guarantee(tag_at(which).is_klass(), "Corrupted constant pool");
+  // Must do an acquire here in case another thread resolved the klass
+  // behind our back, lest we later load stale values thru the oop.
+  CPKlassSlot kslot = klass_slot_at(which);
+  assert(tag_at(kslot.name_index()).is_symbol(), "sanity");
+
+  Klass** adr = resolved_klasses()->adr_at(kslot.resolved_klass_index());
+  return OrderAccess::load_acquire(adr);
+}
+
+inline bool ConstantPool::is_pseudo_string_at(int which) {
+  assert(tag_at(which).is_string(), "Corrupted constant pool");
+  return slot_at(which).is_pseudo_string();
+}
+
+inline oop ConstantPool::pseudo_string_at(int which, int obj_index) {
+  assert(is_pseudo_string_at(which), "must be a pseudo-string");
+  oop s = resolved_references()->obj_at(obj_index);
+  return s;
+}
+
+inline oop ConstantPool::pseudo_string_at(int which) {
+  assert(is_pseudo_string_at(which), "must be a pseudo-string");
+  int obj_index = cp_to_object_index(which);
+  oop s = resolved_references()->obj_at(obj_index);
+  return s;
+}
+
+#endif // SHARE_VM_OOPS_CONSTANTPOOL_INLINE_HPP
--- a/src/hotspot/share/oops/cpCache.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/oops/cpCache.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, 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
@@ -34,7 +34,8 @@
 #include "memory/resourceArea.hpp"
 #include "memory/universe.inline.hpp"
 #include "oops/access.inline.hpp"
-#include "oops/cpCache.hpp"
+#include "oops/constantPool.inline.hpp"
+#include "oops/cpCache.inline.hpp"
 #include "oops/objArrayOop.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/methodHandles.hpp"
--- a/src/hotspot/share/oops/cpCache.hpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/oops/cpCache.hpp	Mon Mar 05 10:29:23 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, 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,7 +29,6 @@
 #include "memory/allocation.hpp"
 #include "oops/array.hpp"
 #include "oops/oopHandle.hpp"
-#include "runtime/orderAccess.hpp"
 #include "utilities/align.hpp"
 #include "utilities/constantTag.hpp"
 
@@ -328,42 +327,36 @@
   }
 
   // Has this bytecode been resolved? Only valid for invokes and get/put field/static.
-  bool is_resolved(Bytecodes::Code code) const {
-    switch (bytecode_number(code)) {
-      case 1:  return (bytecode_1() == code);
-      case 2:  return (bytecode_2() == code);
-    }
-    return false;      // default: not resolved
-  }
+  bool is_resolved(Bytecodes::Code code) const;
 
   // Accessors
   int indices() const                            { return _indices; }
-  int indices_ord() const                        { return OrderAccess::load_acquire(&_indices); }
+  int indices_ord() const;
   int constant_pool_index() const                { return (indices() & cp_index_mask); }
-  Bytecodes::Code bytecode_1() const             { return Bytecodes::cast((indices_ord() >> bytecode_1_shift) & bytecode_1_mask); }
-  Bytecodes::Code bytecode_2() const             { return Bytecodes::cast((indices_ord() >> bytecode_2_shift) & bytecode_2_mask); }
-  Metadata* f1_ord() const                       { return (Metadata *)OrderAccess::load_acquire(&_f1); }
-  Method*   f1_as_method() const                 { Metadata* f1 = f1_ord(); assert(f1 == NULL || f1->is_method(), ""); return (Method*)f1; }
-  Klass*    f1_as_klass() const                  { Metadata* f1 = f1_ord(); assert(f1 == NULL || f1->is_klass(), ""); return (Klass*)f1; }
+  Bytecodes::Code bytecode_1() const;
+  Bytecodes::Code bytecode_2() const;
+  Metadata* f1_ord() const;
+  Method*   f1_as_method() const;
+  Klass*    f1_as_klass() const;
   // Use the accessor f1() to acquire _f1's value. This is needed for
   // example in BytecodeInterpreter::run(), where is_f1_null() is
   // called to check if an invokedynamic call is resolved. This load
   // of _f1 must be ordered with the loads performed by
   // cache->main_entry_index().
-  bool      is_f1_null() const                   { Metadata* f1 = f1_ord(); return f1 == NULL; }  // classifies a CPC entry as unbound
+  bool      is_f1_null() const;  // classifies a CPC entry as unbound
   int       f2_as_index() const                  { assert(!is_vfinal(), ""); return (int) _f2; }
   Method*   f2_as_vfinal_method() const          { assert(is_vfinal(), ""); return (Method*)_f2; }
-  Method*   f2_as_interface_method() const       { assert(bytecode_1() == Bytecodes::_invokeinterface, ""); return (Method*)_f2; }
-  intx flags_ord() const                         { return (intx)OrderAccess::load_acquire(&_flags); }
+  Method*   f2_as_interface_method() const;
+  intx flags_ord() const;
   int  field_index() const                       { assert(is_field_entry(),  ""); return (_flags & field_index_mask); }
   int  parameter_size() const                    { assert(is_method_entry(), ""); return (_flags & parameter_size_mask); }
   bool is_volatile() const                       { return (_flags & (1 << is_volatile_shift))       != 0; }
   bool is_final() const                          { return (_flags & (1 << is_final_shift))          != 0; }
   bool is_forced_virtual() const                 { return (_flags & (1 << is_forced_virtual_shift)) != 0; }
   bool is_vfinal() const                         { return (_flags & (1 << is_vfinal_shift))         != 0; }
-  bool indy_resolution_failed() const            { intx flags = flags_ord(); return (flags & (1 << indy_resolution_failed_shift)) != 0; }
-  bool has_appendix() const                      { return (!is_f1_null()) && (_flags & (1 << has_appendix_shift))      != 0; }
-  bool has_method_type() const                   { return (!is_f1_null()) && (_flags & (1 << has_method_type_shift))   != 0; }
+  bool indy_resolution_failed() const;
+  bool has_appendix() const;
+  bool has_method_type() const;
   bool is_method_entry() const                   { return (_flags & (1 << is_field_entry_shift))    == 0; }
   bool is_field_entry() const                    { return (_flags & (1 << is_field_entry_shift))    != 0; }
   bool is_long() const                           { return flag_state() == ltos; }
@@ -440,16 +433,7 @@
   ConstantPoolCache(int length,
                     const intStack& inverse_index_map,
                     const intStack& invokedynamic_inverse_index_map,
-                    const intStack& invokedynamic_references_map) :
-                          _length(length),
-                          _constant_pool(NULL) {
-    CDS_JAVA_HEAP_ONLY(_archived_references = 0;)
-    initialize(inverse_index_map, invokedynamic_inverse_index_map,
-               invokedynamic_references_map);
-    for (int i = 0; i < length; i++) {
-      assert(entry_at(i)->is_f1_null(), "Failed to clear?");
-    }
-  }
+                    const intStack& invokedynamic_references_map);
 
   // Initialization
   void initialize(const intArray& inverse_index_map,
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/share/oops/cpCache.inline.hpp	Mon Mar 05 10:29:23 2018 -0500
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2018, 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_VM_OOPS_CPCACHEOOP_INLINE_HPP
+#define SHARE_VM_OOPS_CPCACHEOOP_INLINE_HPP
+
+#include "oops/cpCache.hpp"
+#include "runtime/orderAccess.inline.hpp"
+
+inline int ConstantPoolCacheEntry::indices_ord() const { return OrderAccess::load_acquire(&_indices); }
+
+inline Bytecodes::Code ConstantPoolCacheEntry::bytecode_1() const {
+  return Bytecodes::cast((indices_ord() >> bytecode_1_shift) & bytecode_1_mask);
+}
+
+inline Bytecodes::Code ConstantPoolCacheEntry::bytecode_2() const {
+  return Bytecodes::cast((indices_ord() >> bytecode_2_shift) & bytecode_2_mask);
+}
+
+// Has this bytecode been resolved? Only valid for invokes and get/put field/static.
+inline bool ConstantPoolCacheEntry::is_resolved(Bytecodes::Code code) const {
+  switch (bytecode_number(code)) {
+    case 1:  return (bytecode_1() == code);
+    case 2:  return (bytecode_2() == code);
+  }
+  return false;      // default: not resolved
+}
+
+inline Method* ConstantPoolCacheEntry::f2_as_interface_method() const {
+  assert(bytecode_1() == Bytecodes::_invokeinterface, "");
+  return (Method*)_f2;
+}
+
+inline Metadata* ConstantPoolCacheEntry::f1_ord() const { return (Metadata *)OrderAccess::load_acquire(&_f1); }
+
+inline Method* ConstantPoolCacheEntry::f1_as_method() const {
+  Metadata* f1 = f1_ord(); assert(f1 == NULL || f1->is_method(), "");
+  return (Method*)f1;
+}
+
+inline Klass* ConstantPoolCacheEntry::f1_as_klass() const {
+  Metadata* f1 = f1_ord(); assert(f1 == NULL || f1->is_klass(), "");
+  return (Klass*)f1;
+}
+
+inline bool ConstantPoolCacheEntry::is_f1_null() const { Metadata* f1 = f1_ord(); return f1 == NULL; }
+
+inline bool ConstantPoolCacheEntry::has_appendix() const {
+  return (!is_f1_null()) && (_flags & (1 << has_appendix_shift)) != 0;
+}
+
+inline bool ConstantPoolCacheEntry::has_method_type() const {
+  return (!is_f1_null()) && (_flags & (1 << has_method_type_shift)) != 0;
+}
+
+inline intx ConstantPoolCacheEntry::flags_ord() const   { return (intx)OrderAccess::load_acquire(&_flags); }
+
+inline bool ConstantPoolCacheEntry::indy_resolution_failed() const {
+  intx flags = flags_ord();
+  return (flags & (1 << indy_resolution_failed_shift)) != 0;
+}
+
+// Constructor
+inline ConstantPoolCache::ConstantPoolCache(int length,
+                                            const intStack& inverse_index_map,
+                                            const intStack& invokedynamic_inverse_index_map,
+                                            const intStack& invokedynamic_references_map) :
+                                                  _length(length),
+                                                  _constant_pool(NULL) {
+  CDS_JAVA_HEAP_ONLY(_archived_references = 0;)
+  initialize(inverse_index_map, invokedynamic_inverse_index_map,
+             invokedynamic_references_map);
+  for (int i = 0; i < length; i++) {
+    assert(entry_at(i)->is_f1_null(), "Failed to clear?");
+  }
+}
+
+#endif // SHARE_VM_OOPS_CPCACHEOOP_INLINE_HPP
--- a/src/hotspot/share/oops/method.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/oops/method.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -42,7 +42,7 @@
 #include "memory/oopFactory.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/constMethod.hpp"
-#include "oops/method.hpp"
+#include "oops/method.inline.hpp"
 #include "oops/methodData.hpp"
 #include "oops/objArrayOop.inline.hpp"
 #include "oops/oop.inline.hpp"
--- a/src/hotspot/share/oops/method.hpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/oops/method.hpp	Mon Mar 05 10:29:23 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -136,9 +136,9 @@
 
 
   static address make_adapters(const methodHandle& mh, TRAPS);
-  address from_compiled_entry() const   { return OrderAccess::load_acquire(&_from_compiled_entry); }
+  address from_compiled_entry() const;
   address from_compiled_entry_no_trampoline() const;
-  address from_interpreted_entry() const{ return OrderAccess::load_acquire(&_from_interpreted_entry); }
+  address from_interpreted_entry() const;
 
   // access flag
   AccessFlags access_flags() const               { return _access_flags;  }
@@ -333,12 +333,7 @@
     return _method_data;
   }
 
-  void set_method_data(MethodData* data)       {
-    // The store into method must be released. On platforms without
-    // total store order (TSO) the reference may become visible before
-    // the initialization of data otherwise.
-    OrderAccess::release_store(&_method_data, data);
-  }
+  void set_method_data(MethodData* data);
 
   MethodCounters* method_counters() const {
     return _method_counters;
@@ -449,7 +444,7 @@
   // nmethod/verified compiler entry
   address verified_code_entry();
   bool check_code() const;      // Not inline to avoid circular ref
-  CompiledMethod* volatile code() const                 { assert( check_code(), "" ); return OrderAccess::load_acquire(&_code); }
+  CompiledMethod* volatile code() const;
   void clear_code(bool acquire_lock = true);    // Clear out any compiled code
   static void set_code(const methodHandle& mh, CompiledMethod* code);
   void set_adapter_entry(AdapterHandlerEntry* adapter) {
@@ -662,7 +657,7 @@
   // compiled code support
   // NOTE: code() is inherently racy as deopt can be clearing code
   // simultaneously. Use with caution.
-  bool has_compiled_code() const                 { return code() != NULL; }
+  bool has_compiled_code() const;
 
 #ifdef TIERED
   bool has_aot_code() const                      { return aot_code() != NULL; }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/share/oops/method.inline.hpp	Mon Mar 05 10:29:23 2018 -0500
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2018, 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_VM_OOPS_METHOD_INLINE_HPP
+#define SHARE_VM_OOPS_METHOD_INLINE_HPP
+
+#include "oops/method.hpp"
+#include "runtime/orderAccess.hpp"
+
+inline address Method::from_compiled_entry() const {
+  return OrderAccess::load_acquire(&_from_compiled_entry);
+}
+
+inline address Method::from_interpreted_entry() const {
+  return OrderAccess::load_acquire(&_from_interpreted_entry);
+}
+
+inline void Method::set_method_data(MethodData* data) {
+  // The store into method must be released. On platforms without
+  // total store order (TSO) the reference may become visible before
+  // the initialization of data otherwise.
+  OrderAccess::release_store(&_method_data, data);
+}
+
+inline CompiledMethod* volatile Method::code() const {
+  assert( check_code(), "" );
+  return OrderAccess::load_acquire(&_code);
+}
+
+inline bool Method::has_compiled_code() const { return code() != NULL; }
+
+#endif // SHARE_VM_OOPS_METHOD_INLINE_HPP
--- a/src/hotspot/share/oops/methodData.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/oops/methodData.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, 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
@@ -31,7 +31,7 @@
 #include "memory/heapInspection.hpp"
 #include "memory/metaspaceClosure.hpp"
 #include "memory/resourceArea.hpp"
-#include "oops/methodData.hpp"
+#include "oops/methodData.inline.hpp"
 #include "prims/jvmtiRedefineClasses.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/compilationPolicy.hpp"
--- a/src/hotspot/share/oops/methodData.hpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/oops/methodData.hpp	Mon Mar 05 10:29:23 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, 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,7 +29,6 @@
 #include "memory/universe.hpp"
 #include "oops/method.hpp"
 #include "oops/oop.hpp"
-#include "runtime/orderAccess.hpp"
 #include "utilities/align.hpp"
 #if INCLUDE_JVMCI
 #include "jvmci/jvmci_globals.hpp"
@@ -201,9 +200,7 @@
   void set_cell_at(int index, intptr_t value) {
     _cells[index] = value;
   }
-  void release_set_cell_at(int index, intptr_t value) {
-    OrderAccess::release_store(&_cells[index], value);
-  }
+  void release_set_cell_at(int index, intptr_t value);
   intptr_t cell_at(int index) const {
     return _cells[index];
   }
@@ -325,10 +322,7 @@
     assert(0 <= index && index < cell_count(), "oob");
     data()->set_cell_at(index, value);
   }
-  void release_set_intptr_at(int index, intptr_t value) {
-    assert(0 <= index && index < cell_count(), "oob");
-    data()->release_set_cell_at(index, value);
-  }
+  void release_set_intptr_at(int index, intptr_t value);
   intptr_t intptr_at(int index) const {
     assert(0 <= index && index < cell_count(), "oob");
     return data()->cell_at(index);
@@ -336,18 +330,14 @@
   void set_uint_at(int index, uint value) {
     set_intptr_at(index, (intptr_t) value);
   }
-  void release_set_uint_at(int index, uint value) {
-    release_set_intptr_at(index, (intptr_t) value);
-  }
+  void release_set_uint_at(int index, uint value);
   uint uint_at(int index) const {
     return (uint)intptr_at(index);
   }
   void set_int_at(int index, int value) {
     set_intptr_at(index, (intptr_t) value);
   }
-  void release_set_int_at(int index, int value) {
-    release_set_intptr_at(index, (intptr_t) value);
-  }
+  void release_set_int_at(int index, int value);
   int int_at(int index) const {
     return (int)intptr_at(index);
   }
@@ -1603,12 +1593,7 @@
     assert((uint)row < row_limit(), "oob");
     set_int_at(bci0_offset + row * ret_row_cell_count, bci);
   }
-  void release_set_bci(uint row, int bci) {
-    assert((uint)row < row_limit(), "oob");
-    // 'release' when setting the bci acts as a valid flag for other
-    // threads wrt bci_count and bci_displacement.
-    release_set_int_at(bci0_offset + row * ret_row_cell_count, bci);
-  }
+  void release_set_bci(uint row, int bci);
   void set_bci_count(uint row, uint count) {
     assert((uint)row < row_limit(), "oob");
     set_uint_at(count0_offset + row * ret_row_cell_count, count);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/share/oops/methodData.inline.hpp	Mon Mar 05 10:29:23 2018 -0500
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2018, 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_VM_OOPS_METHODDATA_INLINE_HPP
+#define SHARE_VM_OOPS_METHODDATA_INLINE_HPP
+
+#include "oops/methodData.hpp"
+#include "runtime/orderAccess.inline.hpp"
+
+inline void DataLayout::release_set_cell_at(int index, intptr_t value) {
+  OrderAccess::release_store(&_cells[index], value);
+}
+
+inline void ProfileData::release_set_intptr_at(int index, intptr_t value) {
+  assert(0 <= index && index < cell_count(), "oob");
+  data()->release_set_cell_at(index, value);
+}
+
+inline void ProfileData::release_set_uint_at(int index, uint value) {
+  release_set_intptr_at(index, (intptr_t) value);
+}
+
+inline void ProfileData::release_set_int_at(int index, int value) {
+  release_set_intptr_at(index, (intptr_t) value);
+}
+
+inline void RetData::release_set_bci(uint row, int bci) {
+  assert((uint)row < row_limit(), "oob");
+  // 'release' when setting the bci acts as a valid flag for other
+  // threads wrt bci_count and bci_displacement.
+  release_set_int_at(bci0_offset + row * ret_row_cell_count, bci);
+}
+
+#endif // SHARE_VM_OOPS_METHODDATA_INLINE_HPP
--- a/src/hotspot/share/prims/jvmtiTagMap.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/prims/jvmtiTagMap.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -32,6 +32,7 @@
 #include "memory/resourceArea.hpp"
 #include "oops/access.inline.hpp"
 #include "oops/arrayOop.inline.hpp"
+#include "oops/constantPool.inline.hpp"
 #include "oops/instanceMirrorKlass.hpp"
 #include "oops/objArrayKlass.hpp"
 #include "oops/objArrayOop.inline.hpp"
--- a/src/hotspot/share/prims/methodComparator.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/prims/methodComparator.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, 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
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "oops/constantPool.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/symbol.hpp"
 #include "prims/methodComparator.hpp"
--- a/src/hotspot/share/prims/whitebox.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/prims/whitebox.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -40,7 +40,8 @@
 #include "memory/universe.hpp"
 #include "memory/oopFactory.hpp"
 #include "oops/array.hpp"
-#include "oops/constantPool.hpp"
+#include "oops/constantPool.inline.hpp"
+#include "oops/method.inline.hpp"
 #include "oops/objArrayKlass.hpp"
 #include "oops/objArrayOop.inline.hpp"
 #include "oops/oop.inline.hpp"
--- a/src/hotspot/share/runtime/compilationPolicy.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/runtime/compilationPolicy.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -30,7 +30,7 @@
 #include "interpreter/interpreter.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/methodData.hpp"
-#include "oops/method.hpp"
+#include "oops/method.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/nativeLookup.hpp"
 #include "runtime/advancedThresholdPolicy.hpp"
--- a/src/hotspot/share/runtime/javaCalls.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/runtime/javaCalls.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -30,6 +30,7 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/linkResolver.hpp"
 #include "memory/universe.inline.hpp"
+#include "oops/method.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/jniCheck.hpp"
 #include "runtime/compilationPolicy.hpp"
--- a/src/hotspot/share/runtime/rframe.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/runtime/rframe.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "code/codeCache.hpp"
 #include "interpreter/interpreter.hpp"
+#include "oops/method.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/symbol.hpp"
 #include "runtime/frame.inline.hpp"
--- a/src/hotspot/share/runtime/sharedRuntime.cpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/runtime/sharedRuntime.cpp	Mon Mar 05 10:29:23 2018 -0500
@@ -43,6 +43,7 @@
 #include "memory/resourceArea.hpp"
 #include "memory/universe.inline.hpp"
 #include "oops/klass.hpp"
+#include "oops/method.inline.hpp"
 #include "oops/objArrayKlass.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/forte.hpp"
--- a/src/hotspot/share/runtime/simpleThresholdPolicy.hpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/runtime/simpleThresholdPolicy.hpp	Mon Mar 05 10:29:23 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, 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
@@ -82,13 +82,7 @@
   template<CompLevel level> static inline bool loop_predicate_helper(int i, int b, double scale, Method* method);
 
   // Get a compilation level for a given method.
-  static CompLevel comp_level(Method* method) {
-    CompiledMethod *nm = method->code();
-    if (nm != NULL && nm->is_in_use()) {
-      return (CompLevel)nm->comp_level();
-    }
-    return CompLevel_none;
-  }
+  static CompLevel comp_level(Method* method);
   virtual void method_invocation_event(const methodHandle& method, const methodHandle& inlinee,
                                        CompLevel level, CompiledMethod* nm, JavaThread* thread);
   virtual void method_back_branch_event(const methodHandle& method, const methodHandle& inlinee,
--- a/src/hotspot/share/runtime/simpleThresholdPolicy.inline.hpp	Mon Mar 05 13:15:10 2018 +0100
+++ b/src/hotspot/share/runtime/simpleThresholdPolicy.inline.hpp	Mon Mar 05 10:29:23 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, 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,6 +26,7 @@
 #define SHARE_VM_RUNTIME_SIMPLETHRESHOLDPOLICY_INLINE_HPP
 
 #include "compiler/compilerOracle.hpp"
+#include "oops/method.inline.hpp"
 
 #ifdef TIERED
 
@@ -94,6 +95,14 @@
   return false;
 }
 
+inline CompLevel SimpleThresholdPolicy::comp_level(Method* method) {
+  CompiledMethod *nm = method->code();
+  if (nm != NULL && nm->is_in_use()) {
+    return (CompLevel)nm->comp_level();
+  }
+  return CompLevel_none;
+}
+
 #endif // TIERED
 
 #endif // SHARE_VM_RUNTIME_SIMPLETHRESHOLDPOLICY_INLINE_HPP