41 #include "gc/shared/gcLocker.inline.hpp"
42 #include "interpreter/interpreter.hpp"
43 #include "interpreter/interpreterRuntime.hpp"
44 #include "jvm.h"
45 #include "jfr/jfrEvents.hpp"
46 #include "logging/log.hpp"
47 #include "memory/resourceArea.hpp"
48 #include "memory/universe.hpp"
49 #include "metaprogramming/primitiveConversions.hpp"
50 #include "oops/klass.hpp"
51 #include "oops/method.inline.hpp"
52 #include "oops/objArrayKlass.hpp"
53 #include "oops/oop.inline.hpp"
54 #include "prims/forte.hpp"
55 #include "prims/jvmtiExport.hpp"
56 #include "prims/jvmtiThreadState.hpp"
57 #include "prims/methodHandles.hpp"
58 #include "prims/nativeLookup.hpp"
59 #include "runtime/arguments.hpp"
60 #include "runtime/atomic.hpp"
61 #include "runtime/frame.inline.hpp"
62 #include "runtime/handles.inline.hpp"
63 #include "runtime/init.hpp"
64 #include "runtime/interfaceSupport.inline.hpp"
65 #include "runtime/java.hpp"
66 #include "runtime/javaCalls.hpp"
67 #include "runtime/jniHandles.inline.hpp"
68 #include "runtime/perfData.hpp"
69 #include "runtime/sharedRuntime.hpp"
70 #include "runtime/stackWatermarkSet.hpp"
71 #include "runtime/stubRoutines.hpp"
72 #include "runtime/synchronizer.hpp"
73 #include "runtime/vframe.inline.hpp"
74 #include "runtime/vframeArray.hpp"
75 #include "runtime/vm_version.hpp"
76 #include "utilities/copy.hpp"
77 #include "utilities/dtrace.hpp"
78 #include "utilities/events.hpp"
79 #include "utilities/resourceHash.hpp"
80 #include "utilities/macros.hpp"
81 #include "utilities/xmlstream.hpp"
82 #ifdef COMPILER1
83 #include "c1/c1_Runtime1.hpp"
84 #endif
85 #if INCLUDE_JFR
86 #include "jfr/jfr.hpp"
87 #endif
88
89 // Shared stub locations
90 RuntimeStub* SharedRuntime::_wrong_method_blob;
91 RuntimeStub* SharedRuntime::_wrong_method_abstract_blob;
92 RuntimeStub* SharedRuntime::_ic_miss_blob;
93 RuntimeStub* SharedRuntime::_resolve_opt_virtual_call_blob;
94 RuntimeStub* SharedRuntime::_resolve_virtual_call_blob;
95 RuntimeStub* SharedRuntime::_resolve_static_call_blob;
96 address SharedRuntime::_resolve_static_call_entry;
97
98 DeoptimizationBlob* SharedRuntime::_deopt_blob;
2936 max_locals);
2937
2938 // Inflate locks. Copy the displaced headers. Be careful, there can be holes.
2939 int i = max_locals;
2940 for (BasicObjectLock *kptr2 = fr.interpreter_frame_monitor_end();
2941 kptr2 < fr.interpreter_frame_monitor_begin();
2942 kptr2 = fr.next_monitor_in_interpreter_frame(kptr2) ) {
2943 if (kptr2->obj() != nullptr) { // Avoid 'holes' in the monitor array
2944 BasicLock *lock = kptr2->lock();
2945 if (LockingMode == LM_LEGACY) {
2946 // Inflate so the object's header no longer refers to the BasicLock.
2947 if (lock->displaced_header().is_unlocked()) {
2948 // The object is locked and the resulting ObjectMonitor* will also be
2949 // locked so it can't be async deflated until ownership is dropped.
2950 // See the big comment in basicLock.cpp: BasicLock::move_to().
2951 ObjectSynchronizer::inflate_helper(kptr2->obj());
2952 }
2953 // Now the displaced header is free to move because the
2954 // object's header no longer refers to it.
2955 buf[i] = (intptr_t)lock->displaced_header().value();
2956 }
2957 #ifdef ASSERT
2958 else {
2959 buf[i] = badDispHeaderOSR;
2960 }
2961 #endif
2962 i++;
2963 buf[i++] = cast_from_oop<intptr_t>(kptr2->obj());
2964 }
2965 }
2966 assert(i - max_locals == active_monitor_count*2, "found the expected number of monitors");
2967
2968 RegisterMap map(current,
2969 RegisterMap::UpdateMap::skip,
2970 RegisterMap::ProcessFrames::include,
2971 RegisterMap::WalkContinuation::skip);
2972 frame sender = fr.sender(&map);
2973 if (sender.is_interpreted_frame()) {
2974 current->push_cont_fastpath(sender.sp());
2975 }
|
41 #include "gc/shared/gcLocker.inline.hpp"
42 #include "interpreter/interpreter.hpp"
43 #include "interpreter/interpreterRuntime.hpp"
44 #include "jvm.h"
45 #include "jfr/jfrEvents.hpp"
46 #include "logging/log.hpp"
47 #include "memory/resourceArea.hpp"
48 #include "memory/universe.hpp"
49 #include "metaprogramming/primitiveConversions.hpp"
50 #include "oops/klass.hpp"
51 #include "oops/method.inline.hpp"
52 #include "oops/objArrayKlass.hpp"
53 #include "oops/oop.inline.hpp"
54 #include "prims/forte.hpp"
55 #include "prims/jvmtiExport.hpp"
56 #include "prims/jvmtiThreadState.hpp"
57 #include "prims/methodHandles.hpp"
58 #include "prims/nativeLookup.hpp"
59 #include "runtime/arguments.hpp"
60 #include "runtime/atomic.hpp"
61 #include "runtime/basicLock.inline.hpp"
62 #include "runtime/frame.inline.hpp"
63 #include "runtime/handles.inline.hpp"
64 #include "runtime/init.hpp"
65 #include "runtime/interfaceSupport.inline.hpp"
66 #include "runtime/java.hpp"
67 #include "runtime/javaCalls.hpp"
68 #include "runtime/jniHandles.inline.hpp"
69 #include "runtime/perfData.hpp"
70 #include "runtime/sharedRuntime.hpp"
71 #include "runtime/stackWatermarkSet.hpp"
72 #include "runtime/stubRoutines.hpp"
73 #include "runtime/synchronizer.inline.hpp"
74 #include "runtime/vframe.inline.hpp"
75 #include "runtime/vframeArray.hpp"
76 #include "runtime/vm_version.hpp"
77 #include "utilities/copy.hpp"
78 #include "utilities/dtrace.hpp"
79 #include "utilities/events.hpp"
80 #include "utilities/globalDefinitions.hpp"
81 #include "utilities/resourceHash.hpp"
82 #include "utilities/macros.hpp"
83 #include "utilities/xmlstream.hpp"
84 #ifdef COMPILER1
85 #include "c1/c1_Runtime1.hpp"
86 #endif
87 #if INCLUDE_JFR
88 #include "jfr/jfr.hpp"
89 #endif
90
91 // Shared stub locations
92 RuntimeStub* SharedRuntime::_wrong_method_blob;
93 RuntimeStub* SharedRuntime::_wrong_method_abstract_blob;
94 RuntimeStub* SharedRuntime::_ic_miss_blob;
95 RuntimeStub* SharedRuntime::_resolve_opt_virtual_call_blob;
96 RuntimeStub* SharedRuntime::_resolve_virtual_call_blob;
97 RuntimeStub* SharedRuntime::_resolve_static_call_blob;
98 address SharedRuntime::_resolve_static_call_entry;
99
100 DeoptimizationBlob* SharedRuntime::_deopt_blob;
2938 max_locals);
2939
2940 // Inflate locks. Copy the displaced headers. Be careful, there can be holes.
2941 int i = max_locals;
2942 for (BasicObjectLock *kptr2 = fr.interpreter_frame_monitor_end();
2943 kptr2 < fr.interpreter_frame_monitor_begin();
2944 kptr2 = fr.next_monitor_in_interpreter_frame(kptr2) ) {
2945 if (kptr2->obj() != nullptr) { // Avoid 'holes' in the monitor array
2946 BasicLock *lock = kptr2->lock();
2947 if (LockingMode == LM_LEGACY) {
2948 // Inflate so the object's header no longer refers to the BasicLock.
2949 if (lock->displaced_header().is_unlocked()) {
2950 // The object is locked and the resulting ObjectMonitor* will also be
2951 // locked so it can't be async deflated until ownership is dropped.
2952 // See the big comment in basicLock.cpp: BasicLock::move_to().
2953 ObjectSynchronizer::inflate_helper(kptr2->obj());
2954 }
2955 // Now the displaced header is free to move because the
2956 // object's header no longer refers to it.
2957 buf[i] = (intptr_t)lock->displaced_header().value();
2958 } else if (UseObjectMonitorTable) {
2959 buf[i] = (intptr_t)lock->object_monitor_cache();
2960 }
2961 #ifdef ASSERT
2962 else {
2963 buf[i] = badDispHeaderOSR;
2964 }
2965 #endif
2966 i++;
2967 buf[i++] = cast_from_oop<intptr_t>(kptr2->obj());
2968 }
2969 }
2970 assert(i - max_locals == active_monitor_count*2, "found the expected number of monitors");
2971
2972 RegisterMap map(current,
2973 RegisterMap::UpdateMap::skip,
2974 RegisterMap::ProcessFrames::include,
2975 RegisterMap::WalkContinuation::skip);
2976 frame sender = fr.sender(&map);
2977 if (sender.is_interpreted_frame()) {
2978 current->push_cont_fastpath(sender.sp());
2979 }
|