--- old/make/nb_native/nbproject/configurations.xml 2018-03-15 12:06:23.956801981 -0400 +++ new/make/nb_native/nbproject/configurations.xml 2018-03-15 12:06:23.320743605 -0400 @@ -2480,7 +2480,7 @@ jvmtiClassFileReconstituter.hpp jvmtiCodeBlobEvents.cpp jvmtiCodeBlobEvents.hpp - jvmtiEnter.hpp + jvmtiEnter.inline.hpp jvmtiEnv.cpp jvmtiEnvBase.cpp jvmtiEnvBase.hpp @@ -13398,7 +13398,7 @@ tool="3" flavor2="0"> - @@ -27175,7 +27175,7 @@ tool="3" flavor2="0"> - --- old/src/hotspot/cpu/aarch64/assembler_aarch64.cpp 2018-03-15 12:06:25.630955633 -0400 +++ new/src/hotspot/cpu/aarch64/assembler_aarch64.cpp 2018-03-15 12:06:25.011898817 -0400 @@ -36,7 +36,7 @@ #include "compiler/disassembler.hpp" #include "memory/resourceArea.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/sharedRuntime.hpp" // for the moment we reuse the logical/floating point immediate encode --- old/src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp 2018-03-15 12:06:26.392025483 -0400 +++ new/src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp 2018-03-15 12:06:25.752966831 -0400 @@ -32,7 +32,7 @@ #include "oops/oop.inline.hpp" #include "runtime/handles.inline.hpp" #include "runtime/icache.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/signature.hpp" #define __ _masm-> --- old/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp 2018-03-15 12:06:27.104090836 -0400 +++ new/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp 2018-03-15 12:06:26.486034111 -0400 @@ -42,7 +42,7 @@ #include "opto/node.hpp" #include "runtime/biasedLocking.hpp" #include "runtime/icache.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/jniHandles.inline.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/thread.hpp" --- old/src/hotspot/cpu/aarch64/runtime_aarch64.cpp 2018-03-15 12:06:27.923166009 -0400 +++ new/src/hotspot/cpu/aarch64/runtime_aarch64.cpp 2018-03-15 12:06:27.303109101 -0400 @@ -31,7 +31,7 @@ #include "code/vmreg.hpp" #include "interpreter/interpreter.hpp" #include "opto/runtime.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/stubRoutines.hpp" #include "runtime/vframeArray.hpp" --- old/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp 2018-03-15 12:06:28.629230811 -0400 +++ new/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp 2018-03-15 12:06:28.008173811 -0400 @@ -34,6 +34,7 @@ #include "logging/log.hpp" #include "memory/resourceArea.hpp" #include "oops/compiledICHolder.hpp" +#include "runtime/safepointMechanism.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/vframeArray.hpp" #include "utilities/align.hpp" --- old/src/hotspot/cpu/arm/assembler_arm.cpp 2018-03-15 12:06:29.400301579 -0400 +++ new/src/hotspot/cpu/arm/assembler_arm.cpp 2018-03-15 12:06:28.781244763 -0400 @@ -35,7 +35,7 @@ #include "prims/jvm_misc.hpp" #include "prims/methodHandles.hpp" #include "runtime/biasedLocking.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/objectMonitor.hpp" #include "runtime/os.hpp" #include "runtime/sharedRuntime.hpp" --- old/src/hotspot/cpu/arm/assembler_arm_32.cpp 2018-03-15 12:06:30.106366380 -0400 +++ new/src/hotspot/cpu/arm/assembler_arm_32.cpp 2018-03-15 12:06:29.488309656 -0400 @@ -35,7 +35,7 @@ #include "prims/jvm_misc.hpp" #include "prims/methodHandles.hpp" #include "runtime/biasedLocking.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/objectMonitor.hpp" #include "runtime/os.hpp" #include "runtime/sharedRuntime.hpp" --- old/src/hotspot/cpu/arm/assembler_arm_64.cpp 2018-03-15 12:06:30.826432467 -0400 +++ new/src/hotspot/cpu/arm/assembler_arm_64.cpp 2018-03-15 12:06:30.195374550 -0400 @@ -35,7 +35,7 @@ #include "prims/jvm_misc.hpp" #include "prims/methodHandles.hpp" #include "runtime/biasedLocking.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/objectMonitor.hpp" #include "runtime/os.hpp" #include "runtime/sharedRuntime.hpp" --- old/src/hotspot/cpu/arm/interpreterRT_arm.cpp 2018-03-15 12:06:31.537497728 -0400 +++ new/src/hotspot/cpu/arm/interpreterRT_arm.cpp 2018-03-15 12:06:30.917440820 -0400 @@ -31,7 +31,7 @@ #include "oops/oop.inline.hpp" #include "runtime/handles.inline.hpp" #include "runtime/icache.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/signature.hpp" #define __ _masm-> --- old/src/hotspot/cpu/arm/macroAssembler_arm.cpp 2018-03-15 12:06:32.250563172 -0400 +++ new/src/hotspot/cpu/arm/macroAssembler_arm.cpp 2018-03-15 12:06:31.632506448 -0400 @@ -37,7 +37,7 @@ #include "oops/klass.inline.hpp" #include "prims/methodHandles.hpp" #include "runtime/biasedLocking.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/objectMonitor.hpp" #include "runtime/os.hpp" #include "runtime/sharedRuntime.hpp" --- old/src/hotspot/cpu/arm/runtime_arm.cpp 2018-03-15 12:06:33.019633757 -0400 +++ new/src/hotspot/cpu/arm/runtime_arm.cpp 2018-03-15 12:06:32.401577032 -0400 @@ -32,7 +32,7 @@ #include "memory/resourceArea.hpp" #include "nativeInst_arm.hpp" #include "opto/runtime.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/stubRoutines.hpp" #include "runtime/vframeArray.hpp" --- old/src/hotspot/cpu/ppc/assembler_ppc.cpp 2018-03-15 12:06:33.726698650 -0400 +++ new/src/hotspot/cpu/ppc/assembler_ppc.cpp 2018-03-15 12:06:33.109642017 -0400 @@ -31,7 +31,7 @@ #include "memory/resourceArea.hpp" #include "prims/methodHandles.hpp" #include "runtime/biasedLocking.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/objectMonitor.hpp" #include "runtime/os.hpp" #include "runtime/sharedRuntime.hpp" --- old/src/hotspot/cpu/ppc/interpreterRT_ppc.cpp 2018-03-15 12:06:34.450765104 -0400 +++ new/src/hotspot/cpu/ppc/interpreterRT_ppc.cpp 2018-03-15 12:06:33.829708104 -0400 @@ -33,7 +33,7 @@ #include "oops/oop.inline.hpp" #include "runtime/handles.inline.hpp" #include "runtime/icache.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/signature.hpp" #define __ _masm-> --- old/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp 2018-03-15 12:06:35.160830273 -0400 +++ new/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp 2018-03-15 12:06:34.538773181 -0400 @@ -35,7 +35,7 @@ #include "prims/methodHandles.hpp" #include "runtime/biasedLocking.hpp" #include "runtime/icache.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/objectMonitor.hpp" #include "runtime/os.hpp" #include "runtime/safepoint.hpp" --- old/src/hotspot/cpu/ppc/methodHandles_ppc.cpp 2018-03-15 12:06:35.974904988 -0400 +++ new/src/hotspot/cpu/ppc/methodHandles_ppc.cpp 2018-03-15 12:06:35.357848355 -0400 @@ -31,6 +31,7 @@ #include "memory/allocation.inline.hpp" #include "memory/resourceArea.hpp" #include "prims/methodHandles.hpp" +#include "utilities/preserveException.hpp" #define __ _masm-> --- old/src/hotspot/cpu/ppc/runtime_ppc.cpp 2018-03-15 12:06:36.693970983 -0400 +++ new/src/hotspot/cpu/ppc/runtime_ppc.cpp 2018-03-15 12:06:36.073914075 -0400 @@ -33,7 +33,7 @@ #include "memory/resourceArea.hpp" #include "nativeInst_ppc.hpp" #include "opto/runtime.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/stubRoutines.hpp" #include "runtime/vframeArray.hpp" --- old/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp 2018-03-15 12:06:37.414037070 -0400 +++ new/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp 2018-03-15 12:06:36.784979335 -0400 @@ -29,10 +29,12 @@ #include "code/icBuffer.hpp" #include "code/vtableStubs.hpp" #include "frame_ppc.hpp" +#include "gc/shared/gcLocker.hpp" #include "interpreter/interpreter.hpp" #include "interpreter/interp_masm.hpp" #include "memory/resourceArea.hpp" #include "oops/compiledICHolder.hpp" +#include "runtime/safepointMechanism.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/vframeArray.hpp" #include "utilities/align.hpp" --- old/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp 2018-03-15 12:06:38.194108663 -0400 +++ new/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp 2018-03-15 12:06:37.576051939 -0400 @@ -34,6 +34,7 @@ #include "oops/objArrayKlass.hpp" #include "oops/oop.inline.hpp" #include "prims/methodHandles.hpp" +#include "runtime/safepointMechanism.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/stubRoutines.hpp" #include "runtime/synchronizer.hpp" --- old/src/hotspot/cpu/s390/assembler_s390.cpp 2018-03-15 12:06:38.996182277 -0400 +++ new/src/hotspot/cpu/s390/assembler_s390.cpp 2018-03-15 12:06:38.379125644 -0400 @@ -32,7 +32,7 @@ #include "memory/resourceArea.hpp" #include "prims/methodHandles.hpp" #include "runtime/biasedLocking.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/objectMonitor.hpp" #include "runtime/os.hpp" #include "runtime/sharedRuntime.hpp" --- old/src/hotspot/cpu/s390/interpreterRT_s390.cpp 2018-03-15 12:06:39.706247446 -0400 +++ new/src/hotspot/cpu/s390/interpreterRT_s390.cpp 2018-03-15 12:06:39.086190538 -0400 @@ -32,7 +32,7 @@ #include "oops/oop.inline.hpp" #include "runtime/handles.inline.hpp" #include "runtime/icache.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/signature.hpp" // Access macros for Java and C arguments. --- old/src/hotspot/cpu/s390/macroAssembler_s390.cpp 2018-03-15 12:06:40.416312615 -0400 +++ new/src/hotspot/cpu/s390/macroAssembler_s390.cpp 2018-03-15 12:06:39.796255707 -0400 @@ -41,7 +41,7 @@ #include "registerSaver_s390.hpp" #include "runtime/biasedLocking.hpp" #include "runtime/icache.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/objectMonitor.hpp" #include "runtime/os.hpp" #include "runtime/safepoint.hpp" --- old/src/hotspot/cpu/s390/methodHandles_s390.cpp 2018-03-15 12:06:41.276391552 -0400 +++ new/src/hotspot/cpu/s390/methodHandles_s390.cpp 2018-03-15 12:06:40.656334644 -0400 @@ -31,6 +31,7 @@ #include "memory/allocation.inline.hpp" #include "memory/resourceArea.hpp" #include "prims/methodHandles.hpp" +#include "utilities/preserveException.hpp" #ifdef PRODUCT #define __ _masm-> --- old/src/hotspot/cpu/s390/runtime_s390.cpp 2018-03-15 12:06:41.993457363 -0400 +++ new/src/hotspot/cpu/s390/runtime_s390.cpp 2018-03-15 12:06:41.373400455 -0400 @@ -32,7 +32,7 @@ #include "memory/resourceArea.hpp" #include "nativeInst_s390.hpp" #include "opto/runtime.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/stubRoutines.hpp" #include "runtime/vframeArray.hpp" --- old/src/hotspot/cpu/s390/sharedRuntime_s390.cpp 2018-03-15 12:06:42.702522440 -0400 +++ new/src/hotspot/cpu/s390/sharedRuntime_s390.cpp 2018-03-15 12:06:42.081465440 -0400 @@ -28,11 +28,13 @@ #include "code/debugInfoRec.hpp" #include "code/icBuffer.hpp" #include "code/vtableStubs.hpp" +#include "gc/shared/gcLocker.hpp" #include "interpreter/interpreter.hpp" #include "interpreter/interp_masm.hpp" #include "memory/resourceArea.hpp" #include "oops/compiledICHolder.hpp" #include "registerSaver_s390.hpp" +#include "runtime/safepointMechanism.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/vframeArray.hpp" #include "utilities/align.hpp" --- old/src/hotspot/cpu/s390/templateTable_s390.cpp 2018-03-15 12:06:43.486594401 -0400 +++ new/src/hotspot/cpu/s390/templateTable_s390.cpp 2018-03-15 12:06:42.861537034 -0400 @@ -33,6 +33,7 @@ #include "oops/objArrayKlass.hpp" #include "oops/oop.inline.hpp" #include "prims/methodHandles.hpp" +#include "runtime/safepointMechanism.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/stubRoutines.hpp" #include "runtime/synchronizer.hpp" --- old/src/hotspot/cpu/sparc/c1_LIRAssembler_sparc.cpp 2018-03-15 12:06:44.301669208 -0400 +++ new/src/hotspot/cpu/sparc/c1_LIRAssembler_sparc.cpp 2018-03-15 12:06:43.672611474 -0400 @@ -35,6 +35,7 @@ #include "gc/shared/collectedHeap.hpp" #include "nativeInst_sparc.hpp" #include "oops/objArrayKlass.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/jniHandles.inline.hpp" #include "runtime/safepointMechanism.inline.hpp" #include "runtime/sharedRuntime.hpp" --- old/src/hotspot/cpu/sparc/interpreterRT_sparc.cpp 2018-03-15 12:06:45.098742362 -0400 +++ new/src/hotspot/cpu/sparc/interpreterRT_sparc.cpp 2018-03-15 12:06:44.470684720 -0400 @@ -32,7 +32,7 @@ #include "oops/oop.inline.hpp" #include "runtime/handles.inline.hpp" #include "runtime/icache.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/signature.hpp" --- old/src/hotspot/cpu/sparc/macroAssembler_sparc.cpp 2018-03-15 12:06:45.823808908 -0400 +++ new/src/hotspot/cpu/sparc/macroAssembler_sparc.cpp 2018-03-15 12:06:45.187750532 -0400 @@ -35,7 +35,7 @@ #include "oops/klass.inline.hpp" #include "prims/methodHandles.hpp" #include "runtime/biasedLocking.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/jniHandles.inline.hpp" #include "runtime/objectMonitor.hpp" #include "runtime/os.inline.hpp" --- old/src/hotspot/cpu/sparc/methodHandles_sparc.cpp 2018-03-15 12:06:46.633883256 -0400 +++ new/src/hotspot/cpu/sparc/methodHandles_sparc.cpp 2018-03-15 12:06:46.016826623 -0400 @@ -31,6 +31,7 @@ #include "memory/allocation.inline.hpp" #include "memory/resourceArea.hpp" #include "prims/methodHandles.hpp" +#include "utilities/preserveException.hpp" #define __ _masm-> --- old/src/hotspot/cpu/sparc/runtime_sparc.cpp 2018-03-15 12:06:47.350949067 -0400 +++ new/src/hotspot/cpu/sparc/runtime_sparc.cpp 2018-03-15 12:06:46.732892343 -0400 @@ -31,7 +31,7 @@ #include "memory/resourceArea.hpp" #include "nativeInst_sparc.hpp" #include "opto/runtime.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/stubRoutines.hpp" #include "runtime/vframeArray.hpp" --- old/src/hotspot/cpu/sparc/sharedRuntime_sparc.cpp 2018-03-15 12:06:48.059014053 -0400 +++ new/src/hotspot/cpu/sparc/sharedRuntime_sparc.cpp 2018-03-15 12:06:47.438957145 -0400 @@ -27,10 +27,12 @@ #include "code/debugInfoRec.hpp" #include "code/icBuffer.hpp" #include "code/vtableStubs.hpp" +#include "gc/shared/gcLocker.hpp" #include "interpreter/interpreter.hpp" #include "logging/log.hpp" #include "memory/resourceArea.hpp" #include "oops/compiledICHolder.hpp" +#include "runtime/safepointMechanism.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/vframeArray.hpp" #include "utilities/align.hpp" --- old/src/hotspot/cpu/sparc/templateTable_sparc.cpp 2018-03-15 12:06:48.836085371 -0400 +++ new/src/hotspot/cpu/sparc/templateTable_sparc.cpp 2018-03-15 12:06:48.218028647 -0400 @@ -32,6 +32,7 @@ #include "oops/objArrayKlass.hpp" #include "oops/oop.inline.hpp" #include "prims/methodHandles.hpp" +#include "runtime/safepointMechanism.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/stubRoutines.hpp" #include "runtime/synchronizer.hpp" --- old/src/hotspot/cpu/x86/assembler_x86.cpp 2018-03-15 12:06:49.624157700 -0400 +++ new/src/hotspot/cpu/x86/assembler_x86.cpp 2018-03-15 12:06:49.004100792 -0400 @@ -31,7 +31,6 @@ #include "memory/resourceArea.hpp" #include "prims/methodHandles.hpp" #include "runtime/biasedLocking.hpp" -#include "runtime/interfaceSupport.hpp" #include "runtime/objectMonitor.hpp" #include "runtime/os.hpp" #include "runtime/sharedRuntime.hpp" --- old/src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp 2018-03-15 12:06:50.518239758 -0400 +++ new/src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp 2018-03-15 12:06:49.900183033 -0400 @@ -37,6 +37,7 @@ #include "gc/shared/collectedHeap.hpp" #include "nativeInst_x86.hpp" #include "oops/objArrayKlass.hpp" +#include "runtime/safepointMechanism.hpp" #include "runtime/sharedRuntime.hpp" #include "vmreg_x86.inline.hpp" --- old/src/hotspot/cpu/x86/interpreterRT_x86_32.cpp 2018-03-15 12:06:51.306312086 -0400 +++ new/src/hotspot/cpu/x86/interpreterRT_x86_32.cpp 2018-03-15 12:06:50.688255362 -0400 @@ -31,7 +31,7 @@ #include "oops/oop.inline.hpp" #include "runtime/handles.inline.hpp" #include "runtime/icache.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/signature.hpp" --- old/src/hotspot/cpu/x86/interpreterRT_x86_64.cpp 2018-03-15 12:06:52.011376796 -0400 +++ new/src/hotspot/cpu/x86/interpreterRT_x86_64.cpp 2018-03-15 12:06:51.395320255 -0400 @@ -31,7 +31,7 @@ #include "oops/oop.inline.hpp" #include "runtime/handles.inline.hpp" #include "runtime/icache.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/signature.hpp" #define __ _masm-> --- old/src/hotspot/cpu/x86/macroAssembler_x86.cpp 2018-03-15 12:06:52.727442516 -0400 +++ new/src/hotspot/cpu/x86/macroAssembler_x86.cpp 2018-03-15 12:06:52.104385332 -0400 @@ -36,7 +36,7 @@ #include "oops/klass.inline.hpp" #include "prims/methodHandles.hpp" #include "runtime/biasedLocking.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/objectMonitor.hpp" #include "runtime/os.hpp" #include "runtime/safepoint.hpp" --- old/src/hotspot/cpu/x86/methodHandles_x86.cpp 2018-03-15 12:06:53.658527970 -0400 +++ new/src/hotspot/cpu/x86/methodHandles_x86.cpp 2018-03-15 12:06:53.037470970 -0400 @@ -31,6 +31,7 @@ #include "memory/allocation.inline.hpp" #include "memory/resourceArea.hpp" #include "prims/methodHandles.hpp" +#include "utilities/preserveException.hpp" #define __ _masm-> --- old/src/hotspot/cpu/x86/runtime_x86_32.cpp 2018-03-15 12:06:54.373593598 -0400 +++ new/src/hotspot/cpu/x86/runtime_x86_32.cpp 2018-03-15 12:06:53.754536781 -0400 @@ -31,7 +31,6 @@ #include "interpreter/interpreter.hpp" #include "memory/resourceArea.hpp" #include "opto/runtime.hpp" -#include "runtime/interfaceSupport.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/stubRoutines.hpp" #include "runtime/vframeArray.hpp" --- old/src/hotspot/cpu/x86/runtime_x86_64.cpp 2018-03-15 12:06:55.078658308 -0400 +++ new/src/hotspot/cpu/x86/runtime_x86_64.cpp 2018-03-15 12:06:54.458601400 -0400 @@ -30,7 +30,6 @@ #include "code/vmreg.hpp" #include "interpreter/interpreter.hpp" #include "opto/runtime.hpp" -#include "runtime/interfaceSupport.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/stubRoutines.hpp" #include "runtime/vframeArray.hpp" --- old/src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp 2018-03-15 12:06:55.784723109 -0400 +++ new/src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp 2018-03-15 12:06:55.163666110 -0400 @@ -28,10 +28,12 @@ #include "code/debugInfoRec.hpp" #include "code/icBuffer.hpp" #include "code/vtableStubs.hpp" +#include "gc/shared/gcLocker.hpp" #include "interpreter/interpreter.hpp" #include "logging/log.hpp" #include "memory/resourceArea.hpp" #include "oops/compiledICHolder.hpp" +#include "runtime/safepointMechanism.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/vframeArray.hpp" #include "utilities/align.hpp" --- old/src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp 2018-03-15 12:06:56.557794061 -0400 +++ new/src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp 2018-03-15 12:06:55.935736969 -0400 @@ -32,10 +32,12 @@ #include "code/icBuffer.hpp" #include "code/nativeInst.hpp" #include "code/vtableStubs.hpp" +#include "gc/shared/gcLocker.hpp" #include "interpreter/interpreter.hpp" #include "logging/log.hpp" #include "memory/resourceArea.hpp" #include "oops/compiledICHolder.hpp" +#include "runtime/safepointMechanism.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/vframeArray.hpp" #include "utilities/align.hpp" --- old/src/hotspot/cpu/x86/templateTable_x86.cpp 2018-03-15 12:06:57.342866114 -0400 +++ new/src/hotspot/cpu/x86/templateTable_x86.cpp 2018-03-15 12:06:56.721809114 -0400 @@ -33,6 +33,7 @@ #include "oops/objArrayKlass.hpp" #include "oops/oop.inline.hpp" #include "prims/methodHandles.hpp" +#include "runtime/safepointMechanism.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/stubRoutines.hpp" #include "runtime/synchronizer.hpp" --- old/src/hotspot/cpu/zero/assembler_zero.cpp 2018-03-15 12:06:58.147940003 -0400 +++ new/src/hotspot/cpu/zero/assembler_zero.cpp 2018-03-15 12:06:57.524882819 -0400 @@ -31,7 +31,7 @@ #include "memory/resourceArea.hpp" #include "prims/methodHandles.hpp" #include "runtime/biasedLocking.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/objectMonitor.hpp" #include "runtime/os.hpp" #include "runtime/sharedRuntime.hpp" --- old/src/hotspot/cpu/zero/cppInterpreter_zero.cpp 2018-03-15 12:06:58.859005264 -0400 +++ new/src/hotspot/cpu/zero/cppInterpreter_zero.cpp 2018-03-15 12:06:58.238948356 -0400 @@ -41,7 +41,7 @@ #include "runtime/atomic.hpp" #include "runtime/deoptimization.hpp" #include "runtime/frame.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/jniHandles.inline.hpp" #include "runtime/orderAccess.inline.hpp" #include "runtime/sharedRuntime.hpp" --- old/src/hotspot/cpu/zero/interpreterRT_zero.cpp 2018-03-15 12:06:59.577071167 -0400 +++ new/src/hotspot/cpu/zero/interpreterRT_zero.cpp 2018-03-15 12:06:58.960014534 -0400 @@ -32,7 +32,7 @@ #include "oops/oop.inline.hpp" #include "runtime/handles.inline.hpp" #include "runtime/icache.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/signature.hpp" #include "stack_zero.inline.hpp" #include "utilities/align.hpp" --- old/src/hotspot/os/aix/attachListener_aix.cpp 2018-03-15 12:07:00.301137621 -0400 +++ new/src/hotspot/os/aix/attachListener_aix.cpp 2018-03-15 12:06:59.671079795 -0400 @@ -24,7 +24,7 @@ */ #include "precompiled.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/os.inline.hpp" #include "services/attachListener.hpp" #include "services/dtraceAttacher.hpp" --- old/src/hotspot/os/aix/jvm_aix.cpp 2018-03-15 12:07:01.016203249 -0400 +++ new/src/hotspot/os/aix/jvm_aix.cpp 2018-03-15 12:07:00.397146433 -0400 @@ -25,7 +25,7 @@ #include "precompiled.hpp" #include "jvm.h" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/osThread.hpp" #include --- old/src/hotspot/os/aix/os_aix.cpp 2018-03-15 12:07:01.734269152 -0400 +++ new/src/hotspot/os/aix/os_aix.cpp 2018-03-15 12:07:01.112212060 -0400 @@ -54,7 +54,7 @@ #include "runtime/atomic.hpp" #include "runtime/extendedPC.hpp" #include "runtime/globals.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/os/bsd/attachListener_bsd.cpp 2018-03-15 12:07:02.539343041 -0400 +++ new/src/hotspot/os/bsd/attachListener_bsd.cpp 2018-03-15 12:07:01.916285858 -0400 @@ -23,7 +23,7 @@ */ #include "precompiled.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/os.inline.hpp" #include "services/attachListener.hpp" #include "services/dtraceAttacher.hpp" --- old/src/hotspot/os/bsd/jvm_bsd.cpp 2018-03-15 12:07:03.271410229 -0400 +++ new/src/hotspot/os/bsd/jvm_bsd.cpp 2018-03-15 12:07:02.649353138 -0400 @@ -24,7 +24,7 @@ #include "precompiled.hpp" #include "jvm.h" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/osThread.hpp" #include --- old/src/hotspot/os/bsd/os_bsd.cpp 2018-03-15 12:07:03.989476133 -0400 +++ new/src/hotspot/os/bsd/os_bsd.cpp 2018-03-15 12:07:03.368419133 -0400 @@ -44,7 +44,7 @@ #include "runtime/atomic.hpp" #include "runtime/extendedPC.hpp" #include "runtime/globals.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/os/linux/attachListener_linux.cpp 2018-03-15 12:07:04.785549195 -0400 +++ new/src/hotspot/os/linux/attachListener_linux.cpp 2018-03-15 12:07:04.158491645 -0400 @@ -23,7 +23,8 @@ */ #include "precompiled.hpp" -#include "runtime/interfaceSupport.hpp" +#include "memory/allocation.inline.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/os.inline.hpp" #include "services/attachListener.hpp" #include "services/dtraceAttacher.hpp" --- old/src/hotspot/os/linux/jvm_linux.cpp 2018-03-15 12:07:05.503615099 -0400 +++ new/src/hotspot/os/linux/jvm_linux.cpp 2018-03-15 12:07:04.883558190 -0400 @@ -24,7 +24,7 @@ #include "precompiled.hpp" #include "jvm.h" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/osThread.hpp" #include --- old/src/hotspot/os/linux/os_linux.cpp 2018-03-15 12:07:06.209679901 -0400 +++ new/src/hotspot/os/linux/os_linux.cpp 2018-03-15 12:07:05.588622901 -0400 @@ -45,7 +45,7 @@ #include "runtime/atomic.hpp" #include "runtime/extendedPC.hpp" #include "runtime/globals.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/init.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" --- old/src/hotspot/os/posix/os_posix.cpp 2018-03-15 12:07:07.049757002 -0400 +++ new/src/hotspot/os/posix/os_posix.cpp 2018-03-15 12:07:06.427699910 -0400 @@ -26,7 +26,7 @@ #include "memory/allocation.inline.hpp" #include "utilities/globalDefinitions.hpp" #include "runtime/frame.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/os.hpp" #include "services/memTracker.hpp" #include "utilities/align.hpp" --- old/src/hotspot/os/solaris/attachListener_solaris.cpp 2018-03-15 12:07:07.798825751 -0400 +++ new/src/hotspot/os/solaris/attachListener_solaris.cpp 2018-03-15 12:07:07.176768659 -0400 @@ -23,7 +23,7 @@ */ #include "precompiled.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/os.inline.hpp" #include "services/attachListener.hpp" #include "services/dtraceAttacher.hpp" --- old/src/hotspot/os/solaris/jvm_solaris.cpp 2018-03-15 12:07:08.517891746 -0400 +++ new/src/hotspot/os/solaris/jvm_solaris.cpp 2018-03-15 12:07:07.897834838 -0400 @@ -24,7 +24,7 @@ #include "precompiled.hpp" #include "jvm.h" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/osThread.hpp" #include --- old/src/hotspot/os/solaris/os_solaris.cpp 2018-03-15 12:07:09.237957833 -0400 +++ new/src/hotspot/os/solaris/os_solaris.cpp 2018-03-15 12:07:08.614900649 -0400 @@ -44,7 +44,7 @@ #include "runtime/atomic.hpp" #include "runtime/extendedPC.hpp" #include "runtime/globals.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/os/windows/attachListener_windows.cpp 2018-03-15 12:07:10.062033466 -0400 +++ new/src/hotspot/os/windows/attachListener_windows.cpp 2018-03-15 12:07:09.441976557 -0400 @@ -23,7 +23,7 @@ */ #include "precompiled.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/os.hpp" #include "services/attachListener.hpp" #include "services/dtraceAttacher.hpp" --- old/src/hotspot/os/windows/jvm_windows.cpp 2018-03-15 12:07:10.795100746 -0400 +++ new/src/hotspot/os/windows/jvm_windows.cpp 2018-03-15 12:07:10.160042461 -0400 @@ -24,7 +24,7 @@ #include "precompiled.hpp" #include "jvm.h" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/osThread.hpp" #include --- old/src/hotspot/os/windows/os_windows.cpp 2018-03-15 12:07:11.506166006 -0400 +++ new/src/hotspot/os/windows/os_windows.cpp 2018-03-15 12:07:10.883108823 -0400 @@ -47,7 +47,7 @@ #include "runtime/atomic.hpp" #include "runtime/extendedPC.hpp" #include "runtime/globals.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp 2018-03-15 12:07:12.325241180 -0400 +++ new/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp 2018-03-15 12:07:11.705184272 -0400 @@ -42,7 +42,7 @@ #include "runtime/arguments.hpp" #include "runtime/extendedPC.hpp" #include "runtime/frame.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp 2018-03-15 12:07:13.050307726 -0400 +++ new/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp 2018-03-15 12:07:12.429250726 -0400 @@ -39,7 +39,7 @@ #include "runtime/arguments.hpp" #include "runtime/extendedPC.hpp" #include "runtime/frame.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp 2018-03-15 12:07:13.815377943 -0400 +++ new/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp 2018-03-15 12:07:13.164318190 -0400 @@ -45,7 +45,7 @@ #include "runtime/arguments.hpp" #include "runtime/extendedPC.hpp" #include "runtime/frame.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp 2018-03-15 12:07:14.543444765 -0400 +++ new/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp 2018-03-15 12:07:13.924387948 -0400 @@ -41,7 +41,7 @@ #include "runtime/arguments.hpp" #include "runtime/extendedPC.hpp" #include "runtime/frame.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp 2018-03-15 12:07:15.278512228 -0400 +++ new/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp 2018-03-15 12:07:14.648454402 -0400 @@ -39,7 +39,7 @@ #include "runtime/arguments.hpp" #include "runtime/extendedPC.hpp" #include "runtime/frame.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp 2018-03-15 12:07:16.009579325 -0400 +++ new/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp 2018-03-15 12:07:15.387522233 -0400 @@ -41,7 +41,7 @@ #include "runtime/arguments.hpp" #include "runtime/extendedPC.hpp" #include "runtime/frame.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp 2018-03-15 12:07:16.731645595 -0400 +++ new/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp 2018-03-15 12:07:16.108588412 -0400 @@ -44,7 +44,7 @@ #include "runtime/arguments.hpp" #include "runtime/extendedPC.hpp" #include "runtime/frame.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/os_cpu/linux_sparc/os_linux_sparc.cpp 2018-03-15 12:07:17.464712876 -0400 +++ new/src/hotspot/os_cpu/linux_sparc/os_linux_sparc.cpp 2018-03-15 12:07:16.842655784 -0400 @@ -40,7 +40,7 @@ #include "runtime/arguments.hpp" #include "runtime/extendedPC.hpp" #include "runtime/frame.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp 2018-03-15 12:07:18.188779330 -0400 +++ new/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp 2018-03-15 12:07:17.567722330 -0400 @@ -39,7 +39,7 @@ #include "runtime/arguments.hpp" #include "runtime/extendedPC.hpp" #include "runtime/frame.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp 2018-03-15 12:07:18.928847252 -0400 +++ new/src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp 2018-03-15 12:07:18.300789610 -0400 @@ -40,7 +40,7 @@ #include "runtime/arguments.hpp" #include "runtime/extendedPC.hpp" #include "runtime/frame.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/os_cpu/solaris_sparc/os_solaris_sparc.cpp 2018-03-15 12:07:19.652913707 -0400 +++ new/src/hotspot/os_cpu/solaris_sparc/os_solaris_sparc.cpp 2018-03-15 12:07:19.032856798 -0400 @@ -41,7 +41,7 @@ #include "runtime/arguments.hpp" #include "runtime/extendedPC.hpp" #include "runtime/frame.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/os_cpu/solaris_x86/os_solaris_x86.cpp 2018-03-15 12:07:20.383980803 -0400 +++ new/src/hotspot/os_cpu/solaris_x86/os_solaris_x86.cpp 2018-03-15 12:07:19.761923711 -0400 @@ -40,7 +40,7 @@ #include "runtime/atomic.hpp" #include "runtime/extendedPC.hpp" #include "runtime/frame.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp 2018-03-15 12:07:21.130049277 -0400 +++ new/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp 2018-03-15 12:07:20.508992277 -0400 @@ -40,7 +40,7 @@ #include "runtime/arguments.hpp" #include "runtime/extendedPC.hpp" #include "runtime/frame.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/share/adlc/main.cpp 2018-03-15 12:07:21.846114996 -0400 +++ new/src/hotspot/share/adlc/main.cpp 2018-03-15 12:07:21.227058180 -0400 @@ -228,6 +228,7 @@ AD.addInclude(AD._CPP_file, "opto/regmask.hpp"); AD.addInclude(AD._CPP_file, "opto/runtime.hpp"); AD.addInclude(AD._CPP_file, "runtime/biasedLocking.hpp"); + AD.addInclude(AD._CPP_file, "runtime/safepointMechanism.hpp"); AD.addInclude(AD._CPP_file, "runtime/sharedRuntime.hpp"); AD.addInclude(AD._CPP_file, "runtime/stubRoutines.hpp"); AD.addInclude(AD._CPP_file, "utilities/growableArray.hpp"); --- old/src/hotspot/share/aot/aotCodeHeap.cpp 2018-03-15 12:07:22.560180533 -0400 +++ new/src/hotspot/share/aot/aotCodeHeap.cpp 2018-03-15 12:07:21.941123716 -0400 @@ -25,7 +25,7 @@ #include "aot/aotCodeHeap.hpp" #include "aot/aotLoader.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "classfile/javaAssertions.hpp" #include "gc/shared/cardTable.hpp" #include "gc/shared/cardTableModRefBS.hpp" @@ -36,6 +36,7 @@ #include "jvmci/jvmciRuntime.hpp" #include "memory/allocation.inline.hpp" #include "oops/method.inline.hpp" +#include "runtime/handles.inline.hpp" #include "runtime/os.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/vm_operations.hpp" --- old/src/hotspot/share/c1/c1_Compiler.cpp 2018-03-15 12:07:23.293247813 -0400 +++ new/src/hotspot/share/c1/c1_Compiler.cpp 2018-03-15 12:07:22.668190446 -0400 @@ -38,7 +38,7 @@ #include "memory/resourceArea.hpp" #include "prims/nativeLookup.hpp" #include "runtime/arguments.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/sharedRuntime.hpp" #include "utilities/bitMap.inline.hpp" --- old/src/hotspot/share/c1/c1_GraphBuilder.cpp 2018-03-15 12:07:24.014313992 -0400 +++ new/src/hotspot/share/c1/c1_GraphBuilder.cpp 2018-03-15 12:07:23.393256992 -0400 @@ -32,6 +32,7 @@ #include "ci/ciField.hpp" #include "ci/ciKlass.hpp" #include "ci/ciMemberName.hpp" +#include "ci/ciUtilities.inline.hpp" #include "compiler/compileBroker.hpp" #include "interpreter/bytecode.hpp" #include "memory/resourceArea.hpp" --- old/src/hotspot/share/c1/c1_LIRAssembler.cpp 2018-03-15 12:07:24.813387330 -0400 +++ new/src/hotspot/share/c1/c1_LIRAssembler.cpp 2018-03-15 12:07:24.193330421 -0400 @@ -30,6 +30,7 @@ #include "c1/c1_MacroAssembler.hpp" #include "c1/c1_ValueStack.hpp" #include "ci/ciInstance.hpp" +#include "gc/shared/collectedHeap.hpp" #include "runtime/os.hpp" void LIR_Assembler::patching_epilog(PatchingStub* patch, LIR_PatchCode patch_code, Register obj, CodeEmitInfo* info) { --- old/src/hotspot/share/c1/c1_LIRGenerator.cpp 2018-03-15 12:07:25.535453600 -0400 +++ new/src/hotspot/share/c1/c1_LIRGenerator.cpp 2018-03-15 12:07:24.914396600 -0400 @@ -36,6 +36,7 @@ #include "ci/ciUtilities.hpp" #include "gc/shared/cardTable.hpp" #include "gc/shared/cardTableModRefBS.hpp" +#include "gc/shared/collectedHeap.hpp" #include "runtime/arguments.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/stubRoutines.hpp" --- old/src/hotspot/share/c1/c1_Runtime1.cpp 2018-03-15 12:07:26.318525470 -0400 +++ new/src/hotspot/share/c1/c1_Runtime1.cpp 2018-03-15 12:07:25.696468378 -0400 @@ -53,7 +53,7 @@ #include "runtime/atomic.hpp" #include "runtime/biasedLocking.hpp" #include "runtime/compilationPolicy.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/javaCalls.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/threadCritical.hpp" --- old/src/hotspot/share/ci/ciArray.cpp 2018-03-15 12:07:27.060593576 -0400 +++ new/src/hotspot/share/ci/ciArray.cpp 2018-03-15 12:07:26.436536301 -0400 @@ -27,7 +27,7 @@ #include "ci/ciArrayKlass.hpp" #include "ci/ciConstant.hpp" #include "ci/ciKlass.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "oops/objArrayOop.inline.hpp" #include "oops/oop.inline.hpp" #include "oops/typeArrayOop.inline.hpp" --- old/src/hotspot/share/ci/ciBaseObject.hpp 2018-03-15 12:07:27.773659021 -0400 +++ new/src/hotspot/share/ci/ciBaseObject.hpp 2018-03-15 12:07:27.155602296 -0400 @@ -27,7 +27,6 @@ #include "ci/ciClassList.hpp" #include "memory/allocation.hpp" -#include "runtime/handles.hpp" #include "runtime/jniHandles.hpp" // ciBaseObject --- old/src/hotspot/share/ci/ciCallSite.cpp 2018-03-15 12:07:28.479723822 -0400 +++ new/src/hotspot/share/ci/ciCallSite.cpp 2018-03-15 12:07:27.859666914 -0400 @@ -25,7 +25,7 @@ #include "precompiled.hpp" #include "classfile/javaClasses.inline.hpp" #include "ci/ciCallSite.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" // ciCallSite --- old/src/hotspot/share/ci/ciConstantPoolCache.cpp 2018-03-15 12:07:29.183788441 -0400 +++ new/src/hotspot/share/ci/ciConstantPoolCache.cpp 2018-03-15 12:07:28.563731533 -0400 @@ -24,7 +24,7 @@ #include "precompiled.hpp" #include "ci/ciConstantPoolCache.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "memory/allocation.hpp" #include "memory/allocation.inline.hpp" --- old/src/hotspot/share/ci/ciEnv.cpp 2018-03-15 12:07:29.889853243 -0400 +++ new/src/hotspot/share/ci/ciEnv.cpp 2018-03-15 12:07:29.269796335 -0400 @@ -32,7 +32,7 @@ #include "ci/ciMethod.hpp" #include "ci/ciNullObject.hpp" #include "ci/ciReplay.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "classfile/systemDictionary.hpp" #include "classfile/vmSymbols.hpp" #include "code/codeCache.hpp" --- old/src/hotspot/share/ci/ciExceptionHandler.cpp 2018-03-15 12:07:30.618920156 -0400 +++ new/src/hotspot/share/ci/ciExceptionHandler.cpp 2018-03-15 12:07:29.998863248 -0400 @@ -24,7 +24,8 @@ #include "precompiled.hpp" #include "ci/ciExceptionHandler.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" +#include "runtime/handles.inline.hpp" // ciExceptionHandler // --- old/src/hotspot/share/ci/ciField.cpp 2018-03-15 12:07:31.322984774 -0400 +++ new/src/hotspot/share/ci/ciField.cpp 2018-03-15 12:07:30.703927958 -0400 @@ -25,13 +25,14 @@ #include "precompiled.hpp" #include "ci/ciField.hpp" #include "ci/ciInstanceKlass.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "classfile/systemDictionary.hpp" #include "gc/shared/collectedHeap.inline.hpp" #include "interpreter/linkResolver.hpp" #include "memory/universe.hpp" #include "oops/oop.inline.hpp" #include "runtime/fieldDescriptor.hpp" +#include "runtime/handles.inline.hpp" // ciField // --- old/src/hotspot/share/ci/ciField.hpp 2018-03-15 12:07:32.035050127 -0400 +++ new/src/hotspot/share/ci/ciField.hpp 2018-03-15 12:07:31.415993311 -0400 @@ -29,6 +29,7 @@ #include "ci/ciConstant.hpp" #include "ci/ciFlags.hpp" #include "ci/ciInstance.hpp" +#include "ci/ciUtilities.hpp" // ciField // --- old/src/hotspot/share/ci/ciInstance.cpp 2018-03-15 12:07:32.752115939 -0400 +++ new/src/hotspot/share/ci/ciInstance.cpp 2018-03-15 12:07:32.134059214 -0400 @@ -27,7 +27,7 @@ #include "ci/ciField.hpp" #include "ci/ciInstance.hpp" #include "ci/ciInstanceKlass.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "classfile/systemDictionary.hpp" #include "oops/oop.inline.hpp" --- old/src/hotspot/share/ci/ciInstanceKlass.cpp 2018-03-15 12:07:33.459180832 -0400 +++ new/src/hotspot/share/ci/ciInstanceKlass.cpp 2018-03-15 12:07:32.838123832 -0400 @@ -26,7 +26,7 @@ #include "ci/ciField.hpp" #include "ci/ciInstance.hpp" #include "ci/ciInstanceKlass.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "classfile/systemDictionary.hpp" #include "memory/allocation.hpp" #include "memory/allocation.inline.hpp" @@ -34,6 +34,7 @@ #include "oops/oop.inline.hpp" #include "oops/fieldStreams.hpp" #include "runtime/fieldDescriptor.hpp" +#include "runtime/handles.inline.hpp" #include "runtime/jniHandles.inline.hpp" // ciInstanceKlass --- old/src/hotspot/share/ci/ciKlass.cpp 2018-03-15 12:07:34.176246644 -0400 +++ new/src/hotspot/share/ci/ciKlass.cpp 2018-03-15 12:07:33.557189827 -0400 @@ -25,7 +25,7 @@ #include "precompiled.hpp" #include "ci/ciKlass.hpp" #include "ci/ciSymbol.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "oops/oop.inline.hpp" // ciKlass --- old/src/hotspot/share/ci/ciMemberName.cpp 2018-03-15 12:07:34.883311538 -0400 +++ new/src/hotspot/share/ci/ciMemberName.cpp 2018-03-15 12:07:34.265254813 -0400 @@ -25,7 +25,7 @@ #include "precompiled.hpp" #include "ci/ciClassList.hpp" #include "ci/ciMemberName.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "classfile/javaClasses.hpp" // ------------------------------------------------------------------ --- old/src/hotspot/share/ci/ciMetadata.cpp 2018-03-15 12:07:35.590376431 -0400 +++ new/src/hotspot/share/ci/ciMetadata.cpp 2018-03-15 12:07:34.967319248 -0400 @@ -24,7 +24,7 @@ #include "precompiled.hpp" #include "ci/ciObject.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "gc/shared/collectedHeap.inline.hpp" // ------------------------------------------------------------------ --- old/src/hotspot/share/ci/ciMethod.cpp 2018-03-15 12:07:36.293440958 -0400 +++ new/src/hotspot/share/ci/ciMethod.cpp 2018-03-15 12:07:35.675384233 -0400 @@ -32,7 +32,7 @@ #include "ci/ciStreams.hpp" #include "ci/ciSymbol.hpp" #include "ci/ciReplay.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "classfile/systemDictionary.hpp" #include "compiler/abstractCompiler.hpp" #include "compiler/methodLiveness.hpp" --- old/src/hotspot/share/ci/ciMethodData.cpp 2018-03-15 12:07:37.024508055 -0400 +++ new/src/hotspot/share/ci/ciMethodData.cpp 2018-03-15 12:07:36.406451330 -0400 @@ -26,7 +26,7 @@ #include "ci/ciMetadata.hpp" #include "ci/ciMethodData.hpp" #include "ci/ciReplay.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "memory/allocation.inline.hpp" #include "memory/resourceArea.hpp" #include "runtime/deoptimization.hpp" --- old/src/hotspot/share/ci/ciMethodHandle.cpp 2018-03-15 12:07:37.745574234 -0400 +++ new/src/hotspot/share/ci/ciMethodHandle.cpp 2018-03-15 12:07:37.123517142 -0400 @@ -25,7 +25,7 @@ #include "precompiled.hpp" #include "ci/ciClassList.hpp" #include "ci/ciMethodHandle.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "classfile/javaClasses.hpp" // ------------------------------------------------------------------ --- old/src/hotspot/share/ci/ciMethodType.hpp 2018-03-15 12:07:38.447638668 -0400 +++ new/src/hotspot/share/ci/ciMethodType.hpp 2018-03-15 12:07:37.829581944 -0400 @@ -26,23 +26,13 @@ #define SHARE_VM_CI_CIMETHODTYPE_HPP #include "ci/ciInstance.hpp" -#include "ci/ciUtilities.hpp" -#include "classfile/javaClasses.hpp" // ciMethodType // // The class represents a java.lang.invoke.MethodType object. class ciMethodType : public ciInstance { private: - ciType* class_to_citype(oop klass_oop) const { - if (java_lang_Class::is_primitive(klass_oop)) { - BasicType bt = java_lang_Class::primitive_type(klass_oop); - return ciType::make(bt); - } else { - Klass* k = java_lang_Class::as_Klass(klass_oop); - return CURRENT_ENV->get_klass(k); - } - } + ciType* class_to_citype(oop klass_oop) const; public: ciMethodType(instanceHandle h_i) : ciInstance(h_i) {} @@ -50,27 +40,12 @@ // What kind of ciObject is this? bool is_method_type() const { return true; } - ciType* rtype() const { - GUARDED_VM_ENTRY( - oop rtype = java_lang_invoke_MethodType::rtype(get_oop()); - return class_to_citype(rtype); - ) - } - - int ptype_count() const { - GUARDED_VM_ENTRY(return java_lang_invoke_MethodType::ptype_count(get_oop());) - } - - int ptype_slot_count() const { - GUARDED_VM_ENTRY(return java_lang_invoke_MethodType::ptype_slot_count(get_oop());) - } - - ciType* ptype_at(int index) const { - GUARDED_VM_ENTRY( - oop ptype = java_lang_invoke_MethodType::ptype(get_oop(), index); - return class_to_citype(ptype); - ) - } + ciType* rtype() const; + + int ptype_count() const; + int ptype_slot_count() const ; + + ciType* ptype_at(int index) const; }; #endif // SHARE_VM_CI_CIMETHODTYPE_HPP --- old/src/hotspot/share/ci/ciNullObject.cpp 2018-03-15 12:07:39.162704296 -0400 +++ new/src/hotspot/share/ci/ciNullObject.cpp 2018-03-15 12:07:38.537646929 -0400 @@ -24,6 +24,7 @@ #include "precompiled.hpp" #include "ci/ciNullObject.hpp" +#include "ci/ciUtilities.hpp" // ciNullObject // --- old/src/hotspot/share/ci/ciNullObject.hpp 2018-03-15 12:07:39.865768823 -0400 +++ new/src/hotspot/share/ci/ciNullObject.hpp 2018-03-15 12:07:39.246712007 -0400 @@ -27,7 +27,6 @@ #include "ci/ciClassList.hpp" #include "ci/ciObject.hpp" -#include "ci/ciUtilities.hpp" // ciNullObject // --- old/src/hotspot/share/ci/ciObjArray.cpp 2018-03-15 12:07:40.568833350 -0400 +++ new/src/hotspot/share/ci/ciObjArray.cpp 2018-03-15 12:07:39.949776533 -0400 @@ -25,7 +25,7 @@ #include "precompiled.hpp" #include "ci/ciNullObject.hpp" #include "ci/ciObjArray.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "oops/objArrayOop.inline.hpp" // ciObjArray --- old/src/hotspot/share/ci/ciObjArrayKlass.cpp 2018-03-15 12:07:41.272897968 -0400 +++ new/src/hotspot/share/ci/ciObjArrayKlass.cpp 2018-03-15 12:07:40.652841060 -0400 @@ -26,7 +26,7 @@ #include "ci/ciInstanceKlass.hpp" #include "ci/ciObjArrayKlass.hpp" #include "ci/ciSymbol.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "oops/objArrayKlass.hpp" // ciObjArrayKlass --- old/src/hotspot/share/ci/ciObject.cpp 2018-03-15 12:07:41.980962954 -0400 +++ new/src/hotspot/share/ci/ciObject.cpp 2018-03-15 12:07:41.360906045 -0400 @@ -24,7 +24,7 @@ #include "precompiled.hpp" #include "ci/ciObject.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "gc/shared/collectedHeap.inline.hpp" #include "oops/oop.inline.hpp" #include "runtime/jniHandles.inline.hpp" --- old/src/hotspot/share/ci/ciObjectFactory.cpp 2018-03-15 12:07:42.693028306 -0400 +++ new/src/hotspot/share/ci/ciObjectFactory.cpp 2018-03-15 12:07:42.071971306 -0400 @@ -39,13 +39,14 @@ #include "ci/ciSymbol.hpp" #include "ci/ciTypeArray.hpp" #include "ci/ciTypeArrayKlass.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "classfile/javaClasses.inline.hpp" #include "classfile/systemDictionary.hpp" #include "gc/shared/collectedHeap.inline.hpp" #include "memory/allocation.inline.hpp" #include "oops/oop.inline.hpp" #include "runtime/fieldType.hpp" +#include "runtime/handles.inline.hpp" #include "utilities/macros.hpp" // ciObjectFactory --- old/src/hotspot/share/ci/ciReplay.cpp 2018-03-15 12:07:43.416094669 -0400 +++ new/src/hotspot/share/ci/ciReplay.cpp 2018-03-15 12:07:42.796037760 -0400 @@ -28,7 +28,7 @@ #include "ci/ciReplay.hpp" #include "ci/ciSymbol.hpp" #include "ci/ciKlass.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "compiler/compileBroker.hpp" #include "memory/allocation.inline.hpp" #include "memory/oopFactory.hpp" --- old/src/hotspot/share/ci/ciSignature.cpp 2018-03-15 12:07:44.144161490 -0400 +++ new/src/hotspot/share/ci/ciSignature.cpp 2018-03-15 12:07:43.526104765 -0400 @@ -25,7 +25,7 @@ #include "precompiled.hpp" #include "ci/ciMethodType.hpp" #include "ci/ciSignature.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "memory/allocation.inline.hpp" #include "memory/resourceArea.hpp" #include "oops/oop.inline.hpp" --- old/src/hotspot/share/ci/ciSignature.hpp 2018-03-15 12:07:44.852226476 -0400 +++ new/src/hotspot/share/ci/ciSignature.hpp 2018-03-15 12:07:44.232169567 -0400 @@ -27,6 +27,7 @@ #include "ci/ciClassList.hpp" #include "ci/ciSymbol.hpp" +#include "interpreter/bytecodes.hpp" #include "utilities/globalDefinitions.hpp" #include "utilities/growableArray.hpp" --- old/src/hotspot/share/ci/ciStreams.cpp 2018-03-15 12:07:45.556291094 -0400 +++ new/src/hotspot/share/ci/ciStreams.cpp 2018-03-15 12:07:44.936234186 -0400 @@ -27,7 +27,8 @@ #include "ci/ciConstant.hpp" #include "ci/ciField.hpp" #include "ci/ciStreams.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" +#include "runtime/handles.inline.hpp" // ciExceptionHandlerStream // --- old/src/hotspot/share/ci/ciSymbol.cpp 2018-03-15 12:07:46.275357089 -0400 +++ new/src/hotspot/share/ci/ciSymbol.cpp 2018-03-15 12:07:45.650299722 -0400 @@ -24,7 +24,7 @@ #include "precompiled.hpp" #include "ci/ciSymbol.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "memory/oopFactory.hpp" // ------------------------------------------------------------------ --- old/src/hotspot/share/ci/ciType.cpp 2018-03-15 12:07:46.983422075 -0400 +++ new/src/hotspot/share/ci/ciType.cpp 2018-03-15 12:07:46.361364983 -0400 @@ -25,7 +25,7 @@ #include "precompiled.hpp" #include "ci/ciEnv.hpp" #include "ci/ciType.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "classfile/systemDictionary.hpp" #include "memory/resourceArea.hpp" #include "oops/oop.inline.hpp" --- old/src/hotspot/share/ci/ciTypeArray.cpp 2018-03-15 12:07:47.692487152 -0400 +++ new/src/hotspot/share/ci/ciTypeArray.cpp 2018-03-15 12:07:47.072430244 -0400 @@ -24,7 +24,7 @@ #include "precompiled.hpp" #include "ci/ciTypeArray.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "oops/typeArrayOop.inline.hpp" // ciTypeArray --- old/src/hotspot/share/ci/ciTypeArrayKlass.cpp 2018-03-15 12:07:48.408552872 -0400 +++ new/src/hotspot/share/ci/ciTypeArrayKlass.cpp 2018-03-15 12:07:47.776494863 -0400 @@ -24,7 +24,7 @@ #include "precompiled.hpp" #include "ci/ciTypeArrayKlass.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" // ciTypeArrayKlass // --- old/src/hotspot/share/ci/ciUtilities.cpp 2018-03-15 12:07:49.113617582 -0400 +++ new/src/hotspot/share/ci/ciUtilities.cpp 2018-03-15 12:07:48.492560582 -0400 @@ -26,6 +26,7 @@ #include "ci/ciUtilities.hpp" #include "gc/shared/cardTableModRefBS.hpp" #include "gc/shared/cardTable.hpp" +#include "gc/shared/collectedHeap.hpp" #include "memory/universe.hpp" // ciUtilities --- old/src/hotspot/share/ci/ciUtilities.hpp 2018-03-15 12:07:49.821682568 -0400 +++ new/src/hotspot/share/ci/ciUtilities.hpp 2018-03-15 12:07:49.196625201 -0400 @@ -26,45 +26,11 @@ #define SHARE_VM_CI_CIUTILITIES_HPP #include "ci/ciEnv.hpp" -#include "runtime/interfaceSupport.hpp" #include "utilities/globalDefinitions.hpp" // The following routines and definitions are used internally in the // compiler interface. - -// Add a ci native entry wrapper? - -// Bring the compilation thread into the VM state. -#define VM_ENTRY_MARK \ - CompilerThread* thread=CompilerThread::current(); \ - ThreadInVMfromNative __tiv(thread); \ - ResetNoHandleMark rnhm; \ - HandleMarkCleaner __hm(thread); \ - Thread* THREAD = thread; \ - debug_only(VMNativeEntryWrapper __vew;) - - - -// Bring the compilation thread into the VM state. No handle mark. -#define VM_QUICK_ENTRY_MARK \ - CompilerThread* thread=CompilerThread::current(); \ - ThreadInVMfromNative __tiv(thread); \ -/* \ - * [TODO] The NoHandleMark line does nothing but declare a function prototype \ - * The NoHandkeMark constructor is NOT executed. If the ()'s are \ - * removed, causes the NoHandleMark assert to trigger. \ - * debug_only(NoHandleMark __hm();) \ - */ \ - Thread* THREAD = thread; \ - debug_only(VMNativeEntryWrapper __vew;) - - -#define EXCEPTION_CONTEXT \ - CompilerThread* thread=CompilerThread::current(); \ - Thread* THREAD = thread; - - #define CURRENT_ENV \ ciEnv::current() @@ -78,36 +44,6 @@ #define ASSERT_IN_VM \ assert(IS_IN_VM, "must be in vm state"); -#define GUARDED_VM_ENTRY(action) \ - {if (IS_IN_VM) { action } else { VM_ENTRY_MARK; { action }}} - -#define GUARDED_VM_QUICK_ENTRY(action) \ - {if (IS_IN_VM) { action } else { VM_QUICK_ENTRY_MARK; { action }}} - -// Redefine this later. -#define KILL_COMPILE_ON_FATAL_(result) \ - THREAD); \ - if (HAS_PENDING_EXCEPTION) { \ - if (PENDING_EXCEPTION->klass() == \ - SystemDictionary::ThreadDeath_klass()) { \ - /* Kill the compilation. */ \ - fatal("unhandled ci exception"); \ - return (result); \ - } \ - CLEAR_PENDING_EXCEPTION; \ - return (result); \ - } \ - (void)(0 - -#define KILL_COMPILE_ON_ANY \ - THREAD); \ - if (HAS_PENDING_EXCEPTION) { \ - fatal("unhandled ci exception"); \ - CLEAR_PENDING_EXCEPTION; \ - } \ -(void)(0 - - inline const char* bool_to_str(bool b) { return ((b) ? "true" : "false"); } --- old/src/hotspot/share/classfile/classLoader.cpp 2018-03-15 12:07:50.829775090 -0400 +++ new/src/hotspot/share/classfile/classLoader.cpp 2018-03-15 12:07:50.178715336 -0400 @@ -61,7 +61,7 @@ #include "runtime/handles.hpp" #include "runtime/handles.inline.hpp" #include "runtime/init.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/os.hpp" --- old/src/hotspot/share/classfile/javaClasses.cpp 2018-03-15 12:07:51.579843931 -0400 +++ new/src/hotspot/share/classfile/javaClasses.cpp 2018-03-15 12:07:50.956786747 -0400 @@ -51,7 +51,7 @@ #include "prims/resolvedMethodTable.hpp" #include "runtime/fieldDescriptor.hpp" #include "runtime/handles.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/jniHandles.inline.hpp" --- old/src/hotspot/share/classfile/stackMapTable.cpp 2018-03-15 12:07:52.403919564 -0400 +++ new/src/hotspot/share/classfile/stackMapTable.cpp 2018-03-15 12:07:51.764860911 -0400 @@ -144,6 +144,20 @@ str->print_cr(" }"); } +StackMapReader::StackMapReader(ClassVerifier* v, StackMapStream* stream, char* code_data, + int32_t code_len, TRAPS) : + _verifier(v), _stream(stream), + _code_data(code_data), _code_length(code_len) { + methodHandle m = v->method(); + if (m->has_stackmap_table()) { + _cp = constantPoolHandle(THREAD, m->constants()); + _frame_count = _stream->get_u2(CHECK); + } else { + // There's no stackmap table present. Frame count and size are 0. + _frame_count = 0; + } +} + int32_t StackMapReader::chop( VerificationType* locals, int32_t length, int32_t chops) { if (locals == NULL) return -1; --- old/src/hotspot/share/classfile/stackMapTable.hpp 2018-03-15 12:07:53.122985559 -0400 +++ new/src/hotspot/share/classfile/stackMapTable.hpp 2018-03-15 12:07:52.496928100 -0400 @@ -142,18 +142,7 @@ public: // Constructor StackMapReader(ClassVerifier* v, StackMapStream* stream, char* code_data, - int32_t code_len, TRAPS) : - _verifier(v), _stream(stream), - _code_data(code_data), _code_length(code_len) { - methodHandle m = v->method(); - if (m->has_stackmap_table()) { - _cp = constantPoolHandle(THREAD, m->constants()); - _frame_count = _stream->get_u2(CHECK); - } else { - // There's no stackmap table present. Frame count and size are 0. - _frame_count = 0; - } - } + int32_t code_len, TRAPS); inline int32_t get_frame_count() const { return _frame_count; } StackMapFrame* next(StackMapFrame* pre_frame, bool first, --- old/src/hotspot/share/classfile/verifier.cpp 2018-03-15 12:07:53.833050728 -0400 +++ new/src/hotspot/share/classfile/verifier.cpp 2018-03-15 12:07:53.207993361 -0400 @@ -44,7 +44,7 @@ #include "oops/typeArrayOop.hpp" #include "runtime/fieldDescriptor.hpp" #include "runtime/handles.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/javaCalls.hpp" #include "runtime/jniHandles.inline.hpp" #include "runtime/orderAccess.inline.hpp" --- old/src/hotspot/share/code/codeBlob.cpp 2018-03-15 12:07:54.613122322 -0400 +++ new/src/hotspot/share/code/codeBlob.cpp 2018-03-15 12:07:53.984064588 -0400 @@ -35,7 +35,7 @@ #include "oops/oop.inline.hpp" #include "prims/forte.hpp" #include "runtime/handles.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/mutexLocker.hpp" #include "runtime/safepoint.hpp" #include "runtime/sharedRuntime.hpp" --- old/src/hotspot/share/code/compiledMethod.cpp 2018-03-15 12:07:55.331188226 -0400 +++ new/src/hotspot/share/code/compiledMethod.cpp 2018-03-15 12:07:54.709131134 -0400 @@ -31,6 +31,7 @@ #include "interpreter/bytecode.inline.hpp" #include "memory/resourceArea.hpp" #include "oops/method.inline.hpp" +#include "runtime/handles.inline.hpp" #include "runtime/mutexLocker.hpp" CompiledMethod::CompiledMethod(Method* method, const char* name, CompilerType type, const CodeBlobLayout& layout, int frame_complete_offset, int frame_size, ImmutableOopMapSet* oop_maps, bool caller_must_gc_arguments) --- old/src/hotspot/share/code/debugInfo.cpp 2018-03-15 12:07:56.049254129 -0400 +++ new/src/hotspot/share/code/debugInfo.cpp 2018-03-15 12:07:55.430197313 -0400 @@ -28,7 +28,7 @@ #include "code/nmethod.hpp" #include "oops/oop.inline.hpp" #include "runtime/handles.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/jniHandles.inline.hpp" #include "runtime/thread.hpp" @@ -121,6 +121,10 @@ // ObjectValue +void ObjectValue::set_value(oop value) { + _value = Handle(Thread::current(), value); +} + void ObjectValue::read_object(DebugInfoReadStream* stream) { _klass = read_from(stream); assert(_klass->is_constant_oop(), "should be constant java mirror oop"); --- old/src/hotspot/share/code/debugInfo.hpp 2018-03-15 12:07:56.761319482 -0400 +++ new/src/hotspot/share/code/debugInfo.hpp 2018-03-15 12:07:56.138262298 -0400 @@ -128,7 +128,7 @@ Handle value() const { return _value; } bool is_visited() const { return _visited; } - void set_value(oop value) { _value = Handle(Thread::current(), value); } + void set_value(oop value); void set_visited(bool visited) { _visited = false; } // Serialization of debugging information --- old/src/hotspot/share/code/nmethod.cpp 2018-03-15 12:07:57.472384743 -0400 +++ new/src/hotspot/share/code/nmethod.cpp 2018-03-15 12:07:56.852327835 -0400 @@ -36,6 +36,7 @@ #include "compiler/compilerDirectives.hpp" #include "compiler/directivesParser.hpp" #include "compiler/disassembler.hpp" +#include "gc/shared/gcLocker.hpp" #include "interpreter/bytecode.hpp" #include "logging/log.hpp" #include "logging/logStream.hpp" --- old/src/hotspot/share/compiler/compileBroker.cpp 2018-03-15 12:07:58.247455878 -0400 +++ new/src/hotspot/share/compiler/compileBroker.cpp 2018-03-15 12:07:57.625398786 -0400 @@ -47,7 +47,7 @@ #include "runtime/atomic.hpp" #include "runtime/compilationPolicy.hpp" #include "runtime/init.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/javaCalls.hpp" #include "runtime/os.hpp" #include "runtime/sharedRuntime.hpp" --- old/src/hotspot/share/compiler/compilerDirectives.cpp 2018-03-15 12:07:59.005525453 -0400 +++ new/src/hotspot/share/compiler/compilerDirectives.cpp 2018-03-15 12:07:58.383468362 -0400 @@ -24,7 +24,7 @@ #include "precompiled.hpp" #include "ci/ciMethod.hpp" -#include "ci/ciUtilities.hpp" +#include "ci/ciUtilities.inline.hpp" #include "compiler/abstractCompiler.hpp" #include "compiler/compilerDirectives.hpp" #include "compiler/compilerOracle.hpp" --- old/src/hotspot/share/compiler/compilerDirectives.hpp 2018-03-15 12:07:59.719590990 -0400 +++ new/src/hotspot/share/compiler/compilerDirectives.hpp 2018-03-15 12:07:59.099534081 -0400 @@ -27,7 +27,6 @@ #include "ci/ciMetadata.hpp" #include "ci/ciMethod.hpp" -#include "ci/ciUtilities.hpp" #include "compiler/methodMatcher.hpp" #include "compiler/compilerOracle.hpp" #include "utilities/exceptions.hpp" --- old/src/hotspot/share/gc/cms/concurrentMarkSweepThread.cpp 2018-03-15 12:08:00.434656618 -0400 +++ new/src/hotspot/share/gc/cms/concurrentMarkSweepThread.cpp 2018-03-15 12:07:59.814599710 -0400 @@ -30,7 +30,6 @@ #include "gc/shared/gcId.hpp" #include "oops/oop.inline.hpp" #include "runtime/init.hpp" -#include "runtime/interfaceSupport.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/share/gc/cms/vmCMSOperations.cpp 2018-03-15 12:08:01.143721695 -0400 +++ new/src/hotspot/share/gc/cms/vmCMSOperations.cpp 2018-03-15 12:08:00.523664787 -0400 @@ -31,7 +31,8 @@ #include "gc/shared/gcTimer.hpp" #include "gc/shared/gcTraceTime.inline.hpp" #include "gc/shared/isGCActiveMark.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/handles.inline.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/os.hpp" #include "utilities/dtrace.hpp" --- old/src/hotspot/share/gc/g1/vm_operations_g1.cpp 2018-03-15 12:08:01.854786956 -0400 +++ new/src/hotspot/share/gc/g1/vm_operations_g1.cpp 2018-03-15 12:08:01.231729773 -0400 @@ -31,7 +31,7 @@ #include "gc/shared/gcTimer.hpp" #include "gc/shared/gcTraceTime.inline.hpp" #include "gc/shared/isGCActiveMark.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" void VM_G1CollectFull::doit() { G1CollectedHeap* g1h = G1CollectedHeap::heap(); --- old/src/hotspot/share/gc/shared/concurrentGCThread.cpp 2018-03-15 12:08:02.576853227 -0400 +++ new/src/hotspot/share/gc/shared/concurrentGCThread.cpp 2018-03-15 12:08:01.958796502 -0400 @@ -28,7 +28,6 @@ #include "oops/instanceRefKlass.hpp" #include "oops/oop.inline.hpp" #include "runtime/init.hpp" -#include "runtime/interfaceSupport.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/os.hpp" --- old/src/hotspot/share/gc/shared/vmGCOperations.cpp 2018-03-15 12:08:03.282918029 -0400 +++ new/src/hotspot/share/gc/shared/vmGCOperations.cpp 2018-03-15 12:08:02.662861121 -0400 @@ -35,7 +35,6 @@ #include "memory/oopFactory.hpp" #include "runtime/handles.inline.hpp" #include "runtime/init.hpp" -#include "runtime/interfaceSupport.hpp" #include "utilities/dtrace.hpp" #include "utilities/macros.hpp" #include "utilities/preserveException.hpp" --- old/src/hotspot/share/interpreter/bytecodeInterpreter.cpp 2018-03-15 12:08:03.993983290 -0400 +++ new/src/hotspot/share/interpreter/bytecodeInterpreter.cpp 2018-03-15 12:08:03.372926290 -0400 @@ -47,7 +47,7 @@ #include "runtime/biasedLocking.hpp" #include "runtime/frame.inline.hpp" #include "runtime/handles.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/orderAccess.inline.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/threadCritical.hpp" --- old/src/hotspot/share/interpreter/interpreterRuntime.cpp 2018-03-15 12:08:04.789056261 -0400 +++ new/src/hotspot/share/interpreter/interpreterRuntime.cpp 2018-03-15 12:08:04.165999078 -0400 @@ -55,7 +55,7 @@ #include "runtime/fieldDescriptor.hpp" #include "runtime/handles.inline.hpp" #include "runtime/icache.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/jfieldIDWorkaround.hpp" #include "runtime/osThread.hpp" --- old/src/hotspot/share/interpreter/linkResolver.cpp 2018-03-15 12:08:05.523123633 -0400 +++ new/src/hotspot/share/interpreter/linkResolver.cpp 2018-03-15 12:08:04.904066817 -0400 @@ -32,6 +32,7 @@ #include "classfile/vmSymbols.hpp" #include "compiler/compileBroker.hpp" #include "gc/shared/collectedHeap.inline.hpp" +#include "gc/shared/gcLocker.hpp" #include "interpreter/bytecode.hpp" #include "interpreter/interpreterRuntime.hpp" #include "interpreter/linkResolver.hpp" --- old/src/hotspot/share/jvmci/compilerRuntime.cpp 2018-03-15 12:08:06.282193300 -0400 +++ new/src/hotspot/share/jvmci/compilerRuntime.cpp 2018-03-15 12:08:05.659136117 -0400 @@ -30,7 +30,7 @@ #include "oops/oop.inline.hpp" #include "runtime/compilationPolicy.hpp" #include "runtime/deoptimization.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/vframe.hpp" #include "aot/aotLoader.hpp" --- old/src/hotspot/share/jvmci/jvmciCodeInstaller.cpp 2018-03-15 12:08:07.003259479 -0400 +++ new/src/hotspot/share/jvmci/jvmciCodeInstaller.cpp 2018-03-15 12:08:06.371201469 -0400 @@ -39,6 +39,7 @@ #include "oops/oop.inline.hpp" #include "oops/objArrayOop.inline.hpp" #include "oops/typeArrayOop.inline.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/javaCalls.hpp" #include "runtime/jniHandles.inline.hpp" #include "runtime/safepointMechanism.inline.hpp" --- old/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp 2018-03-15 12:08:07.736326759 -0400 +++ new/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp 2018-03-15 12:08:07.115269759 -0400 @@ -22,6 +22,7 @@ */ #include "precompiled.hpp" +#include "ci/ciUtilities.inline.hpp" #include "classfile/javaClasses.inline.hpp" #include "code/scopeDesc.hpp" #include "memory/oopFactory.hpp" @@ -35,6 +36,7 @@ #include "jvmci/jvmciCompilerToVM.hpp" #include "jvmci/jvmciCodeInstaller.hpp" #include "jvmci/jvmciRuntime.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/jniHandles.inline.hpp" #include "runtime/timerTrace.hpp" #include "runtime/vframe_hp.hpp" @@ -98,6 +100,12 @@ return NULL; } +Handle JavaArgumentUnboxer::next_arg(BasicType expectedType) { + assert(_index < _args->length(), "out of bounds"); + oop arg=((objArrayOop) (_args))->obj_at(_index++); + assert(expectedType == T_OBJECT || java_lang_boxing_object::is_instance(arg, expectedType), "arg type mismatch"); + return Handle(Thread::current(), arg); +} jobjectArray readConfiguration0(JNIEnv *env, TRAPS); --- old/src/hotspot/share/jvmci/jvmciCompilerToVM.hpp 2018-03-15 12:08:08.476394682 -0400 +++ new/src/hotspot/share/jvmci/jvmciCompilerToVM.hpp 2018-03-15 12:08:07.854337590 -0400 @@ -170,12 +170,7 @@ arrayOop _args; int _index; - Handle next_arg(BasicType expectedType) { - assert(_index < _args->length(), "out of bounds"); - oop arg=((objArrayOop) (_args))->obj_at(_index++); - assert(expectedType == T_OBJECT || java_lang_boxing_object::is_instance(arg, expectedType), "arg type mismatch"); - return Handle(Thread::current(), arg); - } + Handle next_arg(BasicType expectedType); public: JavaArgumentUnboxer(Symbol* signature, JavaCallArguments* jca, arrayOop args, bool is_static) : SignatureIterator(signature) { --- old/src/hotspot/share/jvmci/jvmciRuntime.cpp 2018-03-15 12:08:09.198460953 -0400 +++ new/src/hotspot/share/jvmci/jvmciRuntime.cpp 2018-03-15 12:08:08.576403861 -0400 @@ -40,7 +40,7 @@ #include "oops/oop.inline.hpp" #include "oops/objArrayOop.inline.hpp" #include "runtime/biasedLocking.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/jniHandles.inline.hpp" #include "runtime/reflection.hpp" #include "runtime/sharedRuntime.hpp" --- old/src/hotspot/share/libadt/vectset.cpp 2018-03-15 12:08:09.920527224 -0400 +++ new/src/hotspot/share/libadt/vectset.cpp 2018-03-15 12:08:09.301470407 -0400 @@ -25,6 +25,7 @@ #include "precompiled.hpp" #include "libadt/vectset.hpp" #include "memory/allocation.inline.hpp" +#include "memory/arena.hpp" // Vector Sets - An Abstract Data Type --- old/src/hotspot/share/memory/metaspace.hpp 2018-03-15 12:08:10.631592485 -0400 +++ new/src/hotspot/share/memory/metaspace.hpp 2018-03-15 12:08:10.012535668 -0400 @@ -66,6 +66,7 @@ class PrintCLDMetaspaceInfoClosure; class SpaceManager; class VirtualSpaceList; +class CollectedHeap; // Metaspaces each have a SpaceManager and allocations // are done by the SpaceManager. Allocations are done --- old/src/hotspot/share/oops/constantPool.cpp 2018-03-15 12:08:11.369660224 -0400 +++ new/src/hotspot/share/oops/constantPool.cpp 2018-03-15 12:08:10.723600929 -0400 @@ -47,6 +47,7 @@ #include "oops/oop.inline.hpp" #include "oops/typeArrayOop.inline.hpp" #include "runtime/fieldType.hpp" +#include "runtime/handles.inline.hpp" #include "runtime/init.hpp" #include "runtime/javaCalls.hpp" #include "runtime/signature.hpp" --- old/src/hotspot/share/oops/methodData.cpp 2018-03-15 12:08:12.203736775 -0400 +++ new/src/hotspot/share/oops/methodData.cpp 2018-03-15 12:08:11.526674635 -0400 @@ -25,6 +25,7 @@ #include "precompiled.hpp" #include "classfile/systemDictionary.hpp" #include "compiler/compilerOracle.hpp" +#include "gc/shared/gcLocker.hpp" #include "interpreter/bytecode.hpp" #include "interpreter/bytecodeStream.hpp" #include "interpreter/linkResolver.hpp" --- old/src/hotspot/share/opto/library_call.cpp 2018-03-15 12:08:13.008810664 -0400 +++ new/src/hotspot/share/opto/library_call.cpp 2018-03-15 12:08:12.329748340 -0400 @@ -24,6 +24,7 @@ #include "precompiled.hpp" #include "asm/macroAssembler.hpp" +#include "ci/ciUtilities.inline.hpp" #include "classfile/systemDictionary.hpp" #include "classfile/vmSymbols.hpp" #include "compiler/compileBroker.hpp" --- old/src/hotspot/share/opto/macro.cpp 2018-03-15 12:08:13.856888500 -0400 +++ new/src/hotspot/share/opto/macro.cpp 2018-03-15 12:08:13.277835355 -0400 @@ -24,6 +24,7 @@ #include "precompiled.hpp" #include "compiler/compileLog.hpp" +#include "gc/shared/collectedHeap.inline.hpp" #include "libadt/vectset.hpp" #include "opto/addnode.hpp" #include "opto/arraycopynode.hpp" --- old/src/hotspot/share/opto/parse1.cpp 2018-03-15 12:08:14.659962206 -0400 +++ new/src/hotspot/share/opto/parse1.cpp 2018-03-15 12:08:14.013902911 -0400 @@ -39,6 +39,7 @@ #include "opto/runtime.hpp" #include "runtime/arguments.hpp" #include "runtime/handles.inline.hpp" +#include "runtime/safepointMechanism.hpp" #include "runtime/sharedRuntime.hpp" #include "utilities/copy.hpp" --- old/src/hotspot/share/opto/runtime.cpp 2018-03-15 12:08:15.512040409 -0400 +++ new/src/hotspot/share/opto/runtime.cpp 2018-03-15 12:08:14.820976983 -0400 @@ -61,7 +61,7 @@ #include "opto/subnode.hpp" #include "runtime/atomic.hpp" #include "runtime/handles.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/javaCalls.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/signature.hpp" --- old/src/hotspot/share/precompiled/precompiled.hpp 2018-03-15 12:08:16.358118061 -0400 +++ new/src/hotspot/share/precompiled/precompiled.hpp 2018-03-15 12:08:15.648052892 -0400 @@ -54,7 +54,7 @@ # include "ci/ciSymbol.hpp" # include "ci/ciType.hpp" # include "ci/ciTypeArrayKlass.hpp" -# include "ci/ciUtilities.hpp" +# include "ci/ciUtilities.inline.hpp" # include "ci/compilerInterface.hpp" # include "classfile/classFileParser.hpp" # include "classfile/classFileStream.hpp" @@ -176,7 +176,7 @@ # include "runtime/handles.inline.hpp" # include "runtime/icache.hpp" # include "runtime/init.hpp" -# include "runtime/interfaceSupport.hpp" +# include "runtime/interfaceSupport.inline.hpp" # include "runtime/java.hpp" # include "runtime/javaCalls.hpp" # include "runtime/javaFrameAnchor.hpp" --- old/src/hotspot/share/prims/jni.cpp 2018-03-15 12:08:17.186194061 -0400 +++ new/src/hotspot/share/prims/jni.cpp 2018-03-15 12:08:16.472128525 -0400 @@ -65,7 +65,7 @@ #include "runtime/compilationPolicy.hpp" #include "runtime/fieldDescriptor.hpp" #include "runtime/handles.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/jfieldIDWorkaround.hpp" --- old/src/hotspot/share/prims/jniCheck.cpp 2018-03-15 12:08:18.057274008 -0400 +++ new/src/hotspot/share/prims/jniCheck.cpp 2018-03-15 12:08:17.377211593 -0400 @@ -36,8 +36,8 @@ #include "prims/jniCheck.hpp" #include "prims/jvm_misc.hpp" #include "runtime/fieldDescriptor.hpp" -#include "runtime/handles.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/handles.inline.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/jfieldIDWorkaround.hpp" #include "runtime/jniHandles.inline.hpp" #include "runtime/thread.inline.hpp" --- old/src/hotspot/share/prims/jvm.cpp 2018-03-15 12:08:18.868348448 -0400 +++ new/src/hotspot/share/prims/jvm.cpp 2018-03-15 12:08:18.209287960 -0400 @@ -57,7 +57,7 @@ #include "runtime/atomic.hpp" #include "runtime/handles.inline.hpp" #include "runtime/init.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/jfieldIDWorkaround.hpp" --- old/src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp 2018-03-15 12:08:19.786432709 -0400 +++ new/src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp 2018-03-15 12:08:19.043364511 -0400 @@ -34,6 +34,19 @@ // FIXME: fix Synthetic attribute // FIXME: per Serguei, add error return handling for ConstantPool::copy_cpool_bytes() +JvmtiConstantPoolReconstituter::JvmtiConstantPoolReconstituter(InstanceKlass* ik) { + set_error(JVMTI_ERROR_NONE); + _ik = ik; + _cpool = constantPoolHandle(Thread::current(), ik->constants()); + _symmap = new SymbolHashMap(); + _classmap = new SymbolHashMap(); + _cpool_size = _cpool->hash_entries_to(_symmap, _classmap); + if (_cpool_size == 0) { + set_error(JVMTI_ERROR_OUT_OF_MEMORY); + } else if (_cpool_size < 0) { + set_error(JVMTI_ERROR_INTERNAL); + } +} // Write the field information portion of ClassFile structure // JVMSpec| u2 fields_count; --- old/src/hotspot/share/prims/jvmtiClassFileReconstituter.hpp 2018-03-15 12:08:20.532501183 -0400 +++ new/src/hotspot/share/prims/jvmtiClassFileReconstituter.hpp 2018-03-15 12:08:19.892442439 -0400 @@ -52,19 +52,7 @@ public: // Calls to this constructor must be proceeded by a ResourceMark // and a HandleMark - JvmtiConstantPoolReconstituter(InstanceKlass* ik){ - set_error(JVMTI_ERROR_NONE); - _ik = ik; - _cpool = constantPoolHandle(Thread::current(), ik->constants()); - _symmap = new SymbolHashMap(); - _classmap = new SymbolHashMap(); - _cpool_size = _cpool->hash_entries_to(_symmap, _classmap); - if (_cpool_size == 0) { - set_error(JVMTI_ERROR_OUT_OF_MEMORY); - } else if (_cpool_size < 0) { - set_error(JVMTI_ERROR_INTERNAL); - } - } + JvmtiConstantPoolReconstituter(InstanceKlass* ik); ~JvmtiConstantPoolReconstituter() { if (_symmap != NULL) { --- old/src/hotspot/share/prims/jvmtiEnter.xsl 2018-03-15 12:08:21.275569381 -0400 +++ new/src/hotspot/share/prims/jvmtiEnter.xsl 2018-03-15 12:08:20.627509903 -0400 @@ -42,7 +42,7 @@ #if INCLUDE_JVMTI # include "logging/log.hpp" # include "oops/oop.inline.hpp" -# include "prims/jvmtiEnter.hpp" +# include "prims/jvmtiEnter.inline.hpp" # include "prims/jvmtiRawMonitor.hpp" # include "prims/jvmtiUtil.hpp" # include "runtime/threadSMR.hpp" --- old/src/hotspot/share/prims/jvmtiEnv.cpp 2018-03-15 12:08:22.051640608 -0400 +++ new/src/hotspot/share/prims/jvmtiEnv.cpp 2018-03-15 12:08:21.394580304 -0400 @@ -55,7 +55,7 @@ #include "prims/jvmtiUtil.hpp" #include "runtime/arguments.hpp" #include "runtime/deoptimization.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/javaCalls.hpp" #include "runtime/jfieldIDWorkaround.hpp" #include "runtime/jniHandles.inline.hpp" --- old/src/hotspot/share/prims/jvmtiEnvBase.cpp 2018-03-15 12:08:22.903718812 -0400 +++ new/src/hotspot/share/prims/jvmtiEnvBase.cpp 2018-03-15 12:08:22.219656029 -0400 @@ -38,7 +38,7 @@ #include "prims/jvmtiThreadState.inline.hpp" #include "runtime/biasedLocking.hpp" #include "runtime/deoptimization.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/jfieldIDWorkaround.hpp" #include "runtime/jniHandles.inline.hpp" #include "runtime/objectMonitor.hpp" --- old/src/hotspot/share/prims/jvmtiEnvThreadState.cpp 2018-03-15 12:08:23.672789396 -0400 +++ new/src/hotspot/share/prims/jvmtiEnvThreadState.cpp 2018-03-15 12:08:23.023729826 -0400 @@ -32,7 +32,7 @@ #include "prims/jvmtiImpl.hpp" #include "runtime/handles.hpp" #include "runtime/handles.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/javaCalls.hpp" #include "runtime/signature.hpp" #include "runtime/thread.inline.hpp" --- old/src/hotspot/share/prims/jvmtiExport.cpp 2018-03-15 12:08:24.436859522 -0400 +++ new/src/hotspot/share/prims/jvmtiExport.cpp 2018-03-15 12:08:23.766798024 -0400 @@ -48,7 +48,7 @@ #include "prims/jvmtiThreadState.inline.hpp" #include "runtime/arguments.hpp" #include "runtime/handles.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/javaCalls.hpp" #include "runtime/jniHandles.inline.hpp" #include "runtime/objectMonitor.hpp" --- old/src/hotspot/share/prims/jvmtiImpl.cpp 2018-03-15 12:08:25.273936349 -0400 +++ new/src/hotspot/share/prims/jvmtiImpl.cpp 2018-03-15 12:08:24.606875126 -0400 @@ -41,7 +41,7 @@ #include "runtime/deoptimization.hpp" #include "runtime/handles.hpp" #include "runtime/handles.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/javaCalls.hpp" #include "runtime/os.hpp" #include "runtime/serviceThread.hpp" --- old/src/hotspot/share/prims/jvmtiRawMonitor.cpp 2018-03-15 12:08:26.050007576 -0400 +++ new/src/hotspot/share/prims/jvmtiRawMonitor.cpp 2018-03-15 12:08:25.380946170 -0400 @@ -26,7 +26,7 @@ #include "memory/allocation.inline.hpp" #include "prims/jvmtiRawMonitor.hpp" #include "runtime/atomic.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/orderAccess.inline.hpp" #include "runtime/thread.inline.hpp" --- old/src/hotspot/share/prims/jvmtiUtil.cpp 2018-03-15 12:08:26.807077059 -0400 +++ new/src/hotspot/share/prims/jvmtiUtil.cpp 2018-03-15 12:08:26.148016571 -0400 @@ -26,7 +26,7 @@ #include "prims/jvmtiUtil.hpp" #include "runtime/handles.hpp" #include "runtime/handles.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/vm_operations.hpp" #include "utilities/exceptions.hpp" --- old/src/hotspot/share/prims/methodHandles.cpp 2018-03-15 12:08:27.519142412 -0400 +++ new/src/hotspot/share/prims/methodHandles.cpp 2018-03-15 12:08:26.894085045 -0400 @@ -39,6 +39,7 @@ #include "oops/typeArrayOop.inline.hpp" #include "prims/methodHandles.hpp" #include "runtime/compilationPolicy.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/javaCalls.hpp" #include "runtime/jniHandles.inline.hpp" #include "runtime/timerTrace.hpp" --- old/src/hotspot/share/prims/methodHandles.hpp 2018-03-15 12:08:28.354219055 -0400 +++ new/src/hotspot/share/prims/methodHandles.hpp 2018-03-15 12:08:27.643153794 -0400 @@ -29,7 +29,6 @@ #include "classfile/vmSymbols.hpp" #include "runtime/frame.inline.hpp" #include "runtime/globals.hpp" -#include "runtime/interfaceSupport.hpp" #include "utilities/macros.hpp" #ifdef ZERO --- old/src/hotspot/share/prims/perf.cpp 2018-03-15 12:08:29.129290190 -0400 +++ new/src/hotspot/share/prims/perf.cpp 2018-03-15 12:08:28.452228050 -0400 @@ -29,7 +29,7 @@ #include "memory/allocation.inline.hpp" #include "memory/resourceArea.hpp" #include "oops/oop.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/perfData.inline.hpp" #include "runtime/perfMemory.hpp" --- old/src/hotspot/share/prims/unsafe.cpp 2018-03-15 12:08:29.857357012 -0400 +++ new/src/hotspot/share/prims/unsafe.cpp 2018-03-15 12:08:29.231299553 -0400 @@ -37,7 +37,7 @@ #include "prims/unsafe.hpp" #include "runtime/atomic.hpp" #include "runtime/globals.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/jniHandles.inline.hpp" #include "runtime/orderAccess.inline.hpp" #include "runtime/reflection.hpp" --- old/src/hotspot/share/prims/wbtestmethods/parserTests.cpp 2018-03-15 12:08:30.651429891 -0400 +++ new/src/hotspot/share/prims/wbtestmethods/parserTests.cpp 2018-03-15 12:08:30.001370229 -0400 @@ -29,9 +29,9 @@ #include "memory/oopFactory.hpp" #include "memory/resourceArea.hpp" #include "oops/objArrayOop.inline.hpp" -#include "prims/whitebox.hpp" +#include "prims/whitebox.inline.hpp" #include "prims/wbtestmethods/parserTests.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/jniHandles.inline.hpp" #include "services/diagnosticArgument.hpp" #include "services/diagnosticFramework.hpp" --- old/src/hotspot/share/prims/whitebox.cpp 2018-03-15 12:08:31.380496805 -0400 +++ new/src/hotspot/share/prims/whitebox.cpp 2018-03-15 12:08:30.739437969 -0400 @@ -47,12 +47,12 @@ #include "oops/oop.inline.hpp" #include "oops/typeArrayOop.inline.hpp" #include "prims/wbtestmethods/parserTests.hpp" -#include "prims/whitebox.hpp" +#include "prims/whitebox.inline.hpp" #include "runtime/arguments.hpp" #include "runtime/compilationPolicy.hpp" #include "runtime/deoptimization.hpp" #include "runtime/handshake.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/javaCalls.hpp" #include "runtime/jniHandles.inline.hpp" #include "runtime/os.hpp" @@ -88,6 +88,22 @@ #define SIZE_T_MAX_VALUE ((size_t) -1) +#define CHECK_JNI_EXCEPTION_(env, value) \ + do { \ + JavaThread* THREAD = JavaThread::thread_from_jni_environment(env); \ + if (HAS_PENDING_EXCEPTION) { \ + return(value); \ + } \ + } while (0) + +#define CHECK_JNI_EXCEPTION(env) \ + do { \ + JavaThread* THREAD = JavaThread::thread_from_jni_environment(env); \ + if (HAS_PENDING_EXCEPTION) { \ + return; \ + } \ + } while (0) + bool WhiteBox::_used = false; volatile bool WhiteBox::compilation_locked = false; --- old/src/hotspot/share/prims/whitebox.hpp 2018-03-15 12:08:32.212573172 -0400 +++ new/src/hotspot/share/prims/whitebox.hpp 2018-03-15 12:08:31.510508737 -0400 @@ -31,7 +31,8 @@ #include "memory/allocation.hpp" #include "oops/oopsHierarchy.hpp" #include "oops/symbol.hpp" -#include "runtime/interfaceSupport.hpp" + +#define WB_METHOD_DECLARE(result_type) extern "C" result_type JNICALL // Unconditionally clear pedantic pending JNI checks class ClearPendingJniExcCheck : public StackObj { @@ -44,30 +45,6 @@ } }; -// Entry macro to transition from JNI to VM state. - -#define WB_ENTRY(result_type, header) JNI_ENTRY(result_type, header) \ - ClearPendingJniExcCheck _clearCheck(env); - -#define WB_END JNI_END -#define WB_METHOD_DECLARE(result_type) extern "C" result_type JNICALL - -#define CHECK_JNI_EXCEPTION_(env, value) \ - do { \ - JavaThread* THREAD = JavaThread::thread_from_jni_environment(env); \ - if (HAS_PENDING_EXCEPTION) { \ - return(value); \ - } \ - } while (0) - -#define CHECK_JNI_EXCEPTION(env) \ - do { \ - JavaThread* THREAD = JavaThread::thread_from_jni_environment(env); \ - if (HAS_PENDING_EXCEPTION) { \ - return; \ - } \ - } while (0) - class CodeBlob; class CodeHeap; class JavaThread; @@ -93,6 +70,4 @@ static bool compile_method(Method* method, int comp_level, int bci, Thread* THREAD); }; - - #endif // SHARE_VM_PRIMS_WHITEBOX_HPP --- old/src/hotspot/share/runtime/biasedLocking.cpp 2018-03-15 12:08:33.010646419 -0400 +++ new/src/hotspot/share/runtime/biasedLocking.cpp 2018-03-15 12:08:32.308581984 -0400 @@ -31,6 +31,7 @@ #include "runtime/atomic.hpp" #include "runtime/basicLock.hpp" #include "runtime/biasedLocking.hpp" +#include "runtime/handles.inline.hpp" #include "runtime/task.hpp" #include "runtime/threadSMR.hpp" #include "runtime/vframe.hpp" --- old/src/hotspot/share/runtime/deoptimization.cpp 2018-03-15 12:08:33.808719665 -0400 +++ new/src/hotspot/share/runtime/deoptimization.cpp 2018-03-15 12:08:33.136657984 -0400 @@ -46,7 +46,7 @@ #include "runtime/biasedLocking.hpp" #include "runtime/compilationPolicy.hpp" #include "runtime/deoptimization.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/signature.hpp" #include "runtime/stubRoutines.hpp" --- old/src/hotspot/share/runtime/fieldDescriptor.hpp 2018-03-15 12:08:34.619794105 -0400 +++ new/src/hotspot/share/runtime/fieldDescriptor.hpp 2018-03-15 12:08:33.947732424 -0400 @@ -26,6 +26,8 @@ #define SHARE_VM_RUNTIME_FIELDDESCRIPTOR_HPP #include "oops/constantPool.hpp" +#include "oops/fieldInfo.hpp" +#include "oops/instanceKlass.hpp" #include "oops/symbol.hpp" #include "runtime/fieldType.hpp" #include "utilities/accessFlags.hpp" --- old/src/hotspot/share/runtime/handles.cpp 2018-03-15 12:08:35.356861753 -0400 +++ new/src/hotspot/share/runtime/handles.cpp 2018-03-15 12:08:34.712802642 -0400 @@ -214,4 +214,4 @@ area->_no_handle_mark_nesting = _no_handle_mark_nesting; } -#endif +#endif // ASSERT --- old/src/hotspot/share/runtime/handles.hpp 2018-03-15 12:08:36.096929676 -0400 +++ new/src/hotspot/share/runtime/handles.hpp 2018-03-15 12:08:35.449870289 -0400 @@ -296,4 +296,17 @@ #endif }; +// The HandleMarkCleaner is a faster version of HandleMark. +// It relies on the fact that there is a HandleMark further +// down the stack (in JavaCalls::call_helper), and just resets +// to the saved values in that HandleMark. + +class HandleMarkCleaner: public StackObj { + private: + Thread* _thread; + public: + inline HandleMarkCleaner(Thread* thread); + inline ~HandleMarkCleaner(); +}; + #endif // SHARE_VM_RUNTIME_HANDLES_HPP --- old/src/hotspot/share/runtime/handles.inline.hpp 2018-03-15 12:08:36.835997507 -0400 +++ new/src/hotspot/share/runtime/handles.inline.hpp 2018-03-15 12:08:36.199939130 -0400 @@ -104,4 +104,13 @@ debug_only(area->_handle_mark_nesting--); } +inline HandleMarkCleaner::HandleMarkCleaner(Thread* thread) { + _thread = thread; + _thread->last_handle_mark()->push(); +} + +inline HandleMarkCleaner::~HandleMarkCleaner() { + _thread->last_handle_mark()->pop_and_restore(); +} + #endif // SHARE_VM_RUNTIME_HANDLES_INLINE_HPP --- old/src/hotspot/share/runtime/handshake.cpp 2018-03-15 12:08:37.586066348 -0400 +++ new/src/hotspot/share/runtime/handshake.cpp 2018-03-15 12:08:36.931006227 -0400 @@ -27,7 +27,7 @@ #include "logging/logStream.hpp" #include "memory/resourceArea.hpp" #include "runtime/handshake.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/osThread.hpp" #include "runtime/semaphore.hpp" #include "runtime/task.hpp" --- old/src/hotspot/share/runtime/interfaceSupport.cpp 2018-03-15 12:08:38.321133812 -0400 +++ new/src/hotspot/share/runtime/interfaceSupport.cpp 2018-03-15 12:08:37.683075251 -0400 @@ -28,16 +28,49 @@ #include "gc/shared/genCollectedHeap.hpp" #include "memory/resourceArea.hpp" #include "runtime/atomic.hpp" +#include "runtime/handles.inline.hpp" #include "runtime/init.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/orderAccess.inline.hpp" #include "runtime/os.inline.hpp" +#include "runtime/thread.inline.hpp" #include "runtime/vframe.hpp" #include "utilities/preserveException.hpp" // Implementation of InterfaceSupport #ifdef ASSERT +VMEntryWrapper::VMEntryWrapper() { + if (VerifyLastFrame) { + InterfaceSupport::verify_last_frame(); + } +} + +VMEntryWrapper::~VMEntryWrapper() { + InterfaceSupport::check_gc_alot(); + if (WalkStackALot) { + InterfaceSupport::walk_stack(); + } +#ifdef COMPILER2 + // This option is not used by Compiler 1 + if (StressDerivedPointers) { + InterfaceSupport::stress_derived_pointers(); + } +#endif + if (DeoptimizeALot || DeoptimizeRandom) { + InterfaceSupport::deoptimizeAll(); + } + if (ZombieALot) { + InterfaceSupport::zombieAll(); + } + if (UnlinkSymbolsALot) { + InterfaceSupport::unlinkSymbols(); + } + // do verification AFTER potential deoptimization + if (VerifyStack) { + InterfaceSupport::verify_stack(); + } +} long InterfaceSupport::_number_of_calls = 0; long InterfaceSupport::_scavenge_alot_counter = 1; --- old/src/hotspot/share/runtime/java.cpp 2018-03-15 12:08:39.036199440 -0400 +++ new/src/hotspot/share/runtime/java.cpp 2018-03-15 12:08:38.414142348 -0400 @@ -56,7 +56,7 @@ #include "runtime/compilationPolicy.hpp" #include "runtime/deoptimization.hpp" #include "runtime/init.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/memprofiler.hpp" #include "runtime/sharedRuntime.hpp" --- old/src/hotspot/share/runtime/javaCalls.cpp 2018-03-15 12:08:39.755265436 -0400 +++ new/src/hotspot/share/runtime/javaCalls.cpp 2018-03-15 12:08:39.135208527 -0400 @@ -35,7 +35,7 @@ #include "prims/jniCheck.hpp" #include "runtime/compilationPolicy.hpp" #include "runtime/handles.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/javaCalls.hpp" #include "runtime/jniHandles.inline.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/share/runtime/mutex.cpp 2018-03-15 12:08:40.472331247 -0400 +++ new/src/hotspot/share/runtime/mutex.cpp 2018-03-15 12:08:39.852274339 -0400 @@ -24,7 +24,7 @@ #include "precompiled.hpp" #include "runtime/atomic.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/mutex.hpp" #include "runtime/orderAccess.inline.hpp" #include "runtime/osThread.hpp" --- old/src/hotspot/share/runtime/objectMonitor.cpp 2018-03-15 12:08:41.211399079 -0400 +++ new/src/hotspot/share/runtime/objectMonitor.cpp 2018-03-15 12:08:40.588341895 -0400 @@ -30,7 +30,7 @@ #include "oops/oop.inline.hpp" #include "runtime/atomic.hpp" #include "runtime/handles.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/mutexLocker.hpp" #include "runtime/objectMonitor.hpp" #include "runtime/objectMonitor.inline.hpp" --- old/src/hotspot/share/runtime/objectMonitor.hpp 2018-03-15 12:08:41.969468654 -0400 +++ new/src/hotspot/share/runtime/objectMonitor.hpp 2018-03-15 12:08:41.348411654 -0400 @@ -31,6 +31,8 @@ #include "runtime/park.hpp" #include "runtime/perfData.hpp" +class ObjectMonitor; + // ObjectWaiter serves as a "proxy" or surrogate thread. // TODO-FIXME: Eliminate ObjectWaiter and use the thread-specific // ParkEvent instead. Beware, however, that the JVMTI code --- old/src/hotspot/share/runtime/os.cpp 2018-03-15 12:08:42.671533089 -0400 +++ new/src/hotspot/share/runtime/os.cpp 2018-03-15 12:08:42.062477190 -0400 @@ -48,7 +48,7 @@ #include "runtime/arguments.hpp" #include "runtime/atomic.hpp" #include "runtime/frame.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/share/runtime/os.hpp 2018-03-15 12:08:43.416601471 -0400 +++ new/src/hotspot/share/runtime/os.hpp 2018-03-15 12:08:42.792544195 -0400 @@ -30,7 +30,8 @@ #include "metaprogramming/isRegisteredEnum.hpp" #include "metaprogramming/integralConstant.hpp" #include "runtime/extendedPC.hpp" -#include "runtime/handles.hpp" +#include "utilities/exceptions.hpp" +#include "utilities/ostream.hpp" #include "utilities/macros.hpp" #ifndef _WINDOWS # include @@ -54,6 +55,7 @@ class DLL; class FileHandle; class NativeCallStack; +class methodHandle; template class GrowableArray; --- old/src/hotspot/share/runtime/safepoint.cpp 2018-03-15 12:08:44.145668384 -0400 +++ new/src/hotspot/share/runtime/safepoint.cpp 2018-03-15 12:08:43.524611384 -0400 @@ -47,7 +47,7 @@ #include "runtime/compilationPolicy.hpp" #include "runtime/deoptimization.hpp" #include "runtime/frame.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/mutexLocker.hpp" #include "runtime/orderAccess.inline.hpp" #include "runtime/osThread.hpp" --- old/src/hotspot/share/runtime/serviceThread.cpp 2018-03-15 12:08:44.881735940 -0400 +++ new/src/hotspot/share/runtime/serviceThread.cpp 2018-03-15 12:08:44.261679031 -0400 @@ -23,7 +23,7 @@ */ #include "precompiled.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/javaCalls.hpp" #include "runtime/serviceThread.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/share/runtime/sharedRuntime.cpp 2018-03-15 12:08:45.589800926 -0400 +++ new/src/hotspot/share/runtime/sharedRuntime.cpp 2018-03-15 12:08:44.968743926 -0400 @@ -56,7 +56,7 @@ #include "runtime/compilationPolicy.hpp" #include "runtime/handles.inline.hpp" #include "runtime/init.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/sharedRuntime.hpp" --- old/src/hotspot/share/runtime/sharedRuntimeTrans.cpp 2018-03-15 12:08:46.362871878 -0400 +++ new/src/hotspot/share/runtime/sharedRuntimeTrans.cpp 2018-03-15 12:08:45.742814969 -0400 @@ -24,7 +24,7 @@ #include "precompiled.hpp" #include "jni.h" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/sharedRuntime.hpp" // This file contains copies of the fdlibm routines used by --- old/src/hotspot/share/runtime/sharedRuntimeTrig.cpp 2018-03-15 12:08:47.095939158 -0400 +++ new/src/hotspot/share/runtime/sharedRuntimeTrig.cpp 2018-03-15 12:08:46.460880873 -0400 @@ -24,7 +24,7 @@ #include "precompiled.hpp" #include "jni.h" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/sharedRuntimeMath.hpp" --- old/src/hotspot/share/runtime/simpleThresholdPolicy.cpp 2018-03-15 12:08:47.818005429 -0400 +++ new/src/hotspot/share/runtime/simpleThresholdPolicy.cpp 2018-03-15 12:08:47.197948521 -0400 @@ -24,6 +24,7 @@ #include "precompiled.hpp" #include "compiler/compileBroker.hpp" +#include "gc/shared/gcLocker.hpp" #include "memory/resourceArea.hpp" #include "runtime/arguments.hpp" #include "runtime/simpleThresholdPolicy.hpp" --- old/src/hotspot/share/runtime/stubRoutines.cpp 2018-03-15 12:08:48.531070874 -0400 +++ new/src/hotspot/share/runtime/stubRoutines.cpp 2018-03-15 12:08:47.909013782 -0400 @@ -27,7 +27,7 @@ #include "memory/resourceArea.hpp" #include "oops/access.inline.hpp" #include "oops/oop.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/timerTrace.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/stubRoutines.hpp" --- old/src/hotspot/share/runtime/sweeper.cpp 2018-03-15 12:08:49.246136502 -0400 +++ new/src/hotspot/share/runtime/sweeper.cpp 2018-03-15 12:08:48.628079777 -0400 @@ -35,6 +35,7 @@ #include "oops/method.hpp" #include "runtime/atomic.hpp" #include "runtime/compilationPolicy.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/mutexLocker.hpp" #include "runtime/orderAccess.inline.hpp" #include "runtime/os.hpp" --- old/src/hotspot/share/runtime/synchronizer.cpp 2018-03-15 12:08:49.969202865 -0400 +++ new/src/hotspot/share/runtime/synchronizer.cpp 2018-03-15 12:08:49.348145865 -0400 @@ -34,7 +34,7 @@ #include "runtime/atomic.hpp" #include "runtime/biasedLocking.hpp" #include "runtime/handles.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/mutexLocker.hpp" #include "runtime/objectMonitor.hpp" #include "runtime/objectMonitor.inline.hpp" --- old/src/hotspot/share/runtime/thread.cpp 2018-03-15 12:08:50.719271706 -0400 +++ new/src/hotspot/share/runtime/thread.cpp 2018-03-15 12:08:50.097214614 -0400 @@ -69,7 +69,7 @@ #include "runtime/globals.hpp" #include "runtime/handshake.hpp" #include "runtime/init.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/jniHandles.inline.hpp" --- old/src/hotspot/share/runtime/vmThread.cpp 2018-03-15 12:08:51.523345503 -0400 +++ new/src/hotspot/share/runtime/vmThread.cpp 2018-03-15 12:08:50.903288595 -0400 @@ -31,7 +31,7 @@ #include "oops/method.hpp" #include "oops/oop.inline.hpp" #include "oops/verifyOopClosure.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/mutexLocker.hpp" #include "runtime/os.hpp" #include "runtime/safepoint.hpp" --- old/src/hotspot/share/runtime/vm_operations.cpp 2018-03-15 12:08:52.279414895 -0400 +++ new/src/hotspot/share/runtime/vm_operations.cpp 2018-03-15 12:08:51.622354590 -0400 @@ -35,7 +35,7 @@ #include "oops/symbol.hpp" #include "runtime/arguments.hpp" #include "runtime/deoptimization.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/sweeper.hpp" #include "runtime/thread.inline.hpp" #include "runtime/threadSMR.inline.hpp" --- old/src/hotspot/share/services/gcNotifier.cpp 2018-03-15 12:08:53.052485847 -0400 +++ new/src/hotspot/share/services/gcNotifier.cpp 2018-03-15 12:08:52.375423706 -0400 @@ -27,7 +27,7 @@ #include "classfile/vmSymbols.hpp" #include "oops/objArrayOop.inline.hpp" #include "oops/oop.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/handles.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/mutex.hpp" --- old/src/hotspot/share/services/heapDumper.cpp 2018-03-15 12:08:53.827556982 -0400 +++ new/src/hotspot/share/services/heapDumper.cpp 2018-03-15 12:08:53.154495209 -0400 @@ -37,6 +37,7 @@ #include "oops/objArrayOop.inline.hpp" #include "oops/oop.inline.hpp" #include "oops/typeArrayOop.inline.hpp" +#include "runtime/handles.inline.hpp" #include "runtime/javaCalls.hpp" #include "runtime/jniHandles.hpp" #include "runtime/os.hpp" --- old/src/hotspot/share/services/lowMemoryDetector.cpp 2018-03-15 12:08:54.582626282 -0400 +++ new/src/hotspot/share/services/lowMemoryDetector.cpp 2018-03-15 12:08:53.956568823 -0400 @@ -27,7 +27,7 @@ #include "classfile/vmSymbols.hpp" #include "memory/resourceArea.hpp" #include "oops/oop.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" #include "runtime/mutex.hpp" --- old/src/hotspot/share/services/management.cpp 2018-03-15 12:08:55.293691543 -0400 +++ new/src/hotspot/share/services/management.cpp 2018-03-15 12:08:54.671634451 -0400 @@ -38,7 +38,7 @@ #include "runtime/arguments.hpp" #include "runtime/globals.hpp" #include "runtime/handles.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/javaCalls.hpp" #include "runtime/jniHandles.inline.hpp" #include "runtime/os.hpp" --- old/test/hotspot/gtest/classfile/test_symbolTable.cpp 2018-03-15 12:08:56.041760201 -0400 +++ new/test/hotspot/gtest/classfile/test_symbolTable.cpp 2018-03-15 12:08:55.421703292 -0400 @@ -22,7 +22,7 @@ */ #include "precompiled.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "classfile/symbolTable.hpp" #include "unittest.hpp" --- old/test/hotspot/gtest/code/test_vtableStub.cpp 2018-03-15 12:08:56.796829501 -0400 +++ new/test/hotspot/gtest/code/test_vtableStub.cpp 2018-03-15 12:08:56.133768645 -0400 @@ -24,7 +24,7 @@ #include "precompiled.hpp" #include "code/vtableStubs.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "unittest.hpp" TEST_VM(code, vtableStubs) { --- old/test/hotspot/gtest/gc/shared/test_oopStorage.cpp 2018-03-15 12:08:57.503894395 -0400 +++ new/test/hotspot/gtest/gc/shared/test_oopStorage.cpp 2018-03-15 12:08:56.882837394 -0400 @@ -30,7 +30,7 @@ #include "metaprogramming/conditional.hpp" #include "metaprogramming/enableIf.hpp" #include "runtime/handles.inline.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "runtime/mutex.hpp" #include "runtime/mutexLocker.hpp" #include "runtime/thread.hpp" --- old/test/hotspot/gtest/logging/test_gcTraceTime.cpp 2018-03-15 12:08:58.233961400 -0400 +++ new/test/hotspot/gtest/logging/test_gcTraceTime.cpp 2018-03-15 12:08:57.613904491 -0400 @@ -26,7 +26,7 @@ #include "logTestFixture.hpp" #include "logTestUtils.inline.hpp" #include "logging/log.hpp" -#include "runtime/interfaceSupport.hpp" +#include "runtime/interfaceSupport.inline.hpp" #include "unittest.hpp" class GCTraceTimeTest : public LogTestFixture { --- /dev/null 2018-02-03 04:43:52.625000053 -0500 +++ new/src/hotspot/share/ci/ciMethodType.cpp 2018-03-15 12:08:58.319969294 -0400 @@ -0,0 +1,61 @@ +/* + * 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. + * + */ + +#include "precompiled.hpp" +#include "ci/ciInstance.hpp" +#include "ci/ciMethodType.hpp" +#include "ci/ciUtilities.inline.hpp" +#include "classfile/javaClasses.hpp" + +ciType* ciMethodType::class_to_citype(oop klass_oop) const { + if (java_lang_Class::is_primitive(klass_oop)) { + BasicType bt = java_lang_Class::primitive_type(klass_oop); + return ciType::make(bt); + } else { + Klass* k = java_lang_Class::as_Klass(klass_oop); + return CURRENT_ENV->get_klass(k); + } +} + +ciType* ciMethodType::rtype() const { + GUARDED_VM_ENTRY( + oop rtype = java_lang_invoke_MethodType::rtype(get_oop()); + return class_to_citype(rtype); + ) +} + +int ciMethodType::ptype_count() const { + GUARDED_VM_ENTRY(return java_lang_invoke_MethodType::ptype_count(get_oop());) +} + +int ciMethodType::ptype_slot_count() const { + GUARDED_VM_ENTRY(return java_lang_invoke_MethodType::ptype_slot_count(get_oop());) +} + +ciType* ciMethodType::ptype_at(int index) const { + GUARDED_VM_ENTRY( + oop ptype = java_lang_invoke_MethodType::ptype(get_oop(), index); + return class_to_citype(ptype); + ) +} --- /dev/null 2018-02-03 04:43:52.625000053 -0500 +++ new/src/hotspot/share/ci/ciUtilities.inline.hpp 2018-03-15 12:08:59.190049149 -0400 @@ -0,0 +1,93 @@ +/* + * 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_CI_CIUTILITIES_INLINE_HPP +#define SHARE_VM_CI_CIUTILITIES_INLINE_HPP + +#include "ci/ciUtilities.hpp" +#include "runtime/interfaceSupport.inline.hpp" + +// Add a ci native entry wrapper? + +// Bring the compilation thread into the VM state. +#define VM_ENTRY_MARK \ + CompilerThread* thread=CompilerThread::current(); \ + ThreadInVMfromNative __tiv(thread); \ + ResetNoHandleMark rnhm; \ + HandleMarkCleaner __hm(thread); \ + Thread* THREAD = thread; \ + debug_only(VMNativeEntryWrapper __vew;) + + + +// Bring the compilation thread into the VM state. No handle mark. +#define VM_QUICK_ENTRY_MARK \ + CompilerThread* thread=CompilerThread::current(); \ + ThreadInVMfromNative __tiv(thread); \ +/* \ + * [TODO] The NoHandleMark line does nothing but declare a function prototype \ + * The NoHandkeMark constructor is NOT executed. If the ()'s are \ + * removed, causes the NoHandleMark assert to trigger. \ + * debug_only(NoHandleMark __hm();) \ + */ \ + Thread* THREAD = thread; \ + debug_only(VMNativeEntryWrapper __vew;) + + +#define EXCEPTION_CONTEXT \ + CompilerThread* thread=CompilerThread::current(); \ + Thread* THREAD = thread; + + +#define GUARDED_VM_ENTRY(action) \ + {if (IS_IN_VM) { action } else { VM_ENTRY_MARK; { action }}} + +#define GUARDED_VM_QUICK_ENTRY(action) \ + {if (IS_IN_VM) { action } else { VM_QUICK_ENTRY_MARK; { action }}} + +// Redefine this later. +#define KILL_COMPILE_ON_FATAL_(result) \ + THREAD); \ + if (HAS_PENDING_EXCEPTION) { \ + if (PENDING_EXCEPTION->klass() == \ + SystemDictionary::ThreadDeath_klass()) { \ + /* Kill the compilation. */ \ + fatal("unhandled ci exception"); \ + return (result); \ + } \ + CLEAR_PENDING_EXCEPTION; \ + return (result); \ + } \ + (void)(0 + +#define KILL_COMPILE_ON_ANY \ + THREAD); \ + if (HAS_PENDING_EXCEPTION) { \ + fatal("unhandled ci exception"); \ + CLEAR_PENDING_EXCEPTION; \ + } \ +(void)(0 + +#endif // SHARE_VM_CI_CIUTILITIES_INLINE_HPP + --- old/src/hotspot/share/prims/jvmtiEnter.hpp 2018-03-15 12:09:00.915207483 -0400 +++ /dev/null 2018-02-03 04:43:52.625000053 -0500 @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2003, 2010, 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_PRIMS_JVMTIENTER_HPP -#define SHARE_VM_PRIMS_JVMTIENTER_HPP - -#include "classfile/systemDictionary.hpp" -#include "jvmtifiles/jvmtiEnv.hpp" -#include "memory/resourceArea.hpp" -#include "prims/jvmtiImpl.hpp" -#include "runtime/interfaceSupport.hpp" - -#endif // SHARE_VM_PRIMS_JVMTIENTER_HPP --- /dev/null 2018-02-03 04:43:52.625000053 -0500 +++ new/src/hotspot/share/prims/jvmtiEnter.inline.hpp 2018-03-15 12:09:00.061129096 -0400 @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2003, 2010, 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_PRIMS_JVMTIENTER_INLINE_HPP +#define SHARE_VM_PRIMS_JVMTIENTER_INLINE_HPP + +#include "classfile/systemDictionary.hpp" +#include "jvmtifiles/jvmtiEnv.hpp" +#include "memory/resourceArea.hpp" +#include "prims/jvmtiImpl.hpp" +#include "runtime/interfaceSupport.inline.hpp" + +#endif // SHARE_VM_PRIMS_JVMTIENTER_INLINE_HPP --- /dev/null 2018-02-03 04:43:52.625000053 -0500 +++ new/src/hotspot/share/prims/whitebox.inline.hpp 2018-03-15 12:09:01.004215652 -0400 @@ -0,0 +1,38 @@ +/* + * 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_PRIMS_WHITEBOX_INLINE_HPP +#define SHARE_VM_PRIMS_WHITEBOX_INLINE_HPP + +#include "prims/whitebox.hpp" +#include "runtime/interfaceSupport.inline.hpp" + +// Entry macro to transition from JNI to VM state. + +#define WB_ENTRY(result_type, header) JNI_ENTRY(result_type, header) \ + ClearPendingJniExcCheck _clearCheck(env); + +#define WB_END JNI_END + +#endif // SHARE_VM_PRIMS_WHITEBOX_INLINE_HPP --- old/src/hotspot/share/runtime/interfaceSupport.hpp 2018-03-15 12:09:02.736374629 -0400 +++ /dev/null 2018-02-03 04:43:52.625000053 -0500 @@ -1,623 +0,0 @@ -/* - * Copyright (c) 1997, 2017, 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_INTERFACESUPPORT_HPP -#define SHARE_VM_RUNTIME_INTERFACESUPPORT_HPP - -#include "gc/shared/gcLocker.hpp" -#include "runtime/handles.inline.hpp" -#include "runtime/mutexLocker.hpp" -#include "runtime/orderAccess.hpp" -#include "runtime/os.hpp" -#include "runtime/safepointMechanism.inline.hpp" -#include "runtime/thread.inline.hpp" -#include "runtime/vmThread.hpp" -#include "utilities/globalDefinitions.hpp" -#include "utilities/macros.hpp" -#include "utilities/preserveException.hpp" - -// Wrapper for all entry points to the virtual machine. -// The HandleMarkCleaner is a faster version of HandleMark. -// It relies on the fact that there is a HandleMark further -// down the stack (in JavaCalls::call_helper), and just resets -// to the saved values in that HandleMark. - -class HandleMarkCleaner: public StackObj { - private: - Thread* _thread; - public: - HandleMarkCleaner(Thread* thread) { - _thread = thread; - _thread->last_handle_mark()->push(); - } - ~HandleMarkCleaner() { - _thread->last_handle_mark()->pop_and_restore(); - } - - private: - inline void* operator new(size_t size, void* ptr) throw() { - return ptr; - } -}; - -// InterfaceSupport provides functionality used by the VM_LEAF_BASE and -// VM_ENTRY_BASE macros. These macros are used to guard entry points into -// the VM and perform checks upon leave of the VM. - - -class InterfaceSupport: AllStatic { -# ifdef ASSERT - public: - static long _scavenge_alot_counter; - static long _fullgc_alot_counter; - static long _number_of_calls; - static long _fullgc_alot_invocation; - - // Helper methods used to implement +ScavengeALot and +FullGCALot - static void check_gc_alot() { if (ScavengeALot || FullGCALot) gc_alot(); } - static void gc_alot(); - - static void walk_stack_from(vframe* start_vf); - static void walk_stack(); - - static void zombieAll(); - static void unlinkSymbols(); - static void deoptimizeAll(); - static void stress_derived_pointers(); - static void verify_stack(); - static void verify_last_frame(); -# endif - - public: - static void serialize_thread_state_with_handler(JavaThread* thread) { - serialize_thread_state_internal(thread, true); - } - - // Should only call this if we know that we have a proper SEH set up. - static void serialize_thread_state(JavaThread* thread) { - serialize_thread_state_internal(thread, false); - } - - private: - static void serialize_thread_state_internal(JavaThread* thread, bool needs_exception_handler) { - // Make sure new state is seen by VM thread - if (os::is_MP()) { - if (UseMembar) { - // Force a fence between the write above and read below - OrderAccess::fence(); - } else { - // store to serialize page so VM thread can do pseudo remote membar - if (needs_exception_handler) { - os::write_memory_serialize_page_with_handler(thread); - } else { - os::write_memory_serialize_page(thread); - } - } - } - } -}; - - -// Basic class for all thread transition classes. - -class ThreadStateTransition : public StackObj { - protected: - JavaThread* _thread; - public: - ThreadStateTransition(JavaThread *thread) { - _thread = thread; - assert(thread != NULL && thread->is_Java_thread(), "must be Java thread"); - } - - // Change threadstate in a manner, so safepoint can detect changes. - // Time-critical: called on exit from every runtime routine - static inline void transition(JavaThread *thread, JavaThreadState from, JavaThreadState to) { - assert(from != _thread_in_Java, "use transition_from_java"); - assert(from != _thread_in_native, "use transition_from_native"); - assert((from & 1) == 0 && (to & 1) == 0, "odd numbers are transitions states"); - assert(thread->thread_state() == from, "coming from wrong thread state"); - // Change to transition state - thread->set_thread_state((JavaThreadState)(from + 1)); - - InterfaceSupport::serialize_thread_state(thread); - - SafepointMechanism::block_if_requested(thread); - thread->set_thread_state(to); - - CHECK_UNHANDLED_OOPS_ONLY(thread->clear_unhandled_oops();) - } - - // transition_and_fence must be used on any thread state transition - // where there might not be a Java call stub on the stack, in - // particular on Windows where the Structured Exception Handler is - // set up in the call stub. os::write_memory_serialize_page() can - // fault and we can't recover from it on Windows without a SEH in - // place. - static inline void transition_and_fence(JavaThread *thread, JavaThreadState from, JavaThreadState to) { - assert(thread->thread_state() == from, "coming from wrong thread state"); - assert((from & 1) == 0 && (to & 1) == 0, "odd numbers are transitions states"); - // Change to transition state - thread->set_thread_state((JavaThreadState)(from + 1)); - - InterfaceSupport::serialize_thread_state_with_handler(thread); - - SafepointMechanism::block_if_requested(thread); - thread->set_thread_state(to); - - CHECK_UNHANDLED_OOPS_ONLY(thread->clear_unhandled_oops();) - } - - // Same as above, but assumes from = _thread_in_Java. This is simpler, since we - // never block on entry to the VM. This will break the code, since e.g. preserve arguments - // have not been setup. - static inline void transition_from_java(JavaThread *thread, JavaThreadState to) { - assert(thread->thread_state() == _thread_in_Java, "coming from wrong thread state"); - thread->set_thread_state(to); - } - - static inline void transition_from_native(JavaThread *thread, JavaThreadState to) { - assert((to & 1) == 0, "odd numbers are transitions states"); - assert(thread->thread_state() == _thread_in_native, "coming from wrong thread state"); - // Change to transition state - thread->set_thread_state(_thread_in_native_trans); - - InterfaceSupport::serialize_thread_state_with_handler(thread); - - // We never install asynchronous exceptions when coming (back) in - // to the runtime from native code because the runtime is not set - // up to handle exceptions floating around at arbitrary points. - if (SafepointMechanism::poll(thread) || thread->is_suspend_after_native()) { - JavaThread::check_safepoint_and_suspend_for_native_trans(thread); - - // Clear unhandled oops anywhere where we could block, even if we don't. - CHECK_UNHANDLED_OOPS_ONLY(thread->clear_unhandled_oops();) - } - - thread->set_thread_state(to); - } - protected: - void trans(JavaThreadState from, JavaThreadState to) { transition(_thread, from, to); } - void trans_from_java(JavaThreadState to) { transition_from_java(_thread, to); } - void trans_from_native(JavaThreadState to) { transition_from_native(_thread, to); } - void trans_and_fence(JavaThreadState from, JavaThreadState to) { transition_and_fence(_thread, from, to); } -}; - -class ThreadInVMForHandshake : public ThreadStateTransition { - const JavaThreadState _original_state; - - void transition_back() { - // This can be invoked from transition states and must return to the original state properly - assert(_thread->thread_state() == _thread_in_vm, "should only call when leaving VM after handshake"); - _thread->set_thread_state(_thread_in_vm_trans); - - InterfaceSupport::serialize_thread_state(_thread); - - SafepointMechanism::block_if_requested(_thread); - - _thread->set_thread_state(_original_state); - } - - public: - - ThreadInVMForHandshake(JavaThread* thread) : ThreadStateTransition(thread), - _original_state(thread->thread_state()) { - - if (thread->has_last_Java_frame()) { - thread->frame_anchor()->make_walkable(thread); - } - - thread->set_thread_state(_thread_in_vm); - } - - ~ThreadInVMForHandshake() { - transition_back(); - } - -}; - -class ThreadInVMfromJava : public ThreadStateTransition { - public: - ThreadInVMfromJava(JavaThread* thread) : ThreadStateTransition(thread) { - trans_from_java(_thread_in_vm); - } - ~ThreadInVMfromJava() { - if (_thread->stack_yellow_reserved_zone_disabled()) { - _thread->enable_stack_yellow_reserved_zone(); - } - trans(_thread_in_vm, _thread_in_Java); - // Check for pending. async. exceptions or suspends. - if (_thread->has_special_runtime_exit_condition()) _thread->handle_special_runtime_exit_condition(); - } -}; - - -class ThreadInVMfromUnknown { - private: - JavaThread* _thread; - public: - ThreadInVMfromUnknown() : _thread(NULL) { - Thread* t = Thread::current(); - if (t->is_Java_thread()) { - JavaThread* t2 = (JavaThread*) t; - if (t2->thread_state() == _thread_in_native) { - _thread = t2; - ThreadStateTransition::transition_from_native(t2, _thread_in_vm); - // Used to have a HandleMarkCleaner but that is dangerous as - // it could free a handle in our (indirect, nested) caller. - // We expect any handles will be short lived and figure we - // don't need an actual HandleMark. - } - } - } - ~ThreadInVMfromUnknown() { - if (_thread) { - ThreadStateTransition::transition_and_fence(_thread, _thread_in_vm, _thread_in_native); - } - } -}; - - -class ThreadInVMfromNative : public ThreadStateTransition { - public: - ThreadInVMfromNative(JavaThread* thread) : ThreadStateTransition(thread) { - trans_from_native(_thread_in_vm); - } - ~ThreadInVMfromNative() { - trans_and_fence(_thread_in_vm, _thread_in_native); - } -}; - - -class ThreadToNativeFromVM : public ThreadStateTransition { - public: - ThreadToNativeFromVM(JavaThread *thread) : ThreadStateTransition(thread) { - // We are leaving the VM at this point and going directly to native code. - // Block, if we are in the middle of a safepoint synchronization. - assert(!thread->owns_locks(), "must release all locks when leaving VM"); - thread->frame_anchor()->make_walkable(thread); - trans_and_fence(_thread_in_vm, _thread_in_native); - // Check for pending. async. exceptions or suspends. - if (_thread->has_special_runtime_exit_condition()) _thread->handle_special_runtime_exit_condition(false); - } - - ~ThreadToNativeFromVM() { - trans_from_native(_thread_in_vm); - assert(!_thread->is_pending_jni_exception_check(), "Pending JNI Exception Check"); - // We don't need to clear_walkable because it will happen automagically when we return to java - } -}; - - -class ThreadBlockInVM : public ThreadStateTransition { - public: - ThreadBlockInVM(JavaThread *thread) - : ThreadStateTransition(thread) { - // Once we are blocked vm expects stack to be walkable - thread->frame_anchor()->make_walkable(thread); - trans_and_fence(_thread_in_vm, _thread_blocked); - } - ~ThreadBlockInVM() { - trans_and_fence(_thread_blocked, _thread_in_vm); - // We don't need to clear_walkable because it will happen automagically when we return to java - } -}; - - -// This special transition class is only used to prevent asynchronous exceptions -// from being installed on vm exit in situations where we can't tolerate them. -// See bugs: 4324348, 4854693, 4998314, 5040492, 5050705. -class ThreadInVMfromJavaNoAsyncException : public ThreadStateTransition { - public: - ThreadInVMfromJavaNoAsyncException(JavaThread* thread) : ThreadStateTransition(thread) { - trans_from_java(_thread_in_vm); - } - ~ThreadInVMfromJavaNoAsyncException() { - if (_thread->stack_yellow_reserved_zone_disabled()) { - _thread->enable_stack_yellow_reserved_zone(); - } - trans(_thread_in_vm, _thread_in_Java); - // NOTE: We do not check for pending. async. exceptions. - // If we did and moved the pending async exception over into the - // pending exception field, we would need to deopt (currently C2 - // only). However, to do so would require that we transition back - // to the _thread_in_vm state. Instead we postpone the handling of - // the async exception. - - - // Check for pending. suspends only. - if (_thread->has_special_runtime_exit_condition()) - _thread->handle_special_runtime_exit_condition(false); - } -}; - -// Debug class instantiated in JRT_ENTRY and ITR_ENTRY macro. -// Can be used to verify properties on enter/exit of the VM. - -#ifdef ASSERT -class VMEntryWrapper { - public: - VMEntryWrapper() { - if (VerifyLastFrame) { - InterfaceSupport::verify_last_frame(); - } - } - - ~VMEntryWrapper() { - InterfaceSupport::check_gc_alot(); - if (WalkStackALot) { - InterfaceSupport::walk_stack(); - } -#ifdef COMPILER2 - // This option is not used by Compiler 1 - if (StressDerivedPointers) { - InterfaceSupport::stress_derived_pointers(); - } -#endif - if (DeoptimizeALot || DeoptimizeRandom) { - InterfaceSupport::deoptimizeAll(); - } - if (ZombieALot) { - InterfaceSupport::zombieAll(); - } - if (UnlinkSymbolsALot) { - InterfaceSupport::unlinkSymbols(); - } - // do verification AFTER potential deoptimization - if (VerifyStack) { - InterfaceSupport::verify_stack(); - } - - } -}; - - -class VMNativeEntryWrapper { - public: - VMNativeEntryWrapper() { - if (GCALotAtAllSafepoints) InterfaceSupport::check_gc_alot(); - } - - ~VMNativeEntryWrapper() { - if (GCALotAtAllSafepoints) InterfaceSupport::check_gc_alot(); - } -}; - -#endif - - -// VM-internal runtime interface support - -#ifdef ASSERT - -class RuntimeHistogramElement : public HistogramElement { - public: - RuntimeHistogramElement(const char* name); -}; - -#define TRACE_CALL(result_type, header) \ - InterfaceSupport::_number_of_calls++; \ - if (CountRuntimeCalls) { \ - static RuntimeHistogramElement* e = new RuntimeHistogramElement(#header); \ - if (e != NULL) e->increment_count(); \ - } -#else -#define TRACE_CALL(result_type, header) \ - /* do nothing */ -#endif - - -// LEAF routines do not lock, GC or throw exceptions - -#define VM_LEAF_BASE(result_type, header) \ - TRACE_CALL(result_type, header) \ - debug_only(NoHandleMark __hm;) \ - os::verify_stack_alignment(); \ - /* begin of body */ - -#define VM_ENTRY_BASE_FROM_LEAF(result_type, header, thread) \ - TRACE_CALL(result_type, header) \ - debug_only(ResetNoHandleMark __rnhm;) \ - HandleMarkCleaner __hm(thread); \ - Thread* THREAD = thread; \ - os::verify_stack_alignment(); \ - /* begin of body */ - - -// ENTRY routines may lock, GC and throw exceptions - -#define VM_ENTRY_BASE(result_type, header, thread) \ - TRACE_CALL(result_type, header) \ - HandleMarkCleaner __hm(thread); \ - Thread* THREAD = thread; \ - os::verify_stack_alignment(); \ - /* begin of body */ - - -// QUICK_ENTRY routines behave like ENTRY but without a handle mark - -#define VM_QUICK_ENTRY_BASE(result_type, header, thread) \ - TRACE_CALL(result_type, header) \ - debug_only(NoHandleMark __hm;) \ - Thread* THREAD = thread; \ - os::verify_stack_alignment(); \ - /* begin of body */ - - -// Definitions for IRT (Interpreter Runtime) -// (thread is an argument passed in to all these routines) - -#define IRT_ENTRY(result_type, header) \ - result_type header { \ - ThreadInVMfromJava __tiv(thread); \ - VM_ENTRY_BASE(result_type, header, thread) \ - debug_only(VMEntryWrapper __vew;) - - -#define IRT_LEAF(result_type, header) \ - result_type header { \ - VM_LEAF_BASE(result_type, header) \ - debug_only(NoSafepointVerifier __nspv(true);) - - -#define IRT_ENTRY_NO_ASYNC(result_type, header) \ - result_type header { \ - ThreadInVMfromJavaNoAsyncException __tiv(thread); \ - VM_ENTRY_BASE(result_type, header, thread) \ - debug_only(VMEntryWrapper __vew;) - -#define IRT_END } - - -// Definitions for JRT (Java (Compiler/Shared) Runtime) - -#define JRT_ENTRY(result_type, header) \ - result_type header { \ - ThreadInVMfromJava __tiv(thread); \ - VM_ENTRY_BASE(result_type, header, thread) \ - debug_only(VMEntryWrapper __vew;) - - -#define JRT_LEAF(result_type, header) \ - result_type header { \ - VM_LEAF_BASE(result_type, header) \ - debug_only(JRTLeafVerifier __jlv;) - - -#define JRT_ENTRY_NO_ASYNC(result_type, header) \ - result_type header { \ - ThreadInVMfromJavaNoAsyncException __tiv(thread); \ - VM_ENTRY_BASE(result_type, header, thread) \ - debug_only(VMEntryWrapper __vew;) - -// Same as JRT Entry but allows for return value after the safepoint -// to get back into Java from the VM -#define JRT_BLOCK_ENTRY(result_type, header) \ - result_type header { \ - TRACE_CALL(result_type, header) \ - HandleMarkCleaner __hm(thread); - -#define JRT_BLOCK \ - { \ - ThreadInVMfromJava __tiv(thread); \ - Thread* THREAD = thread; \ - debug_only(VMEntryWrapper __vew;) - -#define JRT_BLOCK_NO_ASYNC \ - { \ - ThreadInVMfromJavaNoAsyncException __tiv(thread); \ - Thread* THREAD = thread; \ - debug_only(VMEntryWrapper __vew;) - -#define JRT_BLOCK_END } - -#define JRT_END } - -// Definitions for JNI - -#define JNI_ENTRY(result_type, header) \ - JNI_ENTRY_NO_PRESERVE(result_type, header) \ - WeakPreserveExceptionMark __wem(thread); - -#define JNI_ENTRY_NO_PRESERVE(result_type, header) \ -extern "C" { \ - result_type JNICALL header { \ - JavaThread* thread=JavaThread::thread_from_jni_environment(env); \ - assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \ - ThreadInVMfromNative __tiv(thread); \ - debug_only(VMNativeEntryWrapper __vew;) \ - VM_ENTRY_BASE(result_type, header, thread) - - -// Ensure that the VMNativeEntryWrapper constructor, which can cause -// a GC, is called outside the NoHandleMark (set via VM_QUICK_ENTRY_BASE). -#define JNI_QUICK_ENTRY(result_type, header) \ -extern "C" { \ - result_type JNICALL header { \ - JavaThread* thread=JavaThread::thread_from_jni_environment(env); \ - assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \ - ThreadInVMfromNative __tiv(thread); \ - debug_only(VMNativeEntryWrapper __vew;) \ - VM_QUICK_ENTRY_BASE(result_type, header, thread) - - -#define JNI_LEAF(result_type, header) \ -extern "C" { \ - result_type JNICALL header { \ - JavaThread* thread=JavaThread::thread_from_jni_environment(env); \ - assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \ - VM_LEAF_BASE(result_type, header) - - -// Close the routine and the extern "C" -#define JNI_END } } - - - -// Definitions for JVM - -#define JVM_ENTRY(result_type, header) \ -extern "C" { \ - result_type JNICALL header { \ - JavaThread* thread=JavaThread::thread_from_jni_environment(env); \ - ThreadInVMfromNative __tiv(thread); \ - debug_only(VMNativeEntryWrapper __vew;) \ - VM_ENTRY_BASE(result_type, header, thread) - - -#define JVM_ENTRY_NO_ENV(result_type, header) \ -extern "C" { \ - result_type JNICALL header { \ - JavaThread* thread = JavaThread::current(); \ - ThreadInVMfromNative __tiv(thread); \ - debug_only(VMNativeEntryWrapper __vew;) \ - VM_ENTRY_BASE(result_type, header, thread) - - -#define JVM_QUICK_ENTRY(result_type, header) \ -extern "C" { \ - result_type JNICALL header { \ - JavaThread* thread=JavaThread::thread_from_jni_environment(env); \ - ThreadInVMfromNative __tiv(thread); \ - debug_only(VMNativeEntryWrapper __vew;) \ - VM_QUICK_ENTRY_BASE(result_type, header, thread) - - -#define JVM_LEAF(result_type, header) \ -extern "C" { \ - result_type JNICALL header { \ - VM_Exit::block_if_vm_exited(); \ - VM_LEAF_BASE(result_type, header) - - -#define JVM_ENTRY_FROM_LEAF(env, result_type, header) \ - { { \ - JavaThread* thread=JavaThread::thread_from_jni_environment(env); \ - ThreadInVMfromNative __tiv(thread); \ - debug_only(VMNativeEntryWrapper __vew;) \ - VM_ENTRY_BASE_FROM_LEAF(result_type, header, thread) - - -#define JVM_END } } - -#endif // SHARE_VM_RUNTIME_INTERFACESUPPORT_HPP --- /dev/null 2018-02-03 04:43:52.625000053 -0500 +++ new/src/hotspot/share/runtime/interfaceSupport.inline.hpp 2018-03-15 12:09:01.879295967 -0400 @@ -0,0 +1,570 @@ +/* + * Copyright (c) 1997, 2017, 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_INTERFACESUPPORT_INLINE_HPP +#define SHARE_VM_RUNTIME_INTERFACESUPPORT_INLINE_HPP + +#include "gc/shared/gcLocker.hpp" +#include "runtime/handles.inline.hpp" +#include "runtime/mutexLocker.hpp" +#include "runtime/orderAccess.hpp" +#include "runtime/os.hpp" +#include "runtime/safepointMechanism.inline.hpp" +#include "runtime/thread.hpp" +#include "utilities/globalDefinitions.hpp" +#include "utilities/macros.hpp" +#include "utilities/preserveException.hpp" + +// Wrapper for all entry points to the virtual machine. + +// InterfaceSupport provides functionality used by the VM_LEAF_BASE and +// VM_ENTRY_BASE macros. These macros are used to guard entry points into +// the VM and perform checks upon leave of the VM. + + +class InterfaceSupport: AllStatic { +# ifdef ASSERT + public: + static long _scavenge_alot_counter; + static long _fullgc_alot_counter; + static long _number_of_calls; + static long _fullgc_alot_invocation; + + // Helper methods used to implement +ScavengeALot and +FullGCALot + static void check_gc_alot() { if (ScavengeALot || FullGCALot) gc_alot(); } + static void gc_alot(); + + static void walk_stack_from(vframe* start_vf); + static void walk_stack(); + + static void zombieAll(); + static void unlinkSymbols(); + static void deoptimizeAll(); + static void stress_derived_pointers(); + static void verify_stack(); + static void verify_last_frame(); +# endif + + public: + static void serialize_thread_state_with_handler(JavaThread* thread) { + serialize_thread_state_internal(thread, true); + } + + // Should only call this if we know that we have a proper SEH set up. + static void serialize_thread_state(JavaThread* thread) { + serialize_thread_state_internal(thread, false); + } + + private: + static void serialize_thread_state_internal(JavaThread* thread, bool needs_exception_handler) { + // Make sure new state is seen by VM thread + if (os::is_MP()) { + if (UseMembar) { + // Force a fence between the write above and read below + OrderAccess::fence(); + } else { + // store to serialize page so VM thread can do pseudo remote membar + if (needs_exception_handler) { + os::write_memory_serialize_page_with_handler(thread); + } else { + os::write_memory_serialize_page(thread); + } + } + } + } +}; + + +// Basic class for all thread transition classes. + +class ThreadStateTransition : public StackObj { + protected: + JavaThread* _thread; + public: + ThreadStateTransition(JavaThread *thread) { + _thread = thread; + assert(thread != NULL && thread->is_Java_thread(), "must be Java thread"); + } + + // Change threadstate in a manner, so safepoint can detect changes. + // Time-critical: called on exit from every runtime routine + static inline void transition(JavaThread *thread, JavaThreadState from, JavaThreadState to) { + assert(from != _thread_in_Java, "use transition_from_java"); + assert(from != _thread_in_native, "use transition_from_native"); + assert((from & 1) == 0 && (to & 1) == 0, "odd numbers are transitions states"); + assert(thread->thread_state() == from, "coming from wrong thread state"); + // Change to transition state + thread->set_thread_state((JavaThreadState)(from + 1)); + + InterfaceSupport::serialize_thread_state(thread); + + SafepointMechanism::block_if_requested(thread); + thread->set_thread_state(to); + + CHECK_UNHANDLED_OOPS_ONLY(thread->clear_unhandled_oops();) + } + + // transition_and_fence must be used on any thread state transition + // where there might not be a Java call stub on the stack, in + // particular on Windows where the Structured Exception Handler is + // set up in the call stub. os::write_memory_serialize_page() can + // fault and we can't recover from it on Windows without a SEH in + // place. + static inline void transition_and_fence(JavaThread *thread, JavaThreadState from, JavaThreadState to) { + assert(thread->thread_state() == from, "coming from wrong thread state"); + assert((from & 1) == 0 && (to & 1) == 0, "odd numbers are transitions states"); + // Change to transition state + thread->set_thread_state((JavaThreadState)(from + 1)); + + InterfaceSupport::serialize_thread_state_with_handler(thread); + + SafepointMechanism::block_if_requested(thread); + thread->set_thread_state(to); + + CHECK_UNHANDLED_OOPS_ONLY(thread->clear_unhandled_oops();) + } + + // Same as above, but assumes from = _thread_in_Java. This is simpler, since we + // never block on entry to the VM. This will break the code, since e.g. preserve arguments + // have not been setup. + static inline void transition_from_java(JavaThread *thread, JavaThreadState to) { + assert(thread->thread_state() == _thread_in_Java, "coming from wrong thread state"); + thread->set_thread_state(to); + } + + static inline void transition_from_native(JavaThread *thread, JavaThreadState to) { + assert((to & 1) == 0, "odd numbers are transitions states"); + assert(thread->thread_state() == _thread_in_native, "coming from wrong thread state"); + // Change to transition state + thread->set_thread_state(_thread_in_native_trans); + + InterfaceSupport::serialize_thread_state_with_handler(thread); + + // We never install asynchronous exceptions when coming (back) in + // to the runtime from native code because the runtime is not set + // up to handle exceptions floating around at arbitrary points. + if (SafepointMechanism::poll(thread) || thread->is_suspend_after_native()) { + JavaThread::check_safepoint_and_suspend_for_native_trans(thread); + + // Clear unhandled oops anywhere where we could block, even if we don't. + CHECK_UNHANDLED_OOPS_ONLY(thread->clear_unhandled_oops();) + } + + thread->set_thread_state(to); + } + protected: + void trans(JavaThreadState from, JavaThreadState to) { transition(_thread, from, to); } + void trans_from_java(JavaThreadState to) { transition_from_java(_thread, to); } + void trans_from_native(JavaThreadState to) { transition_from_native(_thread, to); } + void trans_and_fence(JavaThreadState from, JavaThreadState to) { transition_and_fence(_thread, from, to); } +}; + +class ThreadInVMForHandshake : public ThreadStateTransition { + const JavaThreadState _original_state; + + void transition_back() { + // This can be invoked from transition states and must return to the original state properly + assert(_thread->thread_state() == _thread_in_vm, "should only call when leaving VM after handshake"); + _thread->set_thread_state(_thread_in_vm_trans); + + InterfaceSupport::serialize_thread_state(_thread); + + SafepointMechanism::block_if_requested(_thread); + + _thread->set_thread_state(_original_state); + } + + public: + + ThreadInVMForHandshake(JavaThread* thread) : ThreadStateTransition(thread), + _original_state(thread->thread_state()) { + + if (thread->has_last_Java_frame()) { + thread->frame_anchor()->make_walkable(thread); + } + + thread->set_thread_state(_thread_in_vm); + } + + ~ThreadInVMForHandshake() { + transition_back(); + } + +}; + +class ThreadInVMfromJava : public ThreadStateTransition { + public: + ThreadInVMfromJava(JavaThread* thread) : ThreadStateTransition(thread) { + trans_from_java(_thread_in_vm); + } + ~ThreadInVMfromJava() { + if (_thread->stack_yellow_reserved_zone_disabled()) { + _thread->enable_stack_yellow_reserved_zone(); + } + trans(_thread_in_vm, _thread_in_Java); + // Check for pending. async. exceptions or suspends. + if (_thread->has_special_runtime_exit_condition()) _thread->handle_special_runtime_exit_condition(); + } +}; + + +class ThreadInVMfromUnknown { + private: + JavaThread* _thread; + public: + ThreadInVMfromUnknown() : _thread(NULL) { + Thread* t = Thread::current(); + if (t->is_Java_thread()) { + JavaThread* t2 = (JavaThread*) t; + if (t2->thread_state() == _thread_in_native) { + _thread = t2; + ThreadStateTransition::transition_from_native(t2, _thread_in_vm); + // Used to have a HandleMarkCleaner but that is dangerous as + // it could free a handle in our (indirect, nested) caller. + // We expect any handles will be short lived and figure we + // don't need an actual HandleMark. + } + } + } + ~ThreadInVMfromUnknown() { + if (_thread) { + ThreadStateTransition::transition_and_fence(_thread, _thread_in_vm, _thread_in_native); + } + } +}; + + +class ThreadInVMfromNative : public ThreadStateTransition { + public: + ThreadInVMfromNative(JavaThread* thread) : ThreadStateTransition(thread) { + trans_from_native(_thread_in_vm); + } + ~ThreadInVMfromNative() { + trans_and_fence(_thread_in_vm, _thread_in_native); + } +}; + + +class ThreadToNativeFromVM : public ThreadStateTransition { + public: + ThreadToNativeFromVM(JavaThread *thread) : ThreadStateTransition(thread) { + // We are leaving the VM at this point and going directly to native code. + // Block, if we are in the middle of a safepoint synchronization. + assert(!thread->owns_locks(), "must release all locks when leaving VM"); + thread->frame_anchor()->make_walkable(thread); + trans_and_fence(_thread_in_vm, _thread_in_native); + // Check for pending. async. exceptions or suspends. + if (_thread->has_special_runtime_exit_condition()) _thread->handle_special_runtime_exit_condition(false); + } + + ~ThreadToNativeFromVM() { + trans_from_native(_thread_in_vm); + assert(!_thread->is_pending_jni_exception_check(), "Pending JNI Exception Check"); + // We don't need to clear_walkable because it will happen automagically when we return to java + } +}; + + +class ThreadBlockInVM : public ThreadStateTransition { + public: + ThreadBlockInVM(JavaThread *thread) + : ThreadStateTransition(thread) { + // Once we are blocked vm expects stack to be walkable + thread->frame_anchor()->make_walkable(thread); + trans_and_fence(_thread_in_vm, _thread_blocked); + } + ~ThreadBlockInVM() { + trans_and_fence(_thread_blocked, _thread_in_vm); + // We don't need to clear_walkable because it will happen automagically when we return to java + } +}; + + +// This special transition class is only used to prevent asynchronous exceptions +// from being installed on vm exit in situations where we can't tolerate them. +// See bugs: 4324348, 4854693, 4998314, 5040492, 5050705. +class ThreadInVMfromJavaNoAsyncException : public ThreadStateTransition { + public: + ThreadInVMfromJavaNoAsyncException(JavaThread* thread) : ThreadStateTransition(thread) { + trans_from_java(_thread_in_vm); + } + ~ThreadInVMfromJavaNoAsyncException() { + if (_thread->stack_yellow_reserved_zone_disabled()) { + _thread->enable_stack_yellow_reserved_zone(); + } + trans(_thread_in_vm, _thread_in_Java); + // NOTE: We do not check for pending. async. exceptions. + // If we did and moved the pending async exception over into the + // pending exception field, we would need to deopt (currently C2 + // only). However, to do so would require that we transition back + // to the _thread_in_vm state. Instead we postpone the handling of + // the async exception. + + + // Check for pending. suspends only. + if (_thread->has_special_runtime_exit_condition()) + _thread->handle_special_runtime_exit_condition(false); + } +}; + +// Debug class instantiated in JRT_ENTRY and ITR_ENTRY macro. +// Can be used to verify properties on enter/exit of the VM. + +#ifdef ASSERT +class VMEntryWrapper { + public: + VMEntryWrapper(); + ~VMEntryWrapper(); +}; + + +class VMNativeEntryWrapper { + public: + VMNativeEntryWrapper() { + if (GCALotAtAllSafepoints) InterfaceSupport::check_gc_alot(); + } + + ~VMNativeEntryWrapper() { + if (GCALotAtAllSafepoints) InterfaceSupport::check_gc_alot(); + } +}; + +#endif + + +// VM-internal runtime interface support + +#ifdef ASSERT + +class RuntimeHistogramElement : public HistogramElement { + public: + RuntimeHistogramElement(const char* name); +}; + +#define TRACE_CALL(result_type, header) \ + InterfaceSupport::_number_of_calls++; \ + if (CountRuntimeCalls) { \ + static RuntimeHistogramElement* e = new RuntimeHistogramElement(#header); \ + if (e != NULL) e->increment_count(); \ + } +#else +#define TRACE_CALL(result_type, header) \ + /* do nothing */ +#endif + + +// LEAF routines do not lock, GC or throw exceptions + +#define VM_LEAF_BASE(result_type, header) \ + TRACE_CALL(result_type, header) \ + debug_only(NoHandleMark __hm;) \ + os::verify_stack_alignment(); \ + /* begin of body */ + +#define VM_ENTRY_BASE_FROM_LEAF(result_type, header, thread) \ + TRACE_CALL(result_type, header) \ + debug_only(ResetNoHandleMark __rnhm;) \ + HandleMarkCleaner __hm(thread); \ + Thread* THREAD = thread; \ + os::verify_stack_alignment(); \ + /* begin of body */ + + +// ENTRY routines may lock, GC and throw exceptions + +#define VM_ENTRY_BASE(result_type, header, thread) \ + TRACE_CALL(result_type, header) \ + HandleMarkCleaner __hm(thread); \ + Thread* THREAD = thread; \ + os::verify_stack_alignment(); \ + /* begin of body */ + + +// QUICK_ENTRY routines behave like ENTRY but without a handle mark + +#define VM_QUICK_ENTRY_BASE(result_type, header, thread) \ + TRACE_CALL(result_type, header) \ + debug_only(NoHandleMark __hm;) \ + Thread* THREAD = thread; \ + os::verify_stack_alignment(); \ + /* begin of body */ + + +// Definitions for IRT (Interpreter Runtime) +// (thread is an argument passed in to all these routines) + +#define IRT_ENTRY(result_type, header) \ + result_type header { \ + ThreadInVMfromJava __tiv(thread); \ + VM_ENTRY_BASE(result_type, header, thread) \ + debug_only(VMEntryWrapper __vew;) + + +#define IRT_LEAF(result_type, header) \ + result_type header { \ + VM_LEAF_BASE(result_type, header) \ + debug_only(NoSafepointVerifier __nspv(true);) + + +#define IRT_ENTRY_NO_ASYNC(result_type, header) \ + result_type header { \ + ThreadInVMfromJavaNoAsyncException __tiv(thread); \ + VM_ENTRY_BASE(result_type, header, thread) \ + debug_only(VMEntryWrapper __vew;) + +#define IRT_END } + + +// Definitions for JRT (Java (Compiler/Shared) Runtime) + +#define JRT_ENTRY(result_type, header) \ + result_type header { \ + ThreadInVMfromJava __tiv(thread); \ + VM_ENTRY_BASE(result_type, header, thread) \ + debug_only(VMEntryWrapper __vew;) + + +#define JRT_LEAF(result_type, header) \ + result_type header { \ + VM_LEAF_BASE(result_type, header) \ + debug_only(JRTLeafVerifier __jlv;) + + +#define JRT_ENTRY_NO_ASYNC(result_type, header) \ + result_type header { \ + ThreadInVMfromJavaNoAsyncException __tiv(thread); \ + VM_ENTRY_BASE(result_type, header, thread) \ + debug_only(VMEntryWrapper __vew;) + +// Same as JRT Entry but allows for return value after the safepoint +// to get back into Java from the VM +#define JRT_BLOCK_ENTRY(result_type, header) \ + result_type header { \ + TRACE_CALL(result_type, header) \ + HandleMarkCleaner __hm(thread); + +#define JRT_BLOCK \ + { \ + ThreadInVMfromJava __tiv(thread); \ + Thread* THREAD = thread; \ + debug_only(VMEntryWrapper __vew;) + +#define JRT_BLOCK_NO_ASYNC \ + { \ + ThreadInVMfromJavaNoAsyncException __tiv(thread); \ + Thread* THREAD = thread; \ + debug_only(VMEntryWrapper __vew;) + +#define JRT_BLOCK_END } + +#define JRT_END } + +// Definitions for JNI + +#define JNI_ENTRY(result_type, header) \ + JNI_ENTRY_NO_PRESERVE(result_type, header) \ + WeakPreserveExceptionMark __wem(thread); + +#define JNI_ENTRY_NO_PRESERVE(result_type, header) \ +extern "C" { \ + result_type JNICALL header { \ + JavaThread* thread=JavaThread::thread_from_jni_environment(env); \ + assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \ + ThreadInVMfromNative __tiv(thread); \ + debug_only(VMNativeEntryWrapper __vew;) \ + VM_ENTRY_BASE(result_type, header, thread) + + +// Ensure that the VMNativeEntryWrapper constructor, which can cause +// a GC, is called outside the NoHandleMark (set via VM_QUICK_ENTRY_BASE). +#define JNI_QUICK_ENTRY(result_type, header) \ +extern "C" { \ + result_type JNICALL header { \ + JavaThread* thread=JavaThread::thread_from_jni_environment(env); \ + assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \ + ThreadInVMfromNative __tiv(thread); \ + debug_only(VMNativeEntryWrapper __vew;) \ + VM_QUICK_ENTRY_BASE(result_type, header, thread) + + +#define JNI_LEAF(result_type, header) \ +extern "C" { \ + result_type JNICALL header { \ + JavaThread* thread=JavaThread::thread_from_jni_environment(env); \ + assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \ + VM_LEAF_BASE(result_type, header) + + +// Close the routine and the extern "C" +#define JNI_END } } + + + +// Definitions for JVM + +#define JVM_ENTRY(result_type, header) \ +extern "C" { \ + result_type JNICALL header { \ + JavaThread* thread=JavaThread::thread_from_jni_environment(env); \ + ThreadInVMfromNative __tiv(thread); \ + debug_only(VMNativeEntryWrapper __vew;) \ + VM_ENTRY_BASE(result_type, header, thread) + + +#define JVM_ENTRY_NO_ENV(result_type, header) \ +extern "C" { \ + result_type JNICALL header { \ + JavaThread* thread = JavaThread::current(); \ + ThreadInVMfromNative __tiv(thread); \ + debug_only(VMNativeEntryWrapper __vew;) \ + VM_ENTRY_BASE(result_type, header, thread) + + +#define JVM_QUICK_ENTRY(result_type, header) \ +extern "C" { \ + result_type JNICALL header { \ + JavaThread* thread=JavaThread::thread_from_jni_environment(env); \ + ThreadInVMfromNative __tiv(thread); \ + debug_only(VMNativeEntryWrapper __vew;) \ + VM_QUICK_ENTRY_BASE(result_type, header, thread) + + +#define JVM_LEAF(result_type, header) \ +extern "C" { \ + result_type JNICALL header { \ + VM_Exit::block_if_vm_exited(); \ + VM_LEAF_BASE(result_type, header) + + +#define JVM_ENTRY_FROM_LEAF(env, result_type, header) \ + { { \ + JavaThread* thread=JavaThread::thread_from_jni_environment(env); \ + ThreadInVMfromNative __tiv(thread); \ + debug_only(VMNativeEntryWrapper __vew;) \ + VM_ENTRY_BASE_FROM_LEAF(result_type, header, thread) + + +#define JVM_END } } + +#endif // SHARE_VM_RUNTIME_INTERFACESUPPORT_INLINE_HPP