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