8199809: Don't include frame.inline.hpp and other.inline.hpp from .hpp files
authorcoleenp
Wed, 21 Mar 2018 19:45:24 -0400
changeset 49480 d7df2dd501ce
parent 49479 5865398439d4
child 49481 8d02d496e785
8199809: Don't include frame.inline.hpp and other.inline.hpp from .hpp files Summary: Remove frame.inline.hpp,etc from header files and adjust transitive includes. Reviewed-by: stefank, stuefe
src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp
src/hotspot/cpu/aarch64/frame_aarch64.hpp
src/hotspot/cpu/aarch64/frame_aarch64.inline.hpp
src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp
src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp
src/hotspot/cpu/aarch64/interpreterRT_aarch64.hpp
src/hotspot/cpu/aarch64/jvmciCodeInstaller_aarch64.cpp
src/hotspot/cpu/aarch64/methodHandles_aarch64.cpp
src/hotspot/cpu/aarch64/templateTable_aarch64.cpp
src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp
src/hotspot/cpu/arm/frame_arm.hpp
src/hotspot/cpu/arm/frame_arm.inline.hpp
src/hotspot/cpu/arm/interp_masm_arm.cpp
src/hotspot/cpu/arm/interpreterRT_arm.cpp
src/hotspot/cpu/arm/interpreterRT_arm.hpp
src/hotspot/cpu/arm/jvmciCodeInstaller_arm.cpp
src/hotspot/cpu/arm/methodHandles_arm.cpp
src/hotspot/cpu/arm/templateTable_arm.cpp
src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp
src/hotspot/cpu/ppc/frame_ppc.hpp
src/hotspot/cpu/ppc/frame_ppc.inline.hpp
src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp
src/hotspot/cpu/ppc/interpreterRT_ppc.cpp
src/hotspot/cpu/ppc/interpreterRT_ppc.hpp
src/hotspot/cpu/ppc/jvmciCodeInstaller_ppc.cpp
src/hotspot/cpu/ppc/methodHandles_ppc.cpp
src/hotspot/cpu/ppc/templateTable_ppc_64.cpp
src/hotspot/cpu/s390/c1_LIRAssembler_s390.cpp
src/hotspot/cpu/s390/frame_s390.hpp
src/hotspot/cpu/s390/frame_s390.inline.hpp
src/hotspot/cpu/s390/interp_masm_s390.cpp
src/hotspot/cpu/s390/interpreterRT_s390.cpp
src/hotspot/cpu/s390/interpreterRT_s390.hpp
src/hotspot/cpu/s390/jvmciCodeInstaller_s390.cpp
src/hotspot/cpu/s390/methodHandles_s390.cpp
src/hotspot/cpu/s390/templateTable_s390.cpp
src/hotspot/cpu/sparc/c1_LIRAssembler_sparc.cpp
src/hotspot/cpu/sparc/frame_sparc.hpp
src/hotspot/cpu/sparc/frame_sparc.inline.hpp
src/hotspot/cpu/sparc/interp_masm_sparc.cpp
src/hotspot/cpu/sparc/interpreterRT_sparc.cpp
src/hotspot/cpu/sparc/interpreterRT_sparc.hpp
src/hotspot/cpu/sparc/jvmciCodeInstaller_sparc.cpp
src/hotspot/cpu/sparc/methodHandles_sparc.cpp
src/hotspot/cpu/sparc/templateTable_sparc.cpp
src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp
src/hotspot/cpu/x86/frame_x86.hpp
src/hotspot/cpu/x86/frame_x86.inline.hpp
src/hotspot/cpu/x86/interp_masm_x86.cpp
src/hotspot/cpu/x86/interpreterRT_x86.hpp
src/hotspot/cpu/x86/interpreterRT_x86_32.cpp
src/hotspot/cpu/x86/interpreterRT_x86_64.cpp
src/hotspot/cpu/x86/jvmciCodeInstaller_x86.cpp
src/hotspot/cpu/x86/methodHandles_x86.cpp
src/hotspot/cpu/x86/templateTable_x86.cpp
src/hotspot/cpu/zero/frame_zero.hpp
src/hotspot/cpu/zero/frame_zero.inline.hpp
src/hotspot/cpu/zero/interpreterRT_zero.hpp
src/hotspot/cpu/zero/methodHandles_zero.cpp
src/hotspot/cpu/zero/stack_zero.cpp
src/hotspot/os_cpu/aix_ppc/thread_aix_ppc.cpp
src/hotspot/os_cpu/aix_ppc/thread_aix_ppc.hpp
src/hotspot/os_cpu/bsd_x86/thread_bsd_x86.cpp
src/hotspot/os_cpu/bsd_x86/thread_bsd_x86.hpp
src/hotspot/os_cpu/bsd_zero/thread_bsd_zero.cpp
src/hotspot/os_cpu/bsd_zero/thread_bsd_zero.hpp
src/hotspot/os_cpu/linux_aarch64/thread_linux_aarch64.cpp
src/hotspot/os_cpu/linux_aarch64/thread_linux_aarch64.hpp
src/hotspot/os_cpu/linux_arm/thread_linux_arm.cpp
src/hotspot/os_cpu/linux_arm/thread_linux_arm.hpp
src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.cpp
src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.hpp
src/hotspot/os_cpu/linux_s390/thread_linux_s390.cpp
src/hotspot/os_cpu/linux_s390/thread_linux_s390.hpp
src/hotspot/os_cpu/linux_sparc/thread_linux_sparc.cpp
src/hotspot/os_cpu/linux_sparc/thread_linux_sparc.hpp
src/hotspot/os_cpu/linux_x86/thread_linux_x86.cpp
src/hotspot/os_cpu/linux_x86/thread_linux_x86.hpp
src/hotspot/os_cpu/linux_zero/thread_linux_zero.cpp
src/hotspot/os_cpu/linux_zero/thread_linux_zero.hpp
src/hotspot/os_cpu/solaris_sparc/thread_solaris_sparc.cpp
src/hotspot/os_cpu/solaris_sparc/thread_solaris_sparc.hpp
src/hotspot/os_cpu/solaris_x86/thread_solaris_x86.cpp
src/hotspot/os_cpu/solaris_x86/thread_solaris_x86.hpp
src/hotspot/os_cpu/windows_x86/thread_windows_x86.cpp
src/hotspot/os_cpu/windows_x86/thread_windows_x86.hpp
src/hotspot/share/aot/aotCompiledMethod.cpp
src/hotspot/share/aot/aotCompiledMethod.hpp
src/hotspot/share/c1/c1_FrameMap.hpp
src/hotspot/share/c1/c1_Runtime1.cpp
src/hotspot/share/ci/ciEnv.hpp
src/hotspot/share/classfile/classFileParser.cpp
src/hotspot/share/classfile/classFileParser.hpp
src/hotspot/share/classfile/classListParser.cpp
src/hotspot/share/classfile/javaClasses.cpp
src/hotspot/share/classfile/klassFactory.cpp
src/hotspot/share/classfile/sharedClassUtil.cpp
src/hotspot/share/classfile/systemDictionary.hpp
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/code/nmethod.hpp
src/hotspot/share/compiler/compileBroker.cpp
src/hotspot/share/compiler/compileTask.cpp
src/hotspot/share/compiler/directivesParser.cpp
src/hotspot/share/compiler/methodMatcher.hpp
src/hotspot/share/interpreter/abstractInterpreter.hpp
src/hotspot/share/interpreter/bytecodeStream.cpp
src/hotspot/share/interpreter/bytecodeStream.hpp
src/hotspot/share/interpreter/interpreterRuntime.cpp
src/hotspot/share/interpreter/interpreterRuntime.hpp
src/hotspot/share/interpreter/rewriter.cpp
src/hotspot/share/interpreter/rewriter.hpp
src/hotspot/share/interpreter/templateInterpreterGenerator.cpp
src/hotspot/share/jvmci/compilerRuntime.cpp
src/hotspot/share/jvmci/jvmciCompiler.cpp
src/hotspot/share/jvmci/jvmciCompilerToVM.cpp
src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp
src/hotspot/share/jvmci/jvmciEnv.cpp
src/hotspot/share/jvmci/jvmciRuntime.cpp
src/hotspot/share/memory/metaspaceShared.cpp
src/hotspot/share/memory/metaspaceShared.hpp
src/hotspot/share/oops/annotations.hpp
src/hotspot/share/oops/constantPool.cpp
src/hotspot/share/oops/method.inline.hpp
src/hotspot/share/oops/methodData.hpp
src/hotspot/share/oops/typeArrayOop.hpp
src/hotspot/share/opto/callnode.cpp
src/hotspot/share/opto/compile.hpp
src/hotspot/share/opto/graphKit.cpp
src/hotspot/share/opto/lcm.cpp
src/hotspot/share/opto/output.cpp
src/hotspot/share/opto/runtime.cpp
src/hotspot/share/prims/forte.cpp
src/hotspot/share/prims/jvm.cpp
src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp
src/hotspot/share/prims/jvmtiEnv.cpp
src/hotspot/share/prims/jvmtiEnvBase.cpp
src/hotspot/share/prims/jvmtiEnvBase.hpp
src/hotspot/share/prims/jvmtiExport.cpp
src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
src/hotspot/share/prims/jvmtiImpl.cpp
src/hotspot/share/prims/jvmtiRedefineClasses.cpp
src/hotspot/share/prims/jvmtiTagMap.cpp
src/hotspot/share/prims/methodHandles.hpp
src/hotspot/share/prims/privilegedStack.cpp
src/hotspot/share/prims/stackwalk.cpp
src/hotspot/share/prims/stackwalk.hpp
src/hotspot/share/prims/whitebox.cpp
src/hotspot/share/runtime/advancedThresholdPolicy.cpp
src/hotspot/share/runtime/deoptimization.cpp
src/hotspot/share/runtime/deoptimization.hpp
src/hotspot/share/runtime/frame.hpp
src/hotspot/share/runtime/frame.inline.hpp
src/hotspot/share/runtime/interfaceSupport.cpp
src/hotspot/share/runtime/javaFrameAnchor.hpp
src/hotspot/share/runtime/reflection.cpp
src/hotspot/share/runtime/rframe.hpp
src/hotspot/share/runtime/sharedRuntime.cpp
src/hotspot/share/runtime/simpleThresholdPolicy.cpp
src/hotspot/share/runtime/sweeper.cpp
src/hotspot/share/runtime/synchronizer.cpp
src/hotspot/share/runtime/thread.cpp
src/hotspot/share/runtime/thread.inline.hpp
src/hotspot/share/runtime/vframe.cpp
src/hotspot/share/runtime/vframe.hpp
src/hotspot/share/runtime/vframe.inline.hpp
src/hotspot/share/runtime/vframeArray.cpp
src/hotspot/share/runtime/vframeArray.hpp
src/hotspot/share/runtime/vframe_hp.cpp
src/hotspot/share/runtime/vm_operations.cpp
src/hotspot/share/services/diagnosticCommand.cpp
src/hotspot/share/services/heapDumper.cpp
src/hotspot/share/services/memTracker.cpp
src/hotspot/share/services/threadService.cpp
src/hotspot/share/services/threadService.hpp
src/hotspot/share/utilities/debug.cpp
src/hotspot/share/utilities/exceptions.cpp
--- a/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -38,6 +38,7 @@
 #include "gc/shared/collectedHeap.hpp"
 #include "nativeInst_aarch64.hpp"
 #include "oops/objArrayKlass.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "vmreg_aarch64.inline.hpp"
 
--- a/src/hotspot/cpu/aarch64/frame_aarch64.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/aarch64/frame_aarch64.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -158,4 +158,6 @@
   // deoptimization support
   void interpreter_frame_set_last_sp(intptr_t* sp);
 
+  static jint interpreter_frame_expression_stack_direction() { return -1; }
+
 #endif // CPU_AARCH64_VM_FRAME_AARCH64_HPP
--- a/src/hotspot/cpu/aarch64/frame_aarch64.inline.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/aarch64/frame_aarch64.inline.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -227,9 +227,6 @@
 }
 
 
-inline jint frame::interpreter_frame_expression_stack_direction() { return -1; }
-
-
 // Entry frames
 
 inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
--- a/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -36,6 +36,7 @@
 #include "prims/jvmtiThreadState.hpp"
 #include "runtime/basicLock.hpp"
 #include "runtime/biasedLocking.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/safepointMechanism.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/thread.inline.hpp"
--- a/src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -24,6 +24,7 @@
  */
 
 #include "precompiled.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
 #include "memory/allocation.inline.hpp"
@@ -42,6 +43,14 @@
 Register InterpreterRuntime::SignatureHandlerGenerator::to()   { return sp; }
 Register InterpreterRuntime::SignatureHandlerGenerator::temp() { return rscratch1; }
 
+InterpreterRuntime::SignatureHandlerGenerator::SignatureHandlerGenerator(
+      const methodHandle& method, CodeBuffer* buffer) : NativeSignatureIterator(method) {
+  _masm = new MacroAssembler(buffer);
+  _num_int_args = (method->is_static() ? 1 : 0);
+  _num_fp_args = 0;
+  _stack_offset = 0;
+}
+
 void InterpreterRuntime::SignatureHandlerGenerator::pass_int() {
   const Address src(from(), Interpreter::local_offset_in_bytes(offset()));
 
--- a/src/hotspot/cpu/aarch64/interpreterRT_aarch64.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/aarch64/interpreterRT_aarch64.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -26,8 +26,8 @@
 #ifndef CPU_AARCH64_VM_INTERPRETERRT_AARCH64_HPP
 #define CPU_AARCH64_VM_INTERPRETERRT_AARCH64_HPP
 
-#include "asm/macroAssembler.hpp"
-#include "memory/allocation.hpp"
+// This is included in the middle of class Interpreter.
+// Do not include files here.
 
 // native method calls
 
@@ -47,12 +47,7 @@
 
  public:
   // Creation
-  SignatureHandlerGenerator(const methodHandle& method, CodeBuffer* buffer) : NativeSignatureIterator(method) {
-    _masm = new MacroAssembler(buffer);
-    _num_int_args = (method->is_static() ? 1 : 0);
-    _num_fp_args = 0;
-    _stack_offset = 0;
-  }
+  SignatureHandlerGenerator(const methodHandle& method, CodeBuffer* buffer);
 
   // Code generation
   void generate(uint64_t fingerprint);
--- a/src/hotspot/cpu/aarch64/jvmciCodeInstaller_aarch64.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/aarch64/jvmciCodeInstaller_aarch64.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -26,6 +26,7 @@
 #include "jvmci/jvmciCompilerToVM.hpp"
 #include "jvmci/jvmciJavaClasses.hpp"
 #include "oops/oop.inline.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "vmreg_aarch64.inline.hpp"
 
--- a/src/hotspot/cpu/aarch64/methodHandles_aarch64.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/aarch64/methodHandles_aarch64.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -30,6 +30,7 @@
 #include "interpreter/interpreterRuntime.hpp"
 #include "memory/allocation.inline.hpp"
 #include "prims/methodHandles.hpp"
+#include "runtime/frame.inline.hpp"
 
 #define __ _masm->
 
--- a/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -35,6 +35,7 @@
 #include "oops/objArrayKlass.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/methodHandles.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/stubRoutines.hpp"
 #include "runtime/synchronizer.hpp"
--- a/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -35,6 +35,7 @@
 #include "gc/shared/collectedHeap.hpp"
 #include "nativeInst_arm.hpp"
 #include "oops/objArrayKlass.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "vmreg_arm.inline.hpp"
 
--- a/src/hotspot/cpu/arm/frame_arm.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/arm/frame_arm.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -135,4 +135,6 @@
   // helper to update a map with callee-saved FP
   static void update_map_with_saved_link(RegisterMap* map, intptr_t** link_addr);
 
+  static jint interpreter_frame_expression_stack_direction() { return -1; }
+
 #endif // CPU_ARM_VM_FRAME_ARM_HPP
--- a/src/hotspot/cpu/arm/frame_arm.inline.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/arm/frame_arm.inline.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -218,9 +218,6 @@
 }
 
 
-inline jint frame::interpreter_frame_expression_stack_direction() { return -1; }
-
-
 // Entry frames
 
 inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
--- a/src/hotspot/cpu/arm/interp_masm_arm.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/arm/interp_masm_arm.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -40,6 +40,7 @@
 #include "prims/jvmtiThreadState.hpp"
 #include "runtime/basicLock.hpp"
 #include "runtime/biasedLocking.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/sharedRuntime.hpp"
 
 #if INCLUDE_ALL_GCS
--- a/src/hotspot/cpu/arm/interpreterRT_arm.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/arm/interpreterRT_arm.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
 #include "memory/allocation.inline.hpp"
@@ -36,6 +37,21 @@
 
 #define __ _masm->
 
+Interpreter::SignatureHandlerGenerator::SignatureHandlerGenerator(
+    const methodHandle& method, CodeBuffer* buffer) : NativeSignatureIterator(method) {
+  _masm = new MacroAssembler(buffer);
+  _abi_offset = 0;
+  _ireg = is_static() ? 2 : 1;
+#ifdef __ABI_HARD__
+#ifdef AARCH64
+  _freg = 0;
+#else
+  _fp_slot = 0;
+  _single_fpr_slot = 0;
+#endif
+#endif
+}
+
 #ifdef SHARING_FAST_NATIVE_FINGERPRINTS
 // mapping from SignatureIterator param to (common) type of parsing
 static const u1 shared_type[] = {
--- a/src/hotspot/cpu/arm/interpreterRT_arm.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/arm/interpreterRT_arm.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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,8 +25,6 @@
 #ifndef CPU_ARM_VM_INTERPRETERRT_ARM_HPP
 #define CPU_ARM_VM_INTERPRETERRT_ARM_HPP
 
-#include "memory/allocation.hpp"
-
 // native method calls
 
 class SignatureHandlerGenerator: public NativeSignatureIterator {
@@ -56,23 +54,10 @@
 #endif
  public:
   // Creation
-  SignatureHandlerGenerator(const methodHandle& method, CodeBuffer* buffer) : NativeSignatureIterator(method) {
-    _masm = new MacroAssembler(buffer);
-    _abi_offset = 0;
-    _ireg = is_static() ? 2 : 1;
-#ifdef __ABI_HARD__
-#ifdef AARCH64
-    _freg = 0;
-#else
-    _fp_slot = 0;
-    _single_fpr_slot = 0;
-#endif
-#endif
-  }
+  SignatureHandlerGenerator(const methodHandle& method, CodeBuffer* buffer);
 
   // Code generation
   void generate(uint64_t fingerprint);
-
 };
 
 #ifndef AARCH64
--- a/src/hotspot/cpu/arm/jvmciCodeInstaller_arm.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/arm/jvmciCodeInstaller_arm.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 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
@@ -27,6 +27,7 @@
 #include "jvmci/jvmciCompilerToVM.hpp"
 #include "jvmci/jvmciJavaClasses.hpp"
 #include "oops/oop.inline.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "vmreg_arm.inline.hpp"
 
--- a/src/hotspot/cpu/arm/methodHandles_arm.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/arm/methodHandles_arm.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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,6 +34,7 @@
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
 #include "prims/methodHandles.hpp"
+#include "runtime/frame.inline.hpp"
 
 #define __ _masm->
 
--- a/src/hotspot/cpu/arm/templateTable_arm.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/arm/templateTable_arm.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -34,6 +34,7 @@
 #include "oops/objArrayKlass.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/methodHandles.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/stubRoutines.hpp"
 #include "runtime/synchronizer.hpp"
--- a/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -36,6 +36,7 @@
 #include "gc/shared/cardTableBarrierSet.hpp"
 #include "nativeInst_ppc.hpp"
 #include "oops/objArrayKlass.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/safepointMechanism.inline.hpp"
 #include "runtime/sharedRuntime.hpp"
 
--- a/src/hotspot/cpu/ppc/frame_ppc.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/ppc/frame_ppc.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2012, 2015 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -425,4 +425,6 @@
     pc_return_offset = 0
   };
 
+  static jint interpreter_frame_expression_stack_direction() { return -1; }
+
 #endif // CPU_PPC_VM_FRAME_PPC_HPP
--- a/src/hotspot/cpu/ppc/frame_ppc.inline.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/ppc/frame_ppc.inline.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2012, 2015 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -179,10 +179,6 @@
   return (intptr_t*)interpreter_frame_monitor_end() - 1;
 }
 
-inline jint frame::interpreter_frame_expression_stack_direction() {
-  return -1;
-}
-
 // top of expression stack
 inline intptr_t* frame::interpreter_frame_tos_address() const {
   return ((intptr_t*) get_ijava_state()->esp) + Interpreter::stackElementWords;
--- a/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -29,6 +29,7 @@
 #include "interp_masm_ppc.hpp"
 #include "interpreter/interpreterRuntime.hpp"
 #include "prims/jvmtiThreadState.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/safepointMechanism.hpp"
 #include "runtime/sharedRuntime.hpp"
 
--- a/src/hotspot/cpu/ppc/interpreterRT_ppc.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/ppc/interpreterRT_ppc.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -25,6 +25,7 @@
 
 #include "precompiled.hpp"
 #include "asm/assembler.inline.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
 #include "memory/allocation.inline.hpp"
@@ -46,6 +47,12 @@
 
 // Implementation of SignatureHandlerGenerator
 
+InterpreterRuntime::SignatureHandlerGenerator::SignatureHandlerGenerator(
+    const methodHandle& method, CodeBuffer* buffer) : NativeSignatureIterator(method) {
+  _masm = new MacroAssembler(buffer);
+  _num_used_fp_arg_regs = 0;
+}
+
 void InterpreterRuntime::SignatureHandlerGenerator::pass_int() {
   Argument jni_arg(jni_offset());
   Register r = jni_arg.is_register() ? jni_arg.as_register() : R0;
--- a/src/hotspot/cpu/ppc/interpreterRT_ppc.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/ppc/interpreterRT_ppc.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2012, 2014 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -26,8 +26,8 @@
 #ifndef CPU_PPC_VM_INTERPRETERRT_PPC_HPP
 #define CPU_PPC_VM_INTERPRETERRT_PPC_HPP
 
-#include "asm/macroAssembler.hpp"
-#include "memory/allocation.hpp"
+// This is included in the middle of class Interpreter.
+// Do not include files here.
 
 // native method calls
 
@@ -45,10 +45,7 @@
 
  public:
   // Creation
-  SignatureHandlerGenerator(const methodHandle& method, CodeBuffer* buffer) : NativeSignatureIterator(method) {
-    _masm = new MacroAssembler(buffer);
-    _num_used_fp_arg_regs = 0;
-  }
+  SignatureHandlerGenerator(const methodHandle& method, CodeBuffer* buffer);
 
   // Code generation
   void generate(uint64_t fingerprint);
--- a/src/hotspot/cpu/ppc/jvmciCodeInstaller_ppc.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/ppc/jvmciCodeInstaller_ppc.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, 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
@@ -26,6 +26,7 @@
 #include "jvmci/jvmciCompilerToVM.hpp"
 #include "jvmci/jvmciJavaClasses.hpp"
 #include "oops/oop.inline.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "vmreg_ppc.inline.hpp"
 
--- a/src/hotspot/cpu/ppc/methodHandles_ppc.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/ppc/methodHandles_ppc.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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.
  * Copyright (c) 2012, 2017 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -31,6 +31,7 @@
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
 #include "prims/methodHandles.hpp"
+#include "runtime/frame.inline.hpp"
 #include "utilities/preserveException.hpp"
 
 #define __ _masm->
--- a/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -34,6 +34,7 @@
 #include "oops/objArrayKlass.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/methodHandles.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/safepointMechanism.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/stubRoutines.hpp"
--- a/src/hotspot/cpu/s390/c1_LIRAssembler_s390.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/s390/c1_LIRAssembler_s390.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -36,6 +36,7 @@
 #include "gc/shared/cardTableBarrierSet.hpp"
 #include "nativeInst_s390.hpp"
 #include "oops/objArrayKlass.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/safepointMechanism.inline.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "vmreg_s390.inline.hpp"
--- a/src/hotspot/cpu/s390/frame_s390.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/s390/frame_s390.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2016 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -549,4 +549,6 @@
     pc_return_offset =  0,
   };
 
+  static jint interpreter_frame_expression_stack_direction() { return -1; }
+
 #endif // CPU_S390_VM_FRAME_S390_HPP
--- a/src/hotspot/cpu/s390/frame_s390.inline.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/s390/frame_s390.inline.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2016 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -175,10 +175,6 @@
   return (intptr_t*)interpreter_frame_monitor_end() - 1;
 }
 
-inline jint frame::interpreter_frame_expression_stack_direction() {
-  return -1;
-}
-
 inline intptr_t* frame::interpreter_frame_tos_at(jint offset) const {
   return &interpreter_frame_tos_address()[offset];
 }
--- a/src/hotspot/cpu/s390/interp_masm_s390.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/s390/interp_masm_s390.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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.
  * Copyright (c) 2016, 2017 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -36,6 +36,7 @@
 #include "prims/jvmtiThreadState.hpp"
 #include "runtime/basicLock.hpp"
 #include "runtime/biasedLocking.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/safepointMechanism.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/thread.inline.hpp"
--- a/src/hotspot/cpu/s390/interpreterRT_s390.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/s390/interpreterRT_s390.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -25,6 +25,7 @@
 
 #include "precompiled.hpp"
 #include "asm/macroAssembler.inline.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
 #include "memory/allocation.inline.hpp"
@@ -64,6 +65,11 @@
 }
 
 // Implementation of SignatureHandlerGenerator
+InterpreterRuntime::SignatureHandlerGenerator::SignatureHandlerGenerator(
+    const methodHandle& method, CodeBuffer* buffer) : NativeSignatureIterator(method) {
+  _masm = new MacroAssembler(buffer);
+  _fp_arg_nr = 0;
+}
 
 void InterpreterRuntime::SignatureHandlerGenerator::pass_int() {
   int int_arg_nr = jni_offset() - _fp_arg_nr;
--- a/src/hotspot/cpu/s390/interpreterRT_s390.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/s390/interpreterRT_s390.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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.
  * Copyright (c) 2016 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -26,7 +26,8 @@
 #ifndef CPU_S390_VM_INTERPRETERRT_S390_HPP
 #define CPU_S390_VM_INTERPRETERRT_S390_HPP
 
-#include "memory/allocation.hpp"
+// This is included in the middle of class Interpreter.
+// Do not include files here.
 
 static int binary_search(int key, LookupswitchPair* array, int n);
 
@@ -51,10 +52,7 @@
 
  public:
   // creation
-  SignatureHandlerGenerator(const methodHandle& method, CodeBuffer* buffer) : NativeSignatureIterator(method) {
-    _masm = new MacroAssembler(buffer);
-    _fp_arg_nr = 0;
-  }
+  SignatureHandlerGenerator(const methodHandle& method, CodeBuffer* buffer);
 
   // code generation
   void generate(uint64_t fingerprint);
--- a/src/hotspot/cpu/s390/jvmciCodeInstaller_s390.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/s390/jvmciCodeInstaller_s390.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2016 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -34,6 +34,7 @@
 #include "jvmci/jvmciCompilerToVM.hpp"
 #include "jvmci/jvmciJavaClasses.hpp"
 #include "oops/oop.inline.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "vmreg_s390.inline.hpp"
 
--- a/src/hotspot/cpu/s390/methodHandles_s390.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/s390/methodHandles_s390.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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.
  * Copyright (c) 2016, 2017, SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -31,6 +31,7 @@
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
 #include "prims/methodHandles.hpp"
+#include "runtime/frame.inline.hpp"
 #include "utilities/preserveException.hpp"
 
 #ifdef PRODUCT
--- a/src/hotspot/cpu/s390/templateTable_s390.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/s390/templateTable_s390.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -33,6 +33,7 @@
 #include "oops/objArrayKlass.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/methodHandles.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/safepointMechanism.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/stubRoutines.hpp"
--- a/src/hotspot/cpu/sparc/c1_LIRAssembler_sparc.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/sparc/c1_LIRAssembler_sparc.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -35,6 +35,7 @@
 #include "gc/shared/collectedHeap.hpp"
 #include "nativeInst_sparc.hpp"
 #include "oops/objArrayKlass.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/interfaceSupport.inline.hpp"
 #include "runtime/jniHandles.inline.hpp"
 #include "runtime/safepointMechanism.inline.hpp"
--- a/src/hotspot/cpu/sparc/frame_sparc.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/sparc/frame_sparc.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -240,4 +240,6 @@
   void interpreter_frame_set_monitors(BasicObjectLock* monitors);
  public:
 
+  static jint interpreter_frame_expression_stack_direction() { return -1; }
+
 #endif // CPU_SPARC_VM_FRAME_SPARC_HPP
--- a/src/hotspot/cpu/sparc/frame_sparc.inline.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/sparc/frame_sparc.inline.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -99,8 +99,6 @@
   return (intptr_t*) sp_addr_at( ImethodDataPtr->sp_offset_in_saved_window());
 }
 
-inline jint frame::interpreter_frame_expression_stack_direction() { return -1; }
-
 // bottom(base) of the expression stack (highest address)
 inline intptr_t* frame::interpreter_frame_expression_stack() const {
   return (intptr_t*)interpreter_frame_monitors() - 1;
--- a/src/hotspot/cpu/sparc/interp_masm_sparc.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/sparc/interp_masm_sparc.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -36,6 +36,7 @@
 #include "prims/jvmtiThreadState.hpp"
 #include "runtime/basicLock.hpp"
 #include "runtime/biasedLocking.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/safepointMechanism.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/thread.inline.hpp"
--- a/src/hotspot/cpu/sparc/interpreterRT_sparc.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/sparc/interpreterRT_sparc.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "asm/macroAssembler.inline.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
 #include "memory/allocation.inline.hpp"
@@ -40,6 +41,10 @@
 
 
 // Implementation of SignatureHandlerGenerator
+InterpreterRuntime::SignatureHandlerGenerator::SignatureHandlerGenerator(
+    const methodHandle& method, CodeBuffer* buffer) : NativeSignatureIterator(method) {
+  _masm = new MacroAssembler(buffer);
+}
 
 void InterpreterRuntime::SignatureHandlerGenerator::pass_word(int size_of_arg, int offset_in_arg) {
   Argument  jni_arg(jni_offset() + offset_in_arg, false);
--- a/src/hotspot/cpu/sparc/interpreterRT_sparc.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/sparc/interpreterRT_sparc.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -25,7 +25,9 @@
 #ifndef CPU_SPARC_VM_INTERPRETERRT_SPARC_HPP
 #define CPU_SPARC_VM_INTERPRETERRT_SPARC_HPP
 
-#include "memory/allocation.hpp"
+// This is included in the middle of class Interpreter.
+// Do not include files here.
+
 
 static int binary_search(int key, LookupswitchPair* array, int n);
 
@@ -52,9 +54,7 @@
 
  public:
   // Creation
-  SignatureHandlerGenerator(const methodHandle& method, CodeBuffer* buffer) : NativeSignatureIterator(method) {
-    _masm = new MacroAssembler(buffer);
-  }
+  SignatureHandlerGenerator(const methodHandle& method, CodeBuffer* buffer);
 
   // Code generation
   void generate( uint64_t fingerprint );
--- a/src/hotspot/cpu/sparc/jvmciCodeInstaller_sparc.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/sparc/jvmciCodeInstaller_sparc.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -26,6 +26,7 @@
 #include "jvmci/jvmciCompilerToVM.hpp"
 #include "jvmci/jvmciJavaClasses.hpp"
 #include "oops/oop.inline.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "utilities/align.hpp"
 #include "vmreg_sparc.inline.hpp"
--- a/src/hotspot/cpu/sparc/methodHandles_sparc.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/sparc/methodHandles_sparc.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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,6 +31,7 @@
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
 #include "prims/methodHandles.hpp"
+#include "runtime/frame.inline.hpp"
 #include "utilities/preserveException.hpp"
 
 #define __ _masm->
--- a/src/hotspot/cpu/sparc/templateTable_sparc.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/sparc/templateTable_sparc.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -32,6 +32,7 @@
 #include "oops/objArrayKlass.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/methodHandles.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/safepointMechanism.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/stubRoutines.hpp"
--- a/src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -37,6 +37,7 @@
 #include "gc/shared/collectedHeap.hpp"
 #include "nativeInst_x86.hpp"
 #include "oops/objArrayKlass.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/safepointMechanism.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "vmreg_x86.inline.hpp"
--- a/src/hotspot/cpu/x86/frame_x86.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/x86/frame_x86.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -154,4 +154,6 @@
   // deoptimization support
   void interpreter_frame_set_last_sp(intptr_t* sp);
 
+  static jint interpreter_frame_expression_stack_direction() { return -1; }
+
 #endif // CPU_X86_VM_FRAME_X86_HPP
--- a/src/hotspot/cpu/x86/frame_x86.inline.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/x86/frame_x86.inline.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -223,10 +223,6 @@
   return monitor_end-1;
 }
 
-
-inline jint frame::interpreter_frame_expression_stack_direction() { return -1; }
-
-
 // Entry frames
 
 inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
--- a/src/hotspot/cpu/x86/interp_masm_x86.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/x86/interp_masm_x86.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -35,6 +35,7 @@
 #include "prims/jvmtiThreadState.hpp"
 #include "runtime/basicLock.hpp"
 #include "runtime/biasedLocking.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/safepointMechanism.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/thread.inline.hpp"
--- a/src/hotspot/cpu/x86/interpreterRT_x86.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/x86/interpreterRT_x86.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -25,7 +25,8 @@
 #ifndef CPU_X86_VM_INTERPRETERRT_X86_HPP
 #define CPU_X86_VM_INTERPRETERRT_X86_HPP
 
-#include "memory/allocation.hpp"
+// This is included in the middle of class Interpreter.
+// Do not include files here.
 
 // native method calls
 
@@ -55,19 +56,7 @@
 
  public:
   // Creation
-  SignatureHandlerGenerator(const methodHandle& method, CodeBuffer* buffer) : NativeSignatureIterator(method) {
-    _masm = new MacroAssembler(buffer);
-#ifdef AMD64
-#ifdef _WIN64
-    _num_args = (method->is_static() ? 1 : 0);
-    _stack_offset = (Argument::n_int_register_parameters_c+1)* wordSize; // don't overwrite return address
-#else
-    _num_int_args = (method->is_static() ? 1 : 0);
-    _num_fp_args = 0;
-    _stack_offset = wordSize; // don't overwrite return address
-#endif // _WIN64
-#endif // AMD64
-  }
+  SignatureHandlerGenerator(const methodHandle& method, CodeBuffer* buffer);
 
   // Code generation
   void generate(uint64_t fingerprint);
--- a/src/hotspot/cpu/x86/interpreterRT_x86_32.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/x86/interpreterRT_x86_32.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
 #include "memory/allocation.inline.hpp"
@@ -39,6 +40,21 @@
 
 
 // Implementation of SignatureHandlerGenerator
+InterpreterRuntime::SignatureHandlerGenerator::SignatureHandlerGenerator(const methodHandle& method, CodeBuffer* buffer) :
+    NativeSignatureIterator(method) {
+  _masm = new MacroAssembler(buffer);
+#ifdef AMD64
+#ifdef _WIN64
+  _num_args = (method->is_static() ? 1 : 0);
+  _stack_offset = (Argument::n_int_register_parameters_c+1)* wordSize; // don't overwrite return address
+#else
+  _num_int_args = (method->is_static() ? 1 : 0);
+  _num_fp_args = 0;
+  _stack_offset = wordSize; // don't overwrite return address
+#endif // _WIN64
+#endif // AMD64
+}
+
 void InterpreterRuntime::SignatureHandlerGenerator::pass_int() {
   move(offset(), jni_offset() + 1);
 }
--- a/src/hotspot/cpu/x86/interpreterRT_x86_64.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/x86/interpreterRT_x86_64.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
 #include "memory/allocation.inline.hpp"
@@ -38,6 +39,21 @@
 
 // Implementation of SignatureHandlerGenerator
 
+InterpreterRuntime::SignatureHandlerGenerator::SignatureHandlerGenerator(const methodHandle& method, CodeBuffer* buffer) :
+    NativeSignatureIterator(method) {
+  _masm = new MacroAssembler(buffer);
+#ifdef AMD64
+#ifdef _WIN64
+  _num_args = (method->is_static() ? 1 : 0);
+  _stack_offset = (Argument::n_int_register_parameters_c+1)* wordSize; // don't overwrite return address
+#else
+  _num_int_args = (method->is_static() ? 1 : 0);
+  _num_fp_args = 0;
+  _stack_offset = wordSize; // don't overwrite return address
+#endif // _WIN64
+#endif // AMD64
+}
+
 Register InterpreterRuntime::SignatureHandlerGenerator::from() { return r14; }
 Register InterpreterRuntime::SignatureHandlerGenerator::to()   { return rsp; }
 Register InterpreterRuntime::SignatureHandlerGenerator::temp() { return rscratch1; }
--- a/src/hotspot/cpu/x86/jvmciCodeInstaller_x86.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/x86/jvmciCodeInstaller_x86.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -24,6 +24,7 @@
 #include "precompiled.hpp"
 #include "compiler/disassembler.hpp"
 #include "oops/oop.inline.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/javaCalls.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "jvmci/jvmciEnv.hpp"
--- a/src/hotspot/cpu/x86/methodHandles_x86.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/x86/methodHandles_x86.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -31,6 +31,7 @@
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
 #include "prims/methodHandles.hpp"
+#include "runtime/frame.inline.hpp"
 #include "utilities/preserveException.hpp"
 
 #define __ _masm->
--- a/src/hotspot/cpu/x86/templateTable_x86.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/x86/templateTable_x86.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -33,6 +33,7 @@
 #include "oops/objArrayKlass.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/methodHandles.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/safepointMechanism.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/stubRoutines.hpp"
--- a/src/hotspot/cpu/zero/frame_zero.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/zero/frame_zero.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -75,4 +75,6 @@
                            char*         buf,
                            int           buflen) const;
 
+  static jint interpreter_frame_expression_stack_direction() { return -1; }
+
 #endif // CPU_ZERO_VM_FRAME_ZERO_HPP
--- a/src/hotspot/cpu/zero/frame_zero.inline.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/zero/frame_zero.inline.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -130,10 +130,6 @@
   return monitor_end - 1;
 }
 
-inline jint frame::interpreter_frame_expression_stack_direction() {
-  return -1;
-}
-
 // Return a unique id for this frame. The id must have a value where
 // we can distinguish identity and younger/older relationship. NULL
 // represents an invalid (incomparable) frame.
--- a/src/hotspot/cpu/zero/interpreterRT_zero.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/zero/interpreterRT_zero.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -26,7 +26,9 @@
 #ifndef CPU_ZERO_VM_INTERPRETERRT_ZERO_HPP
 #define CPU_ZERO_VM_INTERPRETERRT_ZERO_HPP
 
-#include "memory/allocation.hpp"
+// This is included in the middle of class Interpreter.
+// Do not include files here.
+
 
 class SignatureHandler {
  public:
--- a/src/hotspot/cpu/zero/methodHandles_zero.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/zero/methodHandles_zero.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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.
  * Copyright 2009, 2010, 2011 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -30,6 +30,7 @@
 #include "memory/resourceArea.hpp"
 #include "oops/method.inline.hpp"
 #include "oops/oop.inline.hpp"
+#include "runtime/frame.inline.hpp"
 #include "prims/methodHandles.hpp"
 
 void MethodHandles::invoke_target(Method* method, TRAPS) {
--- a/src/hotspot/cpu/zero/stack_zero.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/cpu/zero/stack_zero.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -24,10 +24,12 @@
  */
 
 #include "precompiled.hpp"
+#include "interpreter/bytecodeInterpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
 #include "runtime/thread.hpp"
 #include "stack_zero.hpp"
 #include "stack_zero.inline.hpp"
+#include "runtime/frame.inline.hpp"
 #include "utilities/align.hpp"
 
 // Inlined causes circular inclusion with thread.hpp
--- a/src/hotspot/os_cpu/aix_ppc/thread_aix_ppc.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/aix_ppc/thread_aix_ppc.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2012, 2014 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -27,6 +27,19 @@
 #include "runtime/frame.hpp"
 #include "runtime/thread.hpp"
 
+frame JavaThread::pd_last_frame() {
+  assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
+
+  intptr_t* sp = last_Java_sp();
+  address pc = _anchor.last_Java_pc();
+
+  // Last_Java_pc ist not set, if we come here from compiled code.
+  if (pc == NULL)
+    pc =  (address) *(sp + 2);
+
+  return frame(sp, pc);
+}
+
 // Forte Analyzer AsyncGetCallTrace profiling support is not implemented on Aix/PPC.
 bool JavaThread::pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava) {
   Unimplemented();
--- a/src/hotspot/os_cpu/aix_ppc/thread_aix_ppc.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/aix_ppc/thread_aix_ppc.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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.
  * Copyright (c) 2012, 2013 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -32,18 +32,7 @@
   }
 
   // The `last' frame is the youngest Java frame on the thread's stack.
-  frame pd_last_frame() {
-    assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
-
-    intptr_t* sp = last_Java_sp();
-    address pc = _anchor.last_Java_pc();
-
-    // Last_Java_pc ist not set, if we come here from compiled code.
-    if (pc == NULL)
-      pc =  (address) *(sp + 2);
-
-    return frame(sp, pc);
-  }
+  frame pd_last_frame();
 
  public:
   void set_base_of_stack_pointer(intptr_t* base_sp) {}
--- a/src/hotspot/os_cpu/bsd_x86/thread_bsd_x86.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/bsd_x86/thread_bsd_x86.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -27,6 +27,12 @@
 #include "runtime/frame.inline.hpp"
 #include "runtime/thread.inline.hpp"
 
+frame JavaThread::pd_last_frame() {
+  assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
+  vmassert(_anchor.last_Java_pc() != NULL, "not walkable");
+  return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
+}
+
 // For Forte Analyzer AsyncGetCallTrace profiling support - thread is
 // currently interrupted by SIGPROF
 bool JavaThread::pd_get_top_frame_for_signal_handler(frame* fr_addr,
--- a/src/hotspot/os_cpu/bsd_x86/thread_bsd_x86.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/bsd_x86/thread_bsd_x86.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, 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
@@ -30,11 +30,7 @@
     _anchor.clear();
   }
 
-  frame pd_last_frame() {
-    assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
-    vmassert(_anchor.last_Java_pc() != NULL, "not walkable");
-    return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
-  }
+  frame pd_last_frame();
 
  public:
   // Mutators are highly dangerous....
--- a/src/hotspot/os_cpu/bsd_zero/thread_bsd_zero.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/bsd_zero/thread_bsd_zero.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2009, 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -27,6 +27,11 @@
 #include "runtime/frame.inline.hpp"
 #include "runtime/thread.inline.hpp"
 
+frame JavaThread::pd_last_frame() {
+  assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
+  return frame(last_Java_fp(), last_Java_sp());
+}
+
 void JavaThread::cache_global_variables() {
   // nothing to do
 }
--- a/src/hotspot/os_cpu/bsd_zero/thread_bsd_zero.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/bsd_zero/thread_bsd_zero.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -86,10 +86,7 @@
   }
 
  private:
-  frame pd_last_frame() {
-    assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
-    return frame(last_Java_fp(), last_Java_sp());
-  }
+  frame pd_last_frame();
 
  public:
   static ByteSize last_Java_fp_offset() {
--- a/src/hotspot/os_cpu/linux_aarch64/thread_linux_aarch64.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/linux_aarch64/thread_linux_aarch64.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -28,6 +28,11 @@
 #include "runtime/frame.inline.hpp"
 #include "runtime/thread.inline.hpp"
 
+frame JavaThread::pd_last_frame() {
+  assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
+  return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
+}
+
 // For Forte Analyzer AsyncGetCallTrace profiling support - thread is
 // currently interrupted by SIGPROF
 bool JavaThread::pd_get_top_frame_for_signal_handler(frame* fr_addr,
--- a/src/hotspot/os_cpu/linux_aarch64/thread_linux_aarch64.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/linux_aarch64/thread_linux_aarch64.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -41,10 +41,7 @@
     _anchor.clear();
   }
 
-  frame pd_last_frame() {
-    assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
-    return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
-  }
+  frame pd_last_frame();
 
  public:
   // Mutators are highly dangerous....
--- a/src/hotspot/os_cpu/linux_arm/thread_linux_arm.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/linux_arm/thread_linux_arm.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -30,6 +30,21 @@
 #include "memory/metaspaceShared.hpp"
 #include "runtime/frame.inline.hpp"
 
+frame JavaThread::pd_last_frame() {
+  assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
+#ifdef AARCH64
+  assert (_anchor.last_Java_pc() != NULL, "pc should be stored");
+  return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
+#else
+  if (_anchor.last_Java_pc() != NULL) {
+    return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
+  } else {
+    // This will pick up pc from sp
+    return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp());
+  }
+#endif // AARCH64
+}
+
 void JavaThread::cache_global_variables() {
   BarrierSet* bs = Universe::heap()->barrier_set();
 
--- a/src/hotspot/os_cpu/linux_arm/thread_linux_arm.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/linux_arm/thread_linux_arm.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -37,20 +37,7 @@
     _in_top_frame_unsafe_section = NULL;
   }
 
-  frame pd_last_frame() {
-    assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
-#ifdef AARCH64
-    assert (_anchor.last_Java_pc() != NULL, "pc should be stored");
-    return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
-#else
-    if (_anchor.last_Java_pc() != NULL) {
-      return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
-    } else {
-      // This will pick up pc from sp
-      return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp());
-    }
-#endif // AARCH64
-  }
+  frame pd_last_frame();
 
  public:
   intptr_t* last_Java_fp()                       { return _anchor.last_Java_fp(); }
--- a/src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2012, 2014 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -24,9 +24,23 @@
  */
 
 #include "precompiled.hpp"
-#include "runtime/frame.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/thread.hpp"
 
+frame JavaThread::pd_last_frame() {
+  assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
+
+  intptr_t* sp = last_Java_sp();
+  address pc = _anchor.last_Java_pc();
+
+  // Last_Java_pc ist not set, if we come here from compiled code.
+  if (pc == NULL) {
+    pc = (address) *(sp + 2);
+  }
+
+  return frame(sp, pc);
+}
+
 // Forte Analyzer AsyncGetCallTrace profiling support is not implemented on Linux/PPC.
 bool JavaThread::pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava) {
   Unimplemented();
--- a/src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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.
  * Copyright (c) 2012, 2013 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -33,19 +33,7 @@
   }
 
   // The `last' frame is the youngest Java frame on the thread's stack.
-  frame pd_last_frame() {
-    assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
-
-    intptr_t* sp = last_Java_sp();
-    address pc = _anchor.last_Java_pc();
-
-    // Last_Java_pc ist not set, if we come here from compiled code.
-    if (pc == NULL) {
-      pc = (address) *(sp + 2);
-    }
-
-    return frame(sp, pc);
-  }
+  frame pd_last_frame();
 
  public:
 
--- a/src/hotspot/os_cpu/linux_s390/thread_linux_s390.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/linux_s390/thread_linux_s390.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2016 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -24,9 +24,23 @@
  */
 
 #include "precompiled.hpp"
-#include "runtime/frame.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/thread.hpp"
 
+frame JavaThread::pd_last_frame() {
+  assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
+
+  intptr_t* sp = last_Java_sp();
+  address pc = _anchor.last_Java_pc();
+
+  // Last_Java_pc ist not set if we come here from compiled code.
+  if (pc == NULL) {
+    pc = (address) *(sp + 14);
+  }
+
+  return frame(sp, pc);
+}
+
 // Forte Analyzer AsyncGetCallTrace profiling support is not implemented on Linux/S390x.
 bool JavaThread::pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava) {
   Unimplemented();
--- a/src/hotspot/os_cpu/linux_s390/thread_linux_s390.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/linux_s390/thread_linux_s390.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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.
  * Copyright (c) 2016 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -33,19 +33,7 @@
   }
 
   // The `last' frame is the youngest Java frame on the thread's stack.
-  frame pd_last_frame() {
-    assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
-
-    intptr_t* sp = last_Java_sp();
-    address pc = _anchor.last_Java_pc();
-
-    // Last_Java_pc ist not set if we come here from compiled code.
-    if (pc == NULL) {
-      pc = (address) *(sp + 14);
-    }
-
-    return frame(sp, pc);
-  }
+  frame pd_last_frame();
 
  public:
   void set_base_of_stack_pointer(intptr_t* base_sp) {}
--- a/src/hotspot/os_cpu/linux_sparc/thread_linux_sparc.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/linux_sparc/thread_linux_sparc.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -27,6 +27,14 @@
 #include "runtime/frame.inline.hpp"
 #include "runtime/thread.inline.hpp"
 
+frame JavaThread::pd_last_frame() {
+  assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
+  assert(_anchor.walkable(), "thread has not dumped its register windows yet");
+
+  assert(_anchor.last_Java_pc() != NULL, "Ack no pc!");
+  return frame(last_Java_sp(), frame::unpatchable, _anchor.last_Java_pc());
+}
+
 // For Forte Analyzer AsyncGetCallTrace profiling support - thread is
 // currently interrupted by SIGPROF
 bool JavaThread::pd_get_top_frame_for_signal_handler(frame* fr_addr,
--- a/src/hotspot/os_cpu/linux_sparc/thread_linux_sparc.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/linux_sparc/thread_linux_sparc.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -32,13 +32,7 @@
     _base_of_stack_pointer        = NULL;
   }
 
-  frame pd_last_frame() {
-    assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
-    assert(_anchor.walkable(), "thread has not dumped its register windows yet");
-
-    assert(_anchor.last_Java_pc() != NULL, "Ack no pc!");
-    return frame(last_Java_sp(), frame::unpatchable, _anchor.last_Java_pc());
-  }
+  frame pd_last_frame();
 
   // Sometimes the trap handler needs to record both PC and NPC.
   // This is a SPARC-specific companion to Thread::set_saved_exception_pc.
--- a/src/hotspot/os_cpu/linux_x86/thread_linux_x86.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/linux_x86/thread_linux_x86.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -27,6 +27,12 @@
 #include "runtime/frame.inline.hpp"
 #include "runtime/thread.inline.hpp"
 
+frame JavaThread::pd_last_frame() {
+  assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
+  vmassert(_anchor.last_Java_pc() != NULL, "not walkable");
+  return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
+}
+
 // For Forte Analyzer AsyncGetCallTrace profiling support - thread is
 // currently interrupted by SIGPROF
 bool JavaThread::pd_get_top_frame_for_signal_handler(frame* fr_addr,
--- a/src/hotspot/os_cpu/linux_x86/thread_linux_x86.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/linux_x86/thread_linux_x86.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, 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
@@ -30,11 +30,7 @@
     _anchor.clear();
   }
 
-  frame pd_last_frame() {
-    assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
-    vmassert(_anchor.last_Java_pc() != NULL, "not walkable");
-    return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
-  }
+  frame pd_last_frame();
 
  public:
   // Mutators are highly dangerous....
--- a/src/hotspot/os_cpu/linux_zero/thread_linux_zero.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/linux_zero/thread_linux_zero.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2009, 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -27,6 +27,11 @@
 #include "runtime/frame.inline.hpp"
 #include "runtime/thread.inline.hpp"
 
+frame JavaThread::pd_last_frame() {
+  assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
+  return frame(last_Java_fp(), last_Java_sp());
+}
+
 void JavaThread::cache_global_variables() {
   // nothing to do
 }
--- a/src/hotspot/os_cpu/linux_zero/thread_linux_zero.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/linux_zero/thread_linux_zero.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -86,10 +86,7 @@
   }
 
  private:
-  frame pd_last_frame() {
-    assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
-    return frame(last_Java_fp(), last_Java_sp());
-  }
+  frame pd_last_frame();
 
  public:
   static ByteSize last_Java_fp_offset() {
--- a/src/hotspot/os_cpu/solaris_sparc/thread_solaris_sparc.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/solaris_sparc/thread_solaris_sparc.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -27,6 +27,14 @@
 #include "runtime/frame.inline.hpp"
 #include "runtime/thread.inline.hpp"
 
+frame JavaThread::pd_last_frame() {
+  assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
+  assert(_anchor.walkable(), "thread has not dumped its register windows yet");
+
+  assert(_anchor.last_Java_pc() != NULL, "Ack no pc!");
+  return frame(last_Java_sp(), frame::unpatchable, _anchor.last_Java_pc());
+}
+
 // For Forte Analyzer AsyncGetCallTrace profiling support - thread is
 // currently interrupted by SIGPROF
 //
--- a/src/hotspot/os_cpu/solaris_sparc/thread_solaris_sparc.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/solaris_sparc/thread_solaris_sparc.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -31,13 +31,7 @@
     _base_of_stack_pointer        = NULL;
   }
 
-  frame pd_last_frame() {
-    assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
-    assert(_anchor.walkable(), "thread has not dumped its register windows yet");
-
-    assert(_anchor.last_Java_pc() != NULL, "Ack no pc!");
-    return frame(last_Java_sp(), frame::unpatchable, _anchor.last_Java_pc());
-  }
+  frame pd_last_frame();
 
   // Sometimes the trap handler needs to record both PC and NPC.
   // This is a SPARC-specific companion to Thread::set_saved_exception_pc.
--- a/src/hotspot/os_cpu/solaris_x86/thread_solaris_x86.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/solaris_x86/thread_solaris_x86.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -27,6 +27,12 @@
 #include "runtime/frame.inline.hpp"
 #include "runtime/thread.inline.hpp"
 
+frame JavaThread::pd_last_frame() {
+  assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
+  vmassert(_anchor.last_Java_pc() != NULL, "not walkable");
+  return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
+}
+
 // For Forte Analyzer AsyncGetCallTrace profiling support - thread is
 // currently interrupted by SIGPROF
 bool JavaThread::pd_get_top_frame_for_signal_handler(frame* fr_addr,
--- a/src/hotspot/os_cpu/solaris_x86/thread_solaris_x86.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/solaris_x86/thread_solaris_x86.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, 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
@@ -28,11 +28,7 @@
  private:
   void pd_initialize()                           { _anchor.clear(); }
 
-  frame pd_last_frame() {
-    assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
-    vmassert(_anchor.last_Java_pc() != NULL, "not walkable");
-    return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
-  }
+  frame pd_last_frame();
 
  public:
   // Mutators are highly dangerous....
--- a/src/hotspot/os_cpu/windows_x86/thread_windows_x86.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/windows_x86/thread_windows_x86.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -27,6 +27,12 @@
 #include "runtime/frame.inline.hpp"
 #include "runtime/thread.inline.hpp"
 
+frame JavaThread::pd_last_frame() {
+  assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
+  vmassert(_anchor.last_Java_pc() != NULL, "not walkable");
+  return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
+}
+
 // For Forte Analyzer AsyncGetCallTrace profiling support - thread is
 // currently interrupted by SIGPROF
 bool JavaThread::pd_get_top_frame_for_signal_handler(frame* fr_addr,
--- a/src/hotspot/os_cpu/windows_x86/thread_windows_x86.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/windows_x86/thread_windows_x86.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, 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
@@ -30,11 +30,7 @@
     _anchor.clear();
   }
 
-  frame pd_last_frame() {
-    assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
-    vmassert(_anchor.last_Java_pc() != NULL, "not walkable");
-    return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
-  }
+  frame pd_last_frame();
 
  public:
   // Mutators are highly dangerous....
--- a/src/hotspot/share/aot/aotCompiledMethod.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/aot/aotCompiledMethod.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -36,6 +36,7 @@
 #include "jvmci/compilerRuntime.hpp"
 #include "jvmci/jvmciRuntime.hpp"
 #include "oops/method.inline.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/java.hpp"
 #include "runtime/os.hpp"
@@ -70,6 +71,10 @@
 }
 #endif
 
+address* AOTCompiledMethod::orig_pc_addr(const frame* fr) {
+  return (address*) ((address)fr->unextended_sp() + _meta->orig_pc_offset());
+}
+
 bool AOTCompiledMethod::do_unloading_oops(address low_boundary, BoolObjectClosure* is_alive, bool unloading_occurred) {
   return false;
 }
--- a/src/hotspot/share/aot/aotCompiledMethod.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/aot/aotCompiledMethod.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -117,7 +117,7 @@
   const int _method_index;
   oop _oop;  // method()->method_holder()->klass_holder()
 
-  address* orig_pc_addr(const frame* fr) { return (address*) ((address)fr->unextended_sp() + _meta->orig_pc_offset()); }
+  address* orig_pc_addr(const frame* fr);
   bool make_not_entrant_helper(int new_state);
 
  public:
--- a/src/hotspot/share/c1/c1_FrameMap.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/c1/c1_FrameMap.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, 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
@@ -25,7 +25,7 @@
 #ifndef SHARE_VM_C1_C1_FRAMEMAP_HPP
 #define SHARE_VM_C1_C1_FRAMEMAP_HPP
 
-#include "asm/assembler.hpp"
+#include "asm/macroAssembler.hpp"
 #include "c1/c1_Defs.hpp"
 #include "c1/c1_LIR.hpp"
 #include "code/vmreg.hpp"
--- a/src/hotspot/share/c1/c1_Runtime1.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/c1/c1_Runtime1.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -54,10 +54,11 @@
 #include "runtime/biasedLocking.hpp"
 #include "runtime/compilationPolicy.hpp"
 #include "runtime/interfaceSupport.inline.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/javaCalls.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/threadCritical.hpp"
-#include "runtime/vframe.hpp"
+#include "runtime/vframe.inline.hpp"
 #include "runtime/vframeArray.hpp"
 #include "runtime/vm_version.hpp"
 #include "utilities/copy.hpp"
--- a/src/hotspot/share/ci/ciEnv.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/ci/ciEnv.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -32,6 +32,7 @@
 #include "code/dependencies.hpp"
 #include "code/exceptionHandlerTable.hpp"
 #include "compiler/oopMap.hpp"
+#include "oops/methodData.hpp"
 #include "runtime/thread.hpp"
 
 class CompileTask;
--- a/src/hotspot/share/classfile/classFileParser.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/classfile/classFileParser.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -58,6 +58,7 @@
 #include "oops/symbol.hpp"
 #include "prims/jvmtiExport.hpp"
 #include "prims/jvmtiThreadState.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/javaCalls.hpp"
 #include "runtime/perfData.hpp"
 #include "runtime/reflection.hpp"
@@ -770,6 +771,13 @@
   }  // end of for
 }
 
+Handle ClassFileParser::clear_cp_patch_at(int index) {
+  Handle patch = cp_patch_at(index);
+  _cp_patches->at_put(index, Handle());
+  assert(!has_cp_patch_at(index), "");
+  return patch;
+}
+
 void ClassFileParser::patch_class(ConstantPool* cp, int class_index, Klass* k, Symbol* name) {
   int name_index = _orig_cp_size + _num_patched_klasses;
   int resolved_klass_index = _first_patched_klass_resolved_index + _num_patched_klasses;
--- a/src/hotspot/share/classfile/classFileParser.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/classfile/classFileParser.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -26,7 +26,7 @@
 #define SHARE_VM_CLASSFILE_CLASSFILEPARSER_HPP
 
 #include "memory/referenceType.hpp"
-#include "runtime/handles.inline.hpp"
+#include "oops/annotations.hpp"
 #include "oops/constantPool.hpp"
 #include "oops/typeArrayOop.hpp"
 #include "utilities/accessFlags.hpp"
@@ -434,12 +434,7 @@
     return _cp_patches->at(index);
   }
 
-  Handle clear_cp_patch_at(int index) {
-    Handle patch = cp_patch_at(index);
-    _cp_patches->at_put(index, Handle());
-    assert(!has_cp_patch_at(index), "");
-    return patch;
-  }
+  Handle clear_cp_patch_at(int index);
 
   void patch_class(ConstantPool* cp, int class_index, Klass* k, Symbol* name);
   void patch_constant_pool(ConstantPool* cp,
@@ -530,7 +525,7 @@
   const GrowableArray<Handle>* cp_patches() const { return _cp_patches; }
   ClassLoaderData* loader_data() const { return _loader_data; }
   const Symbol* class_name() const { return _class_name; }
-  const Klass* super_klass() const { return _super_klass; }
+  const InstanceKlass* super_klass() const { return _super_klass; }
 
   ReferenceType reference_type() const { return _rt; }
   AccessFlags access_flags() const { return _access_flags; }
--- a/src/hotspot/share/classfile/classListParser.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/classfile/classListParser.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -31,6 +31,8 @@
 #include "classfile/symbolTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/systemDictionaryShared.hpp"
+#include "logging/log.hpp"
+#include "logging/logTag.hpp"
 #include "memory/metaspaceShared.hpp"
 #include "memory/resourceArea.hpp"
 #include "runtime/fieldType.hpp"
--- a/src/hotspot/share/classfile/javaClasses.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/classfile/javaClasses.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -50,6 +50,7 @@
 #include "oops/typeArrayOop.inline.hpp"
 #include "prims/resolvedMethodTable.hpp"
 #include "runtime/fieldDescriptor.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/interfaceSupport.inline.hpp"
 #include "runtime/java.hpp"
@@ -57,7 +58,7 @@
 #include "runtime/jniHandles.inline.hpp"
 #include "runtime/safepoint.hpp"
 #include "runtime/thread.inline.hpp"
-#include "runtime/vframe.hpp"
+#include "runtime/vframe.inline.hpp"
 #include "utilities/align.hpp"
 #include "utilities/preserveException.hpp"
 
--- a/src/hotspot/share/classfile/klassFactory.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/classfile/klassFactory.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -34,6 +34,7 @@
 #include "memory/resourceArea.hpp"
 #include "prims/jvmtiEnvBase.hpp"
 #include "prims/jvmtiRedefineClasses.hpp"
+#include "runtime/handles.inline.hpp"
 #include "trace/traceMacros.hpp"
 
 // called during initial loading of a shared class
--- a/src/hotspot/share/classfile/sharedClassUtil.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/classfile/sharedClassUtil.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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,7 +38,7 @@
 #include "oops/instanceKlass.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/java.hpp"
-#include "runtime/os.hpp"
+#include "runtime/os.inline.hpp"
 
 class ManifestStream: public ResourceObj {
   private:
--- a/src/hotspot/share/classfile/systemDictionary.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/classfile/systemDictionary.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -34,7 +34,6 @@
 #include "runtime/reflectionUtils.hpp"
 #include "runtime/signature.hpp"
 #include "utilities/hashtable.hpp"
-#include "utilities/hashtable.inline.hpp"
 
 // The dictionary in each ClassLoaderData stores all loaded classes, either
 // initiatied by its class loader or defined by its class loader:
--- a/src/hotspot/share/code/compiledMethod.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/code/compiledMethod.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -27,10 +27,11 @@
 #include "code/compiledMethod.inline.hpp"
 #include "code/scopeDesc.hpp"
 #include "code/codeCache.hpp"
-#include "prims/methodHandles.hpp"
 #include "interpreter/bytecode.inline.hpp"
 #include "memory/resourceArea.hpp"
+#include "oops/methodData.hpp"
 #include "oops/method.inline.hpp"
+#include "prims/methodHandles.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/mutexLocker.hpp"
 
--- a/src/hotspot/share/code/compiledMethod.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/code/compiledMethod.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -50,13 +50,15 @@
   volatile int _count;
   ExceptionCache* _next;
 
-  address pc_at(int index)                     { assert(index >= 0 && index < count(),""); return _pc[index]; }
-  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();
+  inline address pc_at(int index);
+  void set_pc_at(int index, address a)      { assert(index >= 0 && index < cache_size,""); _pc[index] = a; }
+
+  inline address handler_at(int index);
+  void set_handler_at(int index, address a) { assert(index >= 0 && index < cache_size,""); _handler[index] = a; }
+
+  inline int count();
   // increment_count is only called under lock, but there may be concurrent readers.
-  void    increment_count();
+  void increment_count();
 
  public:
 
@@ -306,9 +308,9 @@
   virtual address get_original_pc(const frame* fr) = 0;
   // Deopt
   // Return true is the PC is one would expect if the frame is being deopted.
-  bool is_deopt_pc      (address pc) { return is_deopt_entry(pc) || is_deopt_mh_entry(pc); }
+  inline bool is_deopt_pc(address pc);
   bool is_deopt_mh_entry(address pc) { return pc == deopt_mh_handler_begin(); }
-  bool is_deopt_entry(address pc);
+  inline bool is_deopt_entry(address pc);
 
   virtual bool can_convert_to_zombie() = 0;
   virtual const char* compile_kind() const = 0;
--- a/src/hotspot/share/code/compiledMethod.inline.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/code/compiledMethod.inline.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -29,6 +29,8 @@
 #include "code/nativeInst.hpp"
 #include "runtime/frame.hpp"
 
+inline bool CompiledMethod::is_deopt_pc(address pc) { return is_deopt_entry(pc) || is_deopt_mh_entry(pc); }
+
 // When using JVMCI the address might be off by the size of a call instruction.
 inline bool CompiledMethod::is_deopt_entry(address pc) {
   return pc == deopt_handler_begin()
@@ -64,6 +66,16 @@
 
 inline int ExceptionCache::count() { return OrderAccess::load_acquire(&_count); }
 
+address ExceptionCache::pc_at(int index) {
+  assert(index >= 0 && index < count(),"");
+  return _pc[index];
+}
+
+address ExceptionCache::handler_at(int index) {
+  assert(index >= 0 && index < count(),"");
+  return _handler[index];
+}
+
 // increment_count is only called under lock, but there may be concurrent readers.
 inline void ExceptionCache::increment_count() { OrderAccess::release_store(&_count, _count + 1); }
 
--- a/src/hotspot/share/code/nmethod.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/code/nmethod.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -26,6 +26,7 @@
 #include "jvm.h"
 #include "code/codeCache.hpp"
 #include "code/compiledIC.hpp"
+#include "code/compiledMethod.inline.hpp"
 #include "code/dependencies.hpp"
 #include "code/nativeInst.hpp"
 #include "code/nmethod.hpp"
@@ -40,17 +41,21 @@
 #include "interpreter/bytecode.hpp"
 #include "logging/log.hpp"
 #include "logging/logStream.hpp"
+#include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/method.inline.hpp"
 #include "oops/methodData.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/jvmtiImpl.hpp"
 #include "runtime/atomic.hpp"
+#include "runtime/frame.inline.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/jniHandles.inline.hpp"
 #include "runtime/orderAccess.inline.hpp"
 #include "runtime/os.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/sweeper.hpp"
+#include "runtime/vmThread.hpp"
 #include "utilities/align.hpp"
 #include "utilities/dtrace.hpp"
 #include "utilities/events.hpp"
@@ -381,6 +386,10 @@
     nul_chk_table_size();
 }
 
+address* nmethod::orig_pc_addr(const frame* fr) {
+  return (address*) ((address)fr->unextended_sp() + _orig_pc_offset);
+}
+
 const char* nmethod::compile_kind() const {
   if (is_osr_method())     return "osr";
   if (method() != NULL && is_native_method())  return "c2n";
--- a/src/hotspot/share/code/nmethod.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/code/nmethod.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -512,7 +512,7 @@
  private:
   ScopeDesc* scope_desc_in(address begin, address end);
 
-  address* orig_pc_addr(const frame* fr) { return (address*) ((address)fr->unextended_sp() + _orig_pc_offset); }
+  address* orig_pc_addr(const frame* fr);
 
  public:
   // copying of debugging information
--- a/src/hotspot/share/compiler/compileBroker.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/compiler/compileBroker.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -53,6 +53,7 @@
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/sweeper.hpp"
 #include "runtime/timerTrace.hpp"
+#include "runtime/vframe.inline.hpp"
 #include "trace/tracing.hpp"
 #include "utilities/debug.hpp"
 #include "utilities/dtrace.hpp"
--- a/src/hotspot/share/compiler/compileTask.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/compiler/compileTask.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -30,6 +30,7 @@
 #include "logging/log.hpp"
 #include "logging/logStream.hpp"
 #include "memory/resourceArea.hpp"
+#include "runtime/handles.inline.hpp"
 
 CompileTask*  CompileTask::_task_free_list = NULL;
 #ifdef ASSERT
--- a/src/hotspot/share/compiler/directivesParser.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/compiler/directivesParser.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, 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
@@ -27,7 +27,7 @@
 #include "compiler/directivesParser.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
-#include "runtime/os.hpp"
+#include "runtime/os.inline.hpp"
 #include <string.h>
 
 void DirectivesParser::push_tmp(CompilerDirectives* dir) {
--- a/src/hotspot/share/compiler/methodMatcher.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/compiler/methodMatcher.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 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
@@ -26,7 +26,7 @@
 #define SHARE_VM_COMPILER_METHODMATCHER_HPP
 
 #include "memory/allocation.hpp"
-#include "runtime/handles.inline.hpp"
+#include "runtime/handles.hpp"
 #include "memory/resourceArea.hpp"
 
 class MethodMatcher : public CHeapObj<mtCompiler> {
--- a/src/hotspot/share/interpreter/abstractInterpreter.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/interpreter/abstractInterpreter.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -28,6 +28,7 @@
 #include "asm/macroAssembler.hpp"
 #include "code/stubs.hpp"
 #include "interpreter/bytecodes.hpp"
+#include "runtime/frame.hpp"
 #include "runtime/thread.hpp"
 #include "runtime/vmThread.hpp"
 
--- a/src/hotspot/share/interpreter/bytecodeStream.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/interpreter/bytecodeStream.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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 "interpreter/bytecodeStream.hpp"
 #include "interpreter/bytecodes.hpp"
+#include "runtime/handles.inline.hpp"
 
 Bytecodes::Code RawBytecodeStream::raw_next_special(Bytecodes::Code code) {
   assert(!is_last_bytecode(), "should have been checked");
@@ -53,6 +54,11 @@
   return code;
 }
 
+BaseBytecodeStream::BaseBytecodeStream(const methodHandle& method) : _method(method) {
+  set_interval(0, _method->code_size());
+  _is_raw = false;
+}
+
 #ifdef ASSERT
 void BaseBytecodeStream::assert_raw_index_size(int size) const {
   if (raw_code() == Bytecodes::_invokedynamic && is_raw()) {
--- a/src/hotspot/share/interpreter/bytecodeStream.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/interpreter/bytecodeStream.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -28,7 +28,6 @@
 #include "interpreter/bytecode.hpp"
 #include "memory/allocation.hpp"
 #include "oops/method.hpp"
-#include "runtime/handles.inline.hpp"
 #include "utilities/bytes.hpp"
 
 // A BytecodeStream is used for fast iteration over the bytecodes
@@ -63,10 +62,7 @@
   bool            _is_raw;                       // false in 'cooked' BytecodeStream
 
   // Construction
-  BaseBytecodeStream(const methodHandle& method) : _method(method) {
-    set_interval(0, _method->code_size());
-    _is_raw = false;
-  }
+  BaseBytecodeStream(const methodHandle& method);
 
  public:
   // Iteration control
--- a/src/hotspot/share/interpreter/interpreterRuntime.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/interpreter/interpreterRuntime.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -53,6 +53,7 @@
 #include "runtime/compilationPolicy.hpp"
 #include "runtime/deoptimization.hpp"
 #include "runtime/fieldDescriptor.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/icache.hpp"
 #include "runtime/interfaceSupport.inline.hpp"
@@ -84,6 +85,58 @@
     }
 };
 
+// Helper class to access current interpreter state
+class LastFrameAccessor : public StackObj {
+  frame _last_frame;
+public:
+  LastFrameAccessor(JavaThread* thread) {
+    assert(thread == Thread::current(), "sanity");
+    _last_frame = thread->last_frame();
+  }
+  bool is_interpreted_frame() const              { return _last_frame.is_interpreted_frame(); }
+  Method*   method() const                       { return _last_frame.interpreter_frame_method(); }
+  address   bcp() const                          { return _last_frame.interpreter_frame_bcp(); }
+  int       bci() const                          { return _last_frame.interpreter_frame_bci(); }
+  address   mdp() const                          { return _last_frame.interpreter_frame_mdp(); }
+
+  void      set_bcp(address bcp)                 { _last_frame.interpreter_frame_set_bcp(bcp); }
+  void      set_mdp(address dp)                  { _last_frame.interpreter_frame_set_mdp(dp); }
+
+  // pass method to avoid calling unsafe bcp_to_method (partial fix 4926272)
+  Bytecodes::Code code() const                   { return Bytecodes::code_at(method(), bcp()); }
+
+  Bytecode  bytecode() const                     { return Bytecode(method(), bcp()); }
+  int get_index_u1(Bytecodes::Code bc) const     { return bytecode().get_index_u1(bc); }
+  int get_index_u2(Bytecodes::Code bc) const     { return bytecode().get_index_u2(bc); }
+  int get_index_u2_cpcache(Bytecodes::Code bc) const
+                                                 { return bytecode().get_index_u2_cpcache(bc); }
+  int get_index_u4(Bytecodes::Code bc) const     { return bytecode().get_index_u4(bc); }
+  int number_of_dimensions() const               { return bcp()[3]; }
+  ConstantPoolCacheEntry* cache_entry_at(int i) const
+                                                 { return method()->constants()->cache()->entry_at(i); }
+  ConstantPoolCacheEntry* cache_entry() const    { return cache_entry_at(Bytes::get_native_u2(bcp() + 1)); }
+
+  oop callee_receiver(Symbol* signature) {
+    return _last_frame.interpreter_callee_receiver(signature);
+  }
+  BasicObjectLock* monitor_begin() const {
+    return _last_frame.interpreter_frame_monitor_begin();
+  }
+  BasicObjectLock* monitor_end() const {
+    return _last_frame.interpreter_frame_monitor_end();
+  }
+  BasicObjectLock* next_monitor(BasicObjectLock* current) const {
+    return _last_frame.next_monitor_in_interpreter_frame(current);
+  }
+
+  frame& get_frame()                             { return _last_frame; }
+};
+
+
+bool InterpreterRuntime::is_breakpoint(JavaThread *thread) {
+  return Bytecodes::code_or_bp_at(LastFrameAccessor(thread).bcp()) == Bytecodes::_breakpoint;
+}
+
 //------------------------------------------------------------------------------------------------------------------------
 // State accessors
 
--- a/src/hotspot/share/interpreter/interpreterRuntime.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/interpreter/interpreterRuntime.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -29,7 +29,7 @@
 #include "interpreter/linkResolver.hpp"
 #include "memory/universe.hpp"
 #include "oops/method.hpp"
-#include "runtime/frame.inline.hpp"
+#include "runtime/frame.hpp"
 #include "runtime/signature.hpp"
 #include "runtime/thread.hpp"
 #include "utilities/macros.hpp"
@@ -42,52 +42,6 @@
   friend class PrintingClosure; // for method and bcp
 
  private:
-  // Helper class to access current interpreter state
-  class LastFrameAccessor : public StackObj {
-    frame _last_frame;
-  public:
-    LastFrameAccessor(JavaThread* thread) {
-      assert(thread == Thread::current(), "sanity");
-      _last_frame = thread->last_frame();
-    }
-    bool is_interpreted_frame() const              { return _last_frame.is_interpreted_frame(); }
-    Method*   method() const                       { return _last_frame.interpreter_frame_method(); }
-    address   bcp() const                          { return _last_frame.interpreter_frame_bcp(); }
-    int       bci() const                          { return _last_frame.interpreter_frame_bci(); }
-    address   mdp() const                          { return _last_frame.interpreter_frame_mdp(); }
-
-    void      set_bcp(address bcp)                 { _last_frame.interpreter_frame_set_bcp(bcp); }
-    void      set_mdp(address dp)                  { _last_frame.interpreter_frame_set_mdp(dp); }
-
-    // pass method to avoid calling unsafe bcp_to_method (partial fix 4926272)
-    Bytecodes::Code code() const                   { return Bytecodes::code_at(method(), bcp()); }
-
-    Bytecode  bytecode() const                     { return Bytecode(method(), bcp()); }
-    int get_index_u1(Bytecodes::Code bc) const     { return bytecode().get_index_u1(bc); }
-    int get_index_u2(Bytecodes::Code bc) const     { return bytecode().get_index_u2(bc); }
-    int get_index_u2_cpcache(Bytecodes::Code bc) const
-                                                   { return bytecode().get_index_u2_cpcache(bc); }
-    int get_index_u4(Bytecodes::Code bc) const     { return bytecode().get_index_u4(bc); }
-    int number_of_dimensions() const               { return bcp()[3]; }
-    ConstantPoolCacheEntry* cache_entry_at(int i) const
-                                                   { return method()->constants()->cache()->entry_at(i); }
-    ConstantPoolCacheEntry* cache_entry() const    { return cache_entry_at(Bytes::get_native_u2(bcp() + 1)); }
-
-    oop callee_receiver(Symbol* signature) {
-      return _last_frame.interpreter_callee_receiver(signature);
-    }
-    BasicObjectLock* monitor_begin() const {
-      return _last_frame.interpreter_frame_monitor_begin();
-    }
-    BasicObjectLock* monitor_end() const {
-      return _last_frame.interpreter_frame_monitor_end();
-    }
-    BasicObjectLock* next_monitor(BasicObjectLock* current) const {
-      return _last_frame.next_monitor_in_interpreter_frame(current);
-    }
-
-    frame& get_frame()                             { return _last_frame; }
-  };
 
   static void      set_bcp_and_mdp(address bcp, JavaThread*thread);
   static void      note_trap_inner(JavaThread* thread, int reason,
@@ -172,7 +126,7 @@
   static void _breakpoint(JavaThread* thread, Method* method, address bcp);
   static Bytecodes::Code get_original_bytecode_at(JavaThread* thread, Method* method, address bcp);
   static void            set_original_bytecode_at(JavaThread* thread, Method* method, address bcp, Bytecodes::Code new_code);
-  static bool is_breakpoint(JavaThread *thread) { return Bytecodes::code_or_bp_at(LastFrameAccessor(thread).bcp()) == Bytecodes::_breakpoint; }
+  static bool is_breakpoint(JavaThread *thread);
 
   // Safepoints
   static void    at_safepoint(JavaThread* thread);
--- a/src/hotspot/share/interpreter/rewriter.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/interpreter/rewriter.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -31,6 +31,7 @@
 #include "memory/resourceArea.hpp"
 #include "oops/generateOopMap.hpp"
 #include "prims/methodHandles.hpp"
+#include "runtime/handles.inline.hpp"
 
 // Computes a CPC map (new_index -> original_index) for constant pool entries
 // that are referred to by the interpreter at runtime via the constant pool cache.
--- a/src/hotspot/share/interpreter/rewriter.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/interpreter/rewriter.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -26,7 +26,6 @@
 #define SHARE_VM_INTERPRETER_REWRITER_HPP
 
 #include "memory/allocation.hpp"
-#include "runtime/handles.inline.hpp"
 #include "utilities/growableArray.hpp"
 
 // The Rewriter adds caches to the constant pool and rewrites bytecode indices
--- a/src/hotspot/share/interpreter/templateInterpreterGenerator.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/interpreter/templateInterpreterGenerator.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -29,6 +29,7 @@
 #include "interpreter/templateInterpreter.hpp"
 #include "interpreter/templateInterpreterGenerator.hpp"
 #include "interpreter/templateTable.hpp"
+#include "oops/methodData.hpp"
 
 #ifndef CC_INTERP
 
--- a/src/hotspot/share/jvmci/compilerRuntime.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/jvmci/compilerRuntime.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -29,9 +29,10 @@
 #include "oops/cpCache.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/compilationPolicy.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/deoptimization.hpp"
 #include "runtime/interfaceSupport.inline.hpp"
-#include "runtime/vframe.hpp"
+#include "runtime/vframe.inline.hpp"
 #include "aot/aotLoader.hpp"
 
 // Resolve and allocate String
--- a/src/hotspot/share/jvmci/jvmciCompiler.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/jvmci/jvmciCompiler.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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,6 +34,7 @@
 #include "jvmci/jvmciRuntime.hpp"
 #include "runtime/compilationPolicy.hpp"
 #include "runtime/globals_extension.hpp"
+#include "runtime/handles.inline.hpp"
 
 JVMCICompiler* JVMCICompiler::_instance = NULL;
 elapsedTimer JVMCICompiler::_codeInstallTimer;
--- a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -36,6 +36,7 @@
 #include "jvmci/jvmciCompilerToVM.hpp"
 #include "jvmci/jvmciCodeInstaller.hpp"
 #include "jvmci/jvmciRuntime.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/interfaceSupport.inline.hpp"
 #include "runtime/jniHandles.inline.hpp"
 #include "runtime/timerTrace.hpp"
--- a/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -28,6 +28,7 @@
 #include "jvmci/jvmciRuntime.hpp"
 #include "jvmci/jvmciCompilerToVM.hpp"
 #include "jvmci/vmStructs_jvmci.hpp"
+#include "runtime/handles.inline.hpp"
 #include "utilities/resourceHash.hpp"
 
 
--- a/src/hotspot/share/jvmci/jvmciEnv.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/jvmci/jvmciEnv.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -29,7 +29,6 @@
 #include "classfile/vmSymbols.hpp"
 #include "code/codeCache.hpp"
 #include "code/scopeDesc.hpp"
-#include "runtime/sweeper.hpp"
 #include "compiler/compileBroker.hpp"
 #include "compiler/compileLog.hpp"
 #include "compiler/compilerOracle.hpp"
@@ -45,9 +44,11 @@
 #include "oops/objArrayKlass.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/jvmtiExport.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/init.hpp"
 #include "runtime/reflection.hpp"
 #include "runtime/sharedRuntime.hpp"
+#include "runtime/sweeper.hpp"
 #include "utilities/dtrace.hpp"
 #include "jvmci/jvmciRuntime.hpp"
 #include "jvmci/jvmciJavaClasses.hpp"
--- a/src/hotspot/share/jvmci/jvmciRuntime.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/jvmci/jvmciRuntime.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -26,6 +26,7 @@
 #include "asm/codeBuffer.hpp"
 #include "classfile/javaClasses.inline.hpp"
 #include "code/codeCache.hpp"
+#include "code/compiledMethod.inline.hpp"
 #include "compiler/compileBroker.hpp"
 #include "compiler/disassembler.hpp"
 #include "jvmci/jvmciRuntime.hpp"
@@ -40,6 +41,7 @@
 #include "oops/oop.inline.hpp"
 #include "oops/objArrayOop.inline.hpp"
 #include "runtime/biasedLocking.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/interfaceSupport.inline.hpp"
 #include "runtime/jniHandles.inline.hpp"
 #include "runtime/reflection.hpp"
--- a/src/hotspot/share/memory/metaspaceShared.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/memory/metaspaceShared.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -46,6 +46,7 @@
 #include "logging/logMessage.hpp"
 #include "memory/filemap.hpp"
 #include "memory/metaspace.hpp"
+#include "memory/metaspaceClosure.hpp"
 #include "memory/metaspaceShared.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/instanceClassLoaderKlass.hpp"
@@ -56,15 +57,15 @@
 #include "oops/oop.inline.hpp"
 #include "oops/typeArrayKlass.hpp"
 #include "prims/jvmtiRedefineClasses.hpp"
-#include "runtime/timerTrace.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/os.hpp"
 #include "runtime/signature.hpp"
+#include "runtime/timerTrace.hpp"
 #include "runtime/vmThread.hpp"
 #include "runtime/vm_operations.hpp"
 #include "utilities/align.hpp"
 #include "utilities/defaultStream.hpp"
 #include "utilities/hashtable.inline.hpp"
-#include "memory/metaspaceClosure.hpp"
 
 ReservedSpace MetaspaceShared::_shared_rs;
 VirtualSpace MetaspaceShared::_shared_vs;
@@ -1820,6 +1821,13 @@
                                                    os::vm_allocation_granularity());
 }
 
+unsigned MetaspaceShared::obj_hash(oop const& p) {
+  assert(!p->mark()->has_bias_pattern(),
+         "this object should never have been locked");  // so identity_hash won't safepoin
+  unsigned hash = (unsigned)p->identity_hash();
+  return hash;
+}
+
 MetaspaceShared::ArchivedObjectCache* MetaspaceShared::_archive_object_cache = NULL;
 oop MetaspaceShared::find_archived_heap_object(oop obj) {
   assert(DumpSharedSpaces, "dump-time only");
--- a/src/hotspot/share/memory/metaspaceShared.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/memory/metaspaceShared.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -29,7 +29,7 @@
 #include "memory/allocation.hpp"
 #include "memory/memRegion.hpp"
 #include "memory/virtualspace.hpp"
-#include "oops/oop.inline.hpp"
+#include "oops/oop.hpp"
 #include "utilities/exceptions.hpp"
 #include "utilities/macros.hpp"
 #include "utilities/resourceHash.hpp"
@@ -96,12 +96,8 @@
   static bool obj_equals(oop const& p1, oop const& p2) {
     return p1 == p2;
   }
-  static unsigned obj_hash(oop const& p) {
-    assert(!p->mark()->has_bias_pattern(),
-           "this object should never have been locked");  // so identity_hash won't safepoin
-    unsigned hash = (unsigned)p->identity_hash();
-    return hash;
-  }
+  static unsigned obj_hash(oop const& p);
+
   typedef ResourceHashtable<oop, oop,
       MetaspaceShared::obj_hash,
       MetaspaceShared::obj_equals,
--- a/src/hotspot/share/oops/annotations.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/oops/annotations.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -27,7 +27,6 @@
 
 #include "oops/array.hpp"
 #include "oops/metadata.hpp"
-#include "runtime/handles.hpp"
 #include "utilities/exceptions.hpp"
 #include "utilities/globalDefinitions.hpp"
 
--- a/src/hotspot/share/oops/constantPool.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/oops/constantPool.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -51,7 +51,7 @@
 #include "runtime/init.hpp"
 #include "runtime/javaCalls.hpp"
 #include "runtime/signature.hpp"
-#include "runtime/vframe.hpp"
+#include "runtime/vframe.inline.hpp"
 #include "utilities/copy.hpp"
 
 constantTag ConstantPool::tag_at(int which) const { return (constantTag)tags()->at_acquire(which); }
--- a/src/hotspot/share/oops/method.inline.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/oops/method.inline.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -26,7 +26,7 @@
 #define SHARE_VM_OOPS_METHOD_INLINE_HPP
 
 #include "oops/method.hpp"
-#include "runtime/orderAccess.hpp"
+#include "runtime/orderAccess.inline.hpp"
 
 inline address Method::from_compiled_entry() const {
   return OrderAccess::load_acquire(&_from_compiled_entry);
--- a/src/hotspot/share/oops/methodData.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/oops/methodData.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -27,6 +27,7 @@
 
 #include "interpreter/bytecodes.hpp"
 #include "memory/universe.hpp"
+#include "oops/metadata.hpp"
 #include "oops/method.hpp"
 #include "oops/oop.hpp"
 #include "utilities/align.hpp"
--- a/src/hotspot/share/oops/typeArrayOop.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/oops/typeArrayOop.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -27,7 +27,6 @@
 
 #include "oops/arrayOop.hpp"
 #include "oops/typeArrayKlass.hpp"
-#include "runtime/orderAccess.inline.hpp"
 
 // A typeArrayOop is an array containing basic types (non oop elements).
 // It is used for arrays of {characters, singles, doubles, bytes, shorts, integers, longs}
--- a/src/hotspot/share/opto/callnode.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/opto/callnode.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -26,6 +26,7 @@
 #include "compiler/compileLog.hpp"
 #include "ci/bcEscapeAnalyzer.hpp"
 #include "compiler/oopMap.hpp"
+#include "interpreter/interpreter.hpp"
 #include "opto/callGenerator.hpp"
 #include "opto/callnode.hpp"
 #include "opto/castnode.hpp"
--- a/src/hotspot/share/opto/compile.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/opto/compile.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -34,6 +34,7 @@
 #include "libadt/dict.hpp"
 #include "libadt/vectset.hpp"
 #include "memory/resourceArea.hpp"
+#include "oops/methodData.hpp"
 #include "opto/idealGraphPrinter.hpp"
 #include "opto/phasetype.hpp"
 #include "opto/phase.hpp"
--- a/src/hotspot/share/opto/graphKit.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/opto/graphKit.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -32,6 +32,7 @@
 #include "gc/shared/cardTable.hpp"
 #include "gc/shared/cardTableBarrierSet.hpp"
 #include "gc/shared/collectedHeap.hpp"
+#include "interpreter/interpreter.hpp"
 #include "memory/resourceArea.hpp"
 #include "opto/addnode.hpp"
 #include "opto/castnode.hpp"
--- a/src/hotspot/share/opto/lcm.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/opto/lcm.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "asm/macroAssembler.inline.hpp"
 #include "memory/allocation.inline.hpp"
 #include "opto/ad.hpp"
 #include "opto/block.hpp"
--- a/src/hotspot/share/opto/output.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/opto/output.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "asm/assembler.inline.hpp"
+#include "asm/macroAssembler.inline.hpp"
 #include "code/compiledIC.hpp"
 #include "code/debugInfo.hpp"
 #include "code/debugInfoRec.hpp"
--- a/src/hotspot/share/opto/runtime.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/opto/runtime.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -26,6 +26,7 @@
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
 #include "code/codeCache.hpp"
+#include "code/compiledMethod.inline.hpp"
 #include "code/compiledIC.hpp"
 #include "code/icBuffer.hpp"
 #include "code/nmethod.hpp"
@@ -60,6 +61,7 @@
 #include "opto/runtime.hpp"
 #include "opto/subnode.hpp"
 #include "runtime/atomic.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/interfaceSupport.inline.hpp"
 #include "runtime/javaCalls.hpp"
--- a/src/hotspot/share/prims/forte.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/prims/forte.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -30,9 +30,10 @@
 #include "memory/universe.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/forte.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/javaCalls.hpp"
 #include "runtime/thread.inline.hpp"
-#include "runtime/vframe.hpp"
+#include "runtime/vframe.inline.hpp"
 #include "runtime/vframeArray.hpp"
 
 // call frame copied from old .h file and renamed
--- a/src/hotspot/share/prims/jvm.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/prims/jvm.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -68,7 +68,7 @@
 #include "runtime/reflection.hpp"
 #include "runtime/thread.inline.hpp"
 #include "runtime/threadSMR.hpp"
-#include "runtime/vframe.hpp"
+#include "runtime/vframe.inline.hpp"
 #include "runtime/vm_operations.hpp"
 #include "runtime/vm_version.hpp"
 #include "services/attachListener.hpp"
--- a/src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -27,6 +27,7 @@
 #include "interpreter/bytecodeStream.hpp"
 #include "oops/fieldStreams.hpp"
 #include "prims/jvmtiClassFileReconstituter.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/signature.hpp"
 #include "utilities/bytes.hpp"
 
--- a/src/hotspot/share/prims/jvmtiEnv.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/prims/jvmtiEnv.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -59,13 +59,14 @@
 #include "runtime/javaCalls.hpp"
 #include "runtime/jfieldIDWorkaround.hpp"
 #include "runtime/jniHandles.inline.hpp"
+#include "runtime/objectMonitor.inline.hpp"
 #include "runtime/osThread.hpp"
 #include "runtime/reflectionUtils.hpp"
 #include "runtime/signature.hpp"
 #include "runtime/thread.inline.hpp"
 #include "runtime/threadSMR.hpp"
 #include "runtime/timerTrace.hpp"
-#include "runtime/vframe.hpp"
+#include "runtime/vframe.inline.hpp"
 #include "runtime/vmThread.hpp"
 #include "services/threadService.hpp"
 #include "utilities/exceptions.hpp"
--- a/src/hotspot/share/prims/jvmtiEnvBase.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/prims/jvmtiEnvBase.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -38,6 +38,7 @@
 #include "prims/jvmtiThreadState.inline.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/deoptimization.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/interfaceSupport.inline.hpp"
 #include "runtime/jfieldIDWorkaround.hpp"
 #include "runtime/jniHandles.inline.hpp"
--- a/src/hotspot/share/prims/jvmtiEnvBase.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/prims/jvmtiEnvBase.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -29,11 +29,9 @@
 #include "prims/jvmtiEnvThreadState.hpp"
 #include "prims/jvmtiEventController.hpp"
 #include "prims/jvmtiThreadState.hpp"
-#include "prims/jvmtiThreadState.inline.hpp"
 #include "oops/oopHandle.hpp"
 #include "runtime/fieldDescriptor.hpp"
 #include "runtime/frame.hpp"
-#include "runtime/handles.inline.hpp"
 #include "runtime/thread.hpp"
 #include "runtime/vm_operations.hpp"
 #include "utilities/growableArray.hpp"
--- a/src/hotspot/share/prims/jvmtiExport.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/prims/jvmtiExport.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -56,7 +56,7 @@
 #include "runtime/os.inline.hpp"
 #include "runtime/thread.inline.hpp"
 #include "runtime/threadSMR.hpp"
-#include "runtime/vframe.hpp"
+#include "runtime/vframe.inline.hpp"
 #include "utilities/macros.hpp"
 #if INCLUDE_ALL_GCS
 #include "gc/parallel/psMarkSweep.hpp"
--- a/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -27,6 +27,7 @@
 #include "gc/shared/collectedHeap.hpp"
 #include "memory/universe.hpp"
 #include "prims/jvmtiGetLoadedClasses.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/jniHandles.inline.hpp"
 #include "runtime/thread.hpp"
 #include "utilities/stack.inline.hpp"
--- a/src/hotspot/share/prims/jvmtiImpl.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/prims/jvmtiImpl.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -39,7 +39,7 @@
 #include "prims/jvmtiRedefineClasses.hpp"
 #include "runtime/atomic.hpp"
 #include "runtime/deoptimization.hpp"
-#include "runtime/handles.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/interfaceSupport.inline.hpp"
 #include "runtime/javaCalls.hpp"
--- a/src/hotspot/share/prims/jvmtiRedefineClasses.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/prims/jvmtiRedefineClasses.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -47,6 +47,7 @@
 #include "prims/resolvedMethodTable.hpp"
 #include "prims/methodComparator.hpp"
 #include "runtime/deoptimization.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/jniHandles.inline.hpp"
 #include "runtime/relocator.hpp"
 #include "utilities/bitMap.inline.hpp"
--- a/src/hotspot/share/prims/jvmtiTagMap.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/prims/jvmtiTagMap.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -45,6 +45,8 @@
 #include "prims/jvmtiImpl.hpp"
 #include "prims/jvmtiTagMap.hpp"
 #include "runtime/biasedLocking.hpp"
+#include "runtime/frame.inline.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/javaCalls.hpp"
 #include "runtime/jniHandles.inline.hpp"
 #include "runtime/mutex.hpp"
--- a/src/hotspot/share/prims/methodHandles.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/prims/methodHandles.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -27,12 +27,13 @@
 
 #include "classfile/javaClasses.hpp"
 #include "classfile/vmSymbols.hpp"
-#include "runtime/frame.inline.hpp"
+#include "runtime/frame.hpp"
 #include "runtime/globals.hpp"
 #include "utilities/macros.hpp"
 
 #ifdef ZERO
 # include "entry_zero.hpp"
+# include "interpreter/interpreter.hpp"
 #endif
 
 
--- a/src/hotspot/share/prims/privilegedStack.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/prims/privilegedStack.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -28,7 +28,7 @@
 #include "oops/method.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/privilegedStack.hpp"
-#include "runtime/vframe.hpp"
+#include "runtime/vframe.inline.hpp"
 
 void PrivilegedElement::initialize(vframeStream* vfst, oop context, PrivilegedElement* next, TRAPS) {
   Method* method        = vfst->method();
--- a/src/hotspot/share/prims/stackwalk.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/prims/stackwalk.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -35,7 +35,7 @@
 #include "runtime/globals.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/javaCalls.hpp"
-#include "runtime/vframe.hpp"
+#include "runtime/vframe.inline.hpp"
 #include "utilities/globalDefinitions.hpp"
 
 // setup and cleanup actions
@@ -64,6 +64,8 @@
   _need_method_info = StackWalk::need_method_info(mode);
 }
 
+void JavaFrameStream::next() { _vfst.next();}
+
 // Returns the BaseFrameStream for the current stack being traversed.
 //
 // Parameters:
--- a/src/hotspot/share/prims/stackwalk.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/prims/stackwalk.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -80,7 +80,7 @@
 public:
   JavaFrameStream(JavaThread* thread, int mode);
 
-  void next()      { _vfst.next();}
+  void next();
   bool at_end()    { return _vfst.at_end(); }
 
   Method* method() { return _vfst.method(); }
--- a/src/hotspot/share/prims/whitebox.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/prims/whitebox.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -51,6 +51,7 @@
 #include "runtime/arguments.hpp"
 #include "runtime/compilationPolicy.hpp"
 #include "runtime/deoptimization.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/handshake.hpp"
 #include "runtime/interfaceSupport.inline.hpp"
 #include "runtime/javaCalls.hpp"
--- a/src/hotspot/share/runtime/advancedThresholdPolicy.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/runtime/advancedThresholdPolicy.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "code/codeCache.hpp"
 #include "runtime/advancedThresholdPolicy.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/simpleThresholdPolicy.inline.hpp"
 #if INCLUDE_JVMCI
 #include "jvmci/jvmciRuntime.hpp"
--- a/src/hotspot/share/runtime/deoptimization.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/runtime/deoptimization.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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 "runtime/biasedLocking.hpp"
 #include "runtime/compilationPolicy.hpp"
 #include "runtime/deoptimization.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/interfaceSupport.inline.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/signature.hpp"
--- a/src/hotspot/share/runtime/deoptimization.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/runtime/deoptimization.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -26,7 +26,7 @@
 #define SHARE_VM_RUNTIME_DEOPTIMIZATION_HPP
 
 #include "memory/allocation.hpp"
-#include "runtime/frame.inline.hpp"
+#include "runtime/frame.hpp"
 
 class ProfileData;
 class vframeArray;
--- a/src/hotspot/share/runtime/frame.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/runtime/frame.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -269,7 +269,6 @@
   // expression stack (may go up or down, direction == 1 or -1)
  public:
   intptr_t* interpreter_frame_expression_stack() const;
-  static  jint  interpreter_frame_expression_stack_direction();
 
   // The _at version returns a pointer because the address is used for GC.
   intptr_t* interpreter_frame_expression_stack_at(jint offset) const;
@@ -462,7 +461,7 @@
    StackFrameStream(JavaThread *thread, bool update = true);
 
   // Iteration
-  bool is_done()                  { return (_is_done) ? true : (_is_done = _fr.is_first_frame(), false); }
+  inline bool is_done();
   void next()                     { if (!_is_done) _fr = _fr.sender(&_reg_map); }
 
   // Query
--- a/src/hotspot/share/runtime/frame.inline.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/runtime/frame.inline.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -63,4 +63,8 @@
   }
 }
 
+inline bool StackFrameStream::is_done() {
+  return (_is_done) ? true : (_is_done = _fr.is_first_frame(), false);
+}
+
 #endif // SHARE_VM_RUNTIME_FRAME_INLINE_HPP
--- a/src/hotspot/share/runtime/interfaceSupport.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/runtime/interfaceSupport.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -28,6 +28,7 @@
 #include "gc/shared/genCollectedHeap.hpp"
 #include "memory/resourceArea.hpp"
 #include "runtime/atomic.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/init.hpp"
 #include "runtime/interfaceSupport.inline.hpp"
@@ -35,6 +36,7 @@
 #include "runtime/os.inline.hpp"
 #include "runtime/thread.inline.hpp"
 #include "runtime/vframe.hpp"
+#include "runtime/vmThread.hpp"
 #include "utilities/preserveException.hpp"
 
 // Implementation of InterfaceSupport
--- a/src/hotspot/share/runtime/javaFrameAnchor.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/runtime/javaFrameAnchor.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -25,7 +25,6 @@
 #ifndef SHARE_VM_RUNTIME_JAVAFRAMEANCHOR_HPP
 #define SHARE_VM_RUNTIME_JAVAFRAMEANCHOR_HPP
 
-#include "runtime/orderAccess.inline.hpp"
 #include "utilities/globalDefinitions.hpp"
 #include "utilities/macros.hpp"
 
@@ -33,6 +32,7 @@
 // An object for encapsulating the machine/os dependent part of a JavaThread frame state
 //
 class JavaThread;
+class MacroAssembler;
 
 class JavaFrameAnchor {
 // Too many friends...
--- a/src/hotspot/share/runtime/reflection.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/runtime/reflection.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -47,7 +47,7 @@
 #include "runtime/reflection.hpp"
 #include "runtime/reflectionUtils.hpp"
 #include "runtime/signature.hpp"
-#include "runtime/vframe.hpp"
+#include "runtime/vframe.inline.hpp"
 
 static void trace_class_resolution(const Klass* to_class) {
   ResourceMark rm;
--- a/src/hotspot/share/runtime/rframe.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/runtime/rframe.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, 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
@@ -26,7 +26,7 @@
 #define SHARE_VM_RUNTIME_RFRAME_HPP
 
 #include "memory/allocation.hpp"
-#include "runtime/frame.inline.hpp"
+#include "runtime/frame.hpp"
 
 // rframes ("recompiler frames") decorate stack frames with some extra information
 // needed by the recompiler.  The recompiler views the stack (at the time of recompilation)
--- a/src/hotspot/share/runtime/sharedRuntime.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/runtime/sharedRuntime.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "jvm.h"
 #include "aot/aotLoader.hpp"
+#include "code/compiledMethod.inline.hpp"
 #include "classfile/stringTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
@@ -54,6 +55,7 @@
 #include "runtime/atomic.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/compilationPolicy.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/init.hpp"
 #include "runtime/interfaceSupport.inline.hpp"
@@ -61,7 +63,7 @@
 #include "runtime/javaCalls.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/stubRoutines.hpp"
-#include "runtime/vframe.hpp"
+#include "runtime/vframe.inline.hpp"
 #include "runtime/vframeArray.hpp"
 #include "trace/tracing.hpp"
 #include "utilities/copy.hpp"
--- a/src/hotspot/share/runtime/simpleThresholdPolicy.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/runtime/simpleThresholdPolicy.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -27,6 +27,7 @@
 #include "gc/shared/gcLocker.hpp"
 #include "memory/resourceArea.hpp"
 #include "runtime/arguments.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/simpleThresholdPolicy.hpp"
 #include "runtime/simpleThresholdPolicy.inline.hpp"
 #include "code/scopeDesc.hpp"
--- a/src/hotspot/share/runtime/sweeper.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/runtime/sweeper.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -42,6 +42,7 @@
 #include "runtime/sweeper.hpp"
 #include "runtime/thread.inline.hpp"
 #include "runtime/vm_operations.hpp"
+#include "runtime/vmThread.hpp"
 #include "trace/tracing.hpp"
 #include "utilities/events.hpp"
 #include "utilities/ticks.inline.hpp"
--- a/src/hotspot/share/runtime/synchronizer.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/runtime/synchronizer.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -43,6 +43,7 @@
 #include "runtime/synchronizer.hpp"
 #include "runtime/thread.inline.hpp"
 #include "runtime/vframe.hpp"
+#include "runtime/vmThread.hpp"
 #include "trace/traceMacros.hpp"
 #include "trace/tracing.hpp"
 #include "utilities/align.hpp"
--- a/src/hotspot/share/runtime/thread.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/runtime/thread.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -92,7 +92,7 @@
 #include "runtime/threadSMR.inline.hpp"
 #include "runtime/timer.hpp"
 #include "runtime/timerTrace.hpp"
-#include "runtime/vframe.hpp"
+#include "runtime/vframe.inline.hpp"
 #include "runtime/vframeArray.hpp"
 #include "runtime/vframe_hp.hpp"
 #include "runtime/vmThread.hpp"
--- a/src/hotspot/share/runtime/thread.inline.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/runtime/thread.inline.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -26,6 +26,7 @@
 #define SHARE_VM_RUNTIME_THREAD_INLINE_HPP
 
 #include "runtime/atomic.hpp"
+#include "runtime/orderAccess.inline.hpp"
 #include "runtime/os.inline.hpp"
 #include "runtime/thread.hpp"
 
--- a/src/hotspot/share/runtime/vframe.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/runtime/vframe.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -36,13 +36,14 @@
 #include "memory/resourceArea.hpp"
 #include "oops/instanceKlass.hpp"
 #include "oops/oop.inline.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/objectMonitor.hpp"
 #include "runtime/objectMonitor.inline.hpp"
 #include "runtime/signature.hpp"
 #include "runtime/stubRoutines.hpp"
 #include "runtime/synchronizer.hpp"
-#include "runtime/vframe.hpp"
+#include "runtime/vframe.inline.hpp"
 #include "runtime/vframeArray.hpp"
 #include "runtime/vframe_hp.hpp"
 
--- a/src/hotspot/share/runtime/vframe.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/runtime/vframe.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -30,7 +30,6 @@
 #include "code/location.hpp"
 #include "oops/oop.hpp"
 #include "runtime/frame.hpp"
-#include "runtime/frame.inline.hpp"
 #include "runtime/stackValue.hpp"
 #include "runtime/stackValueCollection.hpp"
 #include "utilities/growableArray.hpp"
@@ -307,14 +306,12 @@
 
  public:
   // Constructor
-  vframeStreamCommon(JavaThread* thread) : _reg_map(thread, false) {
-    _thread = thread;
-  }
+  inline vframeStreamCommon(JavaThread* thread);
 
   // Accessors
   Method* method() const { return _method; }
   int bci() const { return _bci; }
-  intptr_t* frame_id() const { return _frame.id(); }
+  inline intptr_t* frame_id() const;
   address frame_pc() const { return _frame.pc(); }
 
   CodeBlob*          cb()         const { return _frame.cb();  }
@@ -324,19 +321,11 @@
   }
 
   // Frame type
-  bool is_interpreted_frame() const { return _frame.is_interpreted_frame(); }
-  bool is_entry_frame() const       { return _frame.is_entry_frame(); }
+  inline bool is_interpreted_frame() const;
+  inline bool is_entry_frame() const;
 
   // Iteration
-  void next() {
-    // handle frames with inlining
-    if (_mode == compiled_mode    && fill_in_compiled_inlined_sender()) return;
-
-    // handle general case
-    do {
-      _frame = _frame.sender(&_reg_map);
-    } while (!fill_from_frame());
-  }
+  inline void next();
   void security_next();
 
   bool at_end() const { return _mode == at_end_mode; }
@@ -353,182 +342,10 @@
 class vframeStream : public vframeStreamCommon {
  public:
   // Constructors
-  vframeStream(JavaThread* thread, bool stop_at_java_call_stub = false)
-    : vframeStreamCommon(thread) {
-    _stop_at_java_call_stub = stop_at_java_call_stub;
-
-    if (!thread->has_last_Java_frame()) {
-      _mode = at_end_mode;
-      return;
-    }
-
-    _frame = _thread->last_frame();
-    while (!fill_from_frame()) {
-      _frame = _frame.sender(&_reg_map);
-    }
-  }
+  vframeStream(JavaThread* thread, bool stop_at_java_call_stub = false);
 
   // top_frame may not be at safepoint, start with sender
   vframeStream(JavaThread* thread, frame top_frame, bool stop_at_java_call_stub = false);
 };
 
-
-inline bool vframeStreamCommon::fill_in_compiled_inlined_sender() {
-  if (_sender_decode_offset == DebugInformationRecorder::serialized_null) {
-    return false;
-  }
-  fill_from_compiled_frame(_sender_decode_offset);
-  return true;
-}
-
-
-inline void vframeStreamCommon::fill_from_compiled_frame(int decode_offset) {
-  _mode = compiled_mode;
-
-  // Range check to detect ridiculous offsets.
-  if (decode_offset == DebugInformationRecorder::serialized_null ||
-      decode_offset < 0 ||
-      decode_offset >= nm()->scopes_data_size()) {
-    // 6379830 AsyncGetCallTrace sometimes feeds us wild frames.
-    // If we read nmethod::scopes_data at serialized_null (== 0)
-    // or if read some at other invalid offset, invalid values will be decoded.
-    // Based on these values, invalid heap locations could be referenced
-    // that could lead to crashes in product mode.
-    // Therefore, do not use the decode offset if invalid, but fill the frame
-    // as it were a native compiled frame (no Java-level assumptions).
-#ifdef ASSERT
-    if (WizardMode) {
-      ttyLocker ttyl;
-      tty->print_cr("Error in fill_from_frame: pc_desc for "
-                    INTPTR_FORMAT " not found or invalid at %d",
-                    p2i(_frame.pc()), decode_offset);
-      nm()->print();
-      nm()->method()->print_codes();
-      nm()->print_code();
-      nm()->print_pcs();
-    }
-    found_bad_method_frame();
-#endif
-    // Provide a cheap fallback in product mode.  (See comment above.)
-    fill_from_compiled_native_frame();
-    return;
-  }
-
-  // Decode first part of scopeDesc
-  DebugInfoReadStream buffer(nm(), decode_offset);
-  _sender_decode_offset = buffer.read_int();
-  _method               = buffer.read_method();
-  _bci                  = buffer.read_bci();
-
-  assert(_method->is_method(), "checking type of decoded method");
-}
-
-// The native frames are handled specially. We do not rely on ScopeDesc info
-// since the pc might not be exact due to the _last_native_pc trick.
-inline void vframeStreamCommon::fill_from_compiled_native_frame() {
-  _mode = compiled_mode;
-  _sender_decode_offset = DebugInformationRecorder::serialized_null;
-  _method = nm()->method();
-  _bci = 0;
-}
-
-inline bool vframeStreamCommon::fill_from_frame() {
-  // Interpreted frame
-  if (_frame.is_interpreted_frame()) {
-    fill_from_interpreter_frame();
-    return true;
-  }
-
-  // Compiled frame
-
-  if (cb() != NULL && cb()->is_compiled()) {
-    if (nm()->is_native_method()) {
-      // Do not rely on scopeDesc since the pc might be unprecise due to the _last_native_pc trick.
-      fill_from_compiled_native_frame();
-    } else {
-      PcDesc* pc_desc = nm()->pc_desc_at(_frame.pc());
-      int decode_offset;
-      if (pc_desc == NULL) {
-        // Should not happen, but let fill_from_compiled_frame handle it.
-
-        // If we are trying to walk the stack of a thread that is not
-        // at a safepoint (like AsyncGetCallTrace would do) then this is an
-        // acceptable result. [ This is assuming that safe_for_sender
-        // is so bullet proof that we can trust the frames it produced. ]
-        //
-        // So if we see that the thread is not safepoint safe
-        // then simply produce the method and a bci of zero
-        // and skip the possibility of decoding any inlining that
-        // may be present. That is far better than simply stopping (or
-        // asserting. If however the thread is safepoint safe this
-        // is the sign of a compiler bug  and we'll let
-        // fill_from_compiled_frame handle it.
-
-
-        JavaThreadState state = _thread->thread_state();
-
-        // in_Java should be good enough to test safepoint safety
-        // if state were say in_Java_trans then we'd expect that
-        // the pc would have already been slightly adjusted to
-        // one that would produce a pcDesc since the trans state
-        // would be one that might in fact anticipate a safepoint
-
-        if (state == _thread_in_Java ) {
-          // This will get a method a zero bci and no inlining.
-          // Might be nice to have a unique bci to signify this
-          // particular case but for now zero will do.
-
-          fill_from_compiled_native_frame();
-
-          // There is something to be said for setting the mode to
-          // at_end_mode to prevent trying to walk further up the
-          // stack. There is evidence that if we walk any further
-          // that we could produce a bad stack chain. However until
-          // we see evidence that allowing this causes us to find
-          // frames bad enough to cause segv's or assertion failures
-          // we don't do it as while we may get a bad call chain the
-          // probability is much higher (several magnitudes) that we
-          // get good data.
-
-          return true;
-        }
-        decode_offset = DebugInformationRecorder::serialized_null;
-      } else {
-        decode_offset = pc_desc->scope_decode_offset();
-      }
-      fill_from_compiled_frame(decode_offset);
-    }
-    return true;
-  }
-
-  // End of stack?
-  if (_frame.is_first_frame() || (_stop_at_java_call_stub && _frame.is_entry_frame())) {
-    _mode = at_end_mode;
-    return true;
-  }
-
-  return false;
-}
-
-
-inline void vframeStreamCommon::fill_from_interpreter_frame() {
-  Method* method = _frame.interpreter_frame_method();
-  address   bcp    = _frame.interpreter_frame_bcp();
-  int       bci    = method->validate_bci_from_bcp(bcp);
-  // 6379830 AsyncGetCallTrace sometimes feeds us wild frames.
-  // AsyncGetCallTrace interrupts the VM asynchronously. As a result
-  // it is possible to access an interpreter frame for which
-  // no Java-level information is yet available (e.g., becasue
-  // the frame was being created when the VM interrupted it).
-  // In this scenario, pretend that the interpreter is at the point
-  // of entering the method.
-  if (bci < 0) {
-    DEBUG_ONLY(found_bad_method_frame();)
-    bci = 0;
-  }
-  _mode   = interpreted_mode;
-  _method = method;
-  _bci    = bci;
-}
-
 #endif // SHARE_VM_RUNTIME_VFRAME_HPP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/share/runtime/vframe.inline.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -0,0 +1,224 @@
+/*
+ * 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_RUNTIME_VFRAME_INLINE_HPP
+#define SHARE_VM_RUNTIME_VFRAME_INLINE_HPP
+
+#include "runtime/frame.inline.hpp"
+#include "runtime/vframe.hpp"
+
+inline vframeStreamCommon::vframeStreamCommon(JavaThread* thread) : _reg_map(thread, false) {
+  _thread = thread;
+}
+
+inline intptr_t* vframeStreamCommon::frame_id() const        { return _frame.id(); }
+
+inline bool vframeStreamCommon::is_interpreted_frame() const { return _frame.is_interpreted_frame(); }
+
+inline bool vframeStreamCommon::is_entry_frame() const       { return _frame.is_entry_frame(); }
+
+inline void vframeStreamCommon::next() {
+  // handle frames with inlining
+  if (_mode == compiled_mode    && fill_in_compiled_inlined_sender()) return;
+
+  // handle general case
+  do {
+    _frame = _frame.sender(&_reg_map);
+  } while (!fill_from_frame());
+}
+
+inline vframeStream::vframeStream(JavaThread* thread, bool stop_at_java_call_stub)
+  : vframeStreamCommon(thread) {
+  _stop_at_java_call_stub = stop_at_java_call_stub;
+
+  if (!thread->has_last_Java_frame()) {
+    _mode = at_end_mode;
+    return;
+  }
+
+  _frame = _thread->last_frame();
+  while (!fill_from_frame()) {
+    _frame = _frame.sender(&_reg_map);
+  }
+}
+
+inline bool vframeStreamCommon::fill_in_compiled_inlined_sender() {
+  if (_sender_decode_offset == DebugInformationRecorder::serialized_null) {
+    return false;
+  }
+  fill_from_compiled_frame(_sender_decode_offset);
+  return true;
+}
+
+
+inline void vframeStreamCommon::fill_from_compiled_frame(int decode_offset) {
+  _mode = compiled_mode;
+
+  // Range check to detect ridiculous offsets.
+  if (decode_offset == DebugInformationRecorder::serialized_null ||
+      decode_offset < 0 ||
+      decode_offset >= nm()->scopes_data_size()) {
+    // 6379830 AsyncGetCallTrace sometimes feeds us wild frames.
+    // If we read nmethod::scopes_data at serialized_null (== 0)
+    // or if read some at other invalid offset, invalid values will be decoded.
+    // Based on these values, invalid heap locations could be referenced
+    // that could lead to crashes in product mode.
+    // Therefore, do not use the decode offset if invalid, but fill the frame
+    // as it were a native compiled frame (no Java-level assumptions).
+#ifdef ASSERT
+    if (WizardMode) {
+      ttyLocker ttyl;
+      tty->print_cr("Error in fill_from_frame: pc_desc for "
+                    INTPTR_FORMAT " not found or invalid at %d",
+                    p2i(_frame.pc()), decode_offset);
+      nm()->print();
+      nm()->method()->print_codes();
+      nm()->print_code();
+      nm()->print_pcs();
+    }
+    found_bad_method_frame();
+#endif
+    // Provide a cheap fallback in product mode.  (See comment above.)
+    fill_from_compiled_native_frame();
+    return;
+  }
+
+  // Decode first part of scopeDesc
+  DebugInfoReadStream buffer(nm(), decode_offset);
+  _sender_decode_offset = buffer.read_int();
+  _method               = buffer.read_method();
+  _bci                  = buffer.read_bci();
+
+  assert(_method->is_method(), "checking type of decoded method");
+}
+
+// The native frames are handled specially. We do not rely on ScopeDesc info
+// since the pc might not be exact due to the _last_native_pc trick.
+inline void vframeStreamCommon::fill_from_compiled_native_frame() {
+  _mode = compiled_mode;
+  _sender_decode_offset = DebugInformationRecorder::serialized_null;
+  _method = nm()->method();
+  _bci = 0;
+}
+
+inline bool vframeStreamCommon::fill_from_frame() {
+  // Interpreted frame
+  if (_frame.is_interpreted_frame()) {
+    fill_from_interpreter_frame();
+    return true;
+  }
+
+  // Compiled frame
+
+  if (cb() != NULL && cb()->is_compiled()) {
+    if (nm()->is_native_method()) {
+      // Do not rely on scopeDesc since the pc might be unprecise due to the _last_native_pc trick.
+      fill_from_compiled_native_frame();
+    } else {
+      PcDesc* pc_desc = nm()->pc_desc_at(_frame.pc());
+      int decode_offset;
+      if (pc_desc == NULL) {
+        // Should not happen, but let fill_from_compiled_frame handle it.
+
+        // If we are trying to walk the stack of a thread that is not
+        // at a safepoint (like AsyncGetCallTrace would do) then this is an
+        // acceptable result. [ This is assuming that safe_for_sender
+        // is so bullet proof that we can trust the frames it produced. ]
+        //
+        // So if we see that the thread is not safepoint safe
+        // then simply produce the method and a bci of zero
+        // and skip the possibility of decoding any inlining that
+        // may be present. That is far better than simply stopping (or
+        // asserting. If however the thread is safepoint safe this
+        // is the sign of a compiler bug  and we'll let
+        // fill_from_compiled_frame handle it.
+
+
+        JavaThreadState state = _thread->thread_state();
+
+        // in_Java should be good enough to test safepoint safety
+        // if state were say in_Java_trans then we'd expect that
+        // the pc would have already been slightly adjusted to
+        // one that would produce a pcDesc since the trans state
+        // would be one that might in fact anticipate a safepoint
+
+        if (state == _thread_in_Java ) {
+          // This will get a method a zero bci and no inlining.
+          // Might be nice to have a unique bci to signify this
+          // particular case but for now zero will do.
+
+          fill_from_compiled_native_frame();
+
+          // There is something to be said for setting the mode to
+          // at_end_mode to prevent trying to walk further up the
+          // stack. There is evidence that if we walk any further
+          // that we could produce a bad stack chain. However until
+          // we see evidence that allowing this causes us to find
+          // frames bad enough to cause segv's or assertion failures
+          // we don't do it as while we may get a bad call chain the
+          // probability is much higher (several magnitudes) that we
+          // get good data.
+
+          return true;
+        }
+        decode_offset = DebugInformationRecorder::serialized_null;
+      } else {
+        decode_offset = pc_desc->scope_decode_offset();
+      }
+      fill_from_compiled_frame(decode_offset);
+    }
+    return true;
+  }
+
+  // End of stack?
+  if (_frame.is_first_frame() || (_stop_at_java_call_stub && _frame.is_entry_frame())) {
+    _mode = at_end_mode;
+    return true;
+  }
+
+  return false;
+}
+
+
+inline void vframeStreamCommon::fill_from_interpreter_frame() {
+  Method* method = _frame.interpreter_frame_method();
+  address   bcp    = _frame.interpreter_frame_bcp();
+  int       bci    = method->validate_bci_from_bcp(bcp);
+  // 6379830 AsyncGetCallTrace sometimes feeds us wild frames.
+  // AsyncGetCallTrace interrupts the VM asynchronously. As a result
+  // it is possible to access an interpreter frame for which
+  // no Java-level information is yet available (e.g., becasue
+  // the frame was being created when the VM interrupted it).
+  // In this scenario, pretend that the interpreter is at the point
+  // of entering the method.
+  if (bci < 0) {
+    DEBUG_ONLY(found_bad_method_frame();)
+    bci = 0;
+  }
+  _mode   = interpreted_mode;
+  _method = method;
+  _bci    = bci;
+}
+
+#endif // SHARE_VM_RUNTIME_VFRAME_INLINE_HPP
--- a/src/hotspot/share/runtime/vframeArray.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/runtime/vframeArray.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -33,6 +33,7 @@
 #include "oops/methodData.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/jvmtiThreadState.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/monitorChunk.hpp"
 #include "runtime/sharedRuntime.hpp"
@@ -489,6 +490,9 @@
 }
 
 
+intptr_t* vframeArray::unextended_sp() const {
+  return _original.unextended_sp();
+}
 
 vframeArray* vframeArray::allocate(JavaThread* thread, int frame_size, GrowableArray<compiledVFrame*>* chunk,
                                    RegisterMap *reg_map, frame sender, frame caller, frame self,
--- a/src/hotspot/share/runtime/vframeArray.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/runtime/vframeArray.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -28,7 +28,7 @@
 #include "memory/allocation.hpp"
 #include "oops/arrayOop.hpp"
 #include "runtime/deoptimization.hpp"
-#include "runtime/frame.inline.hpp"
+#include "runtime/frame.hpp"
 #include "runtime/monitorChunk.hpp"
 #include "utilities/growableArray.hpp"
 
@@ -189,7 +189,7 @@
   // Accessors for sp
   intptr_t* sp() const                       { return _original.sp(); }
 
-  intptr_t* unextended_sp() const            { return _original.unextended_sp(); }
+  intptr_t* unextended_sp() const;
 
   address original_pc() const                { return _original.pc(); }
 
--- a/src/hotspot/share/runtime/vframe_hp.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/runtime/vframe_hp.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -34,6 +34,7 @@
 #include "oops/instanceKlass.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/basicLock.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/monitorChunk.hpp"
 #include "runtime/signature.hpp"
--- a/src/hotspot/share/runtime/vm_operations.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/runtime/vm_operations.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -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
@@ -35,6 +35,7 @@
 #include "oops/symbol.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/deoptimization.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/interfaceSupport.inline.hpp"
 #include "runtime/sweeper.hpp"
 #include "runtime/thread.inline.hpp"
--- a/src/hotspot/share/services/diagnosticCommand.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/services/diagnosticCommand.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -30,9 +30,11 @@
 #include "compiler/directivesParser.hpp"
 #include "gc/shared/vmGCOperations.hpp"
 #include "memory/resourceArea.hpp"
+#include "oops/objArrayOop.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/typeArrayOop.inline.hpp"
 #include "runtime/globals.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/javaCalls.hpp"
 #include "runtime/os.hpp"
 #include "services/diagnosticArgument.hpp"
@@ -44,7 +46,6 @@
 #include "utilities/debug.hpp"
 #include "utilities/formatBuffer.hpp"
 #include "utilities/macros.hpp"
-#include "oops/objArrayOop.inline.hpp"
 
 
 static void loadAgentModule(TRAPS) {
--- a/src/hotspot/share/services/heapDumper.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/services/heapDumper.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -37,6 +37,7 @@
 #include "oops/objArrayOop.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/typeArrayOop.inline.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/javaCalls.hpp"
 #include "runtime/jniHandles.hpp"
--- a/src/hotspot/share/services/memTracker.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/services/memTracker.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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 "jvm.h"
 
 #include "runtime/mutex.hpp"
+#include "runtime/orderAccess.inline.hpp"
 #include "runtime/vmThread.hpp"
 #include "runtime/vm_operations.hpp"
 #include "services/memBaseline.hpp"
--- a/src/hotspot/share/services/threadService.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/services/threadService.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -34,6 +34,7 @@
 #include "runtime/atomic.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/init.hpp"
+#include "runtime/objectMonitor.inline.hpp"
 #include "runtime/thread.inline.hpp"
 #include "runtime/threadSMR.inline.hpp"
 #include "runtime/vframe.hpp"
--- a/src/hotspot/share/services/threadService.hpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/services/threadService.hpp	Wed Mar 21 19:45:24 2018 -0400
@@ -30,7 +30,6 @@
 #include "runtime/init.hpp"
 #include "runtime/jniHandles.hpp"
 #include "runtime/objectMonitor.hpp"
-#include "runtime/objectMonitor.inline.hpp"
 #include "runtime/perfData.hpp"
 #include "runtime/thread.hpp"
 #include "runtime/threadSMR.hpp"
--- a/src/hotspot/share/utilities/debug.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/utilities/debug.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -40,7 +40,8 @@
 #include "prims/privilegedStack.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/atomic.hpp"
-#include "runtime/frame.hpp"
+#include "runtime/frame.inline.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/java.hpp"
 #include "runtime/os.hpp"
 #include "runtime/sharedRuntime.hpp"
--- a/src/hotspot/share/utilities/exceptions.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/share/utilities/exceptions.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -30,6 +30,7 @@
 #include "logging/logStream.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/oop.inline.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/init.hpp"
 #include "runtime/java.hpp"
 #include "runtime/javaCalls.hpp"