19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "code/compiledIC.hpp"
27 #include "code/nmethod.hpp"
28 #include "oops/method.inline.hpp"
29 #include "runtime/continuation.hpp"
30 #include "runtime/continuationEntry.inline.hpp"
31 #include "runtime/continuationHelper.inline.hpp"
32 #include "runtime/frame.inline.hpp"
33 #include "runtime/javaThread.hpp"
34 #include "runtime/stackFrameStream.inline.hpp"
35 #include "runtime/stackWatermarkSet.inline.hpp"
36 #include "runtime/stubRoutines.hpp"
37
38 int ContinuationEntry::_return_pc_offset = 0;
39 address ContinuationEntry::_return_pc = nullptr;
40 nmethod* ContinuationEntry::_enter_special = nullptr;
41 int ContinuationEntry::_interpreted_entry_offset = 0;
42
43 void ContinuationEntry::set_enter_code(nmethod* nm, int interpreted_entry_offset) {
44 assert(_return_pc_offset != 0, "");
45 _return_pc = nm->code_begin() + _return_pc_offset;
46
47 _enter_special = nm;
48 _interpreted_entry_offset = interpreted_entry_offset;
49 assert(_enter_special->code_contains(compiled_entry()), "entry not in enterSpecial");
50 assert(_enter_special->code_contains(interpreted_entry()), "entry not in enterSpecial");
51 assert(interpreted_entry() < compiled_entry(), "unexpected code layout");
52 }
53
54 address ContinuationEntry::compiled_entry() {
55 return _enter_special->verified_entry_point();
56 }
57
58 address ContinuationEntry::interpreted_entry() {
59 return _enter_special->code_begin() + _interpreted_entry_offset;
60 }
61
62 bool ContinuationEntry::is_interpreted_call(address call_address) {
63 assert(_enter_special->code_contains(call_address), "call not in enterSpecial");
64 assert(call_address >= interpreted_entry(), "unexpected location");
65 return call_address < compiled_entry();
66 }
67
68 ContinuationEntry* ContinuationEntry::from_frame(const frame& f) {
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "code/compiledIC.hpp"
27 #include "code/nmethod.hpp"
28 #include "oops/method.inline.hpp"
29 #include "runtime/continuation.hpp"
30 #include "runtime/continuationEntry.inline.hpp"
31 #include "runtime/continuationHelper.inline.hpp"
32 #include "runtime/frame.inline.hpp"
33 #include "runtime/javaThread.hpp"
34 #include "runtime/stackFrameStream.inline.hpp"
35 #include "runtime/stackWatermarkSet.inline.hpp"
36 #include "runtime/stubRoutines.hpp"
37
38 int ContinuationEntry::_return_pc_offset = 0;
39 int ContinuationEntry::_thaw_call_pc_offset = 0;
40 address ContinuationEntry::_return_pc = nullptr;
41 address ContinuationEntry::_thaw_call_pc = nullptr;
42 nmethod* ContinuationEntry::_enter_special = nullptr;
43 int ContinuationEntry::_interpreted_entry_offset = 0;
44
45 void ContinuationEntry::set_enter_code(nmethod* nm, int interpreted_entry_offset) {
46 assert(_return_pc_offset != 0, "");
47 _return_pc = nm->code_begin() + _return_pc_offset;
48 _thaw_call_pc = nm->code_begin() + _thaw_call_pc_offset;
49
50 _enter_special = nm;
51 _interpreted_entry_offset = interpreted_entry_offset;
52
53 assert(_enter_special->code_contains(compiled_entry()), "entry not in enterSpecial");
54 assert(_enter_special->code_contains(interpreted_entry()), "entry not in enterSpecial");
55 assert(interpreted_entry() < compiled_entry(), "unexpected code layout");
56 }
57
58 address ContinuationEntry::compiled_entry() {
59 return _enter_special->verified_entry_point();
60 }
61
62 address ContinuationEntry::interpreted_entry() {
63 return _enter_special->code_begin() + _interpreted_entry_offset;
64 }
65
66 bool ContinuationEntry::is_interpreted_call(address call_address) {
67 assert(_enter_special->code_contains(call_address), "call not in enterSpecial");
68 assert(call_address >= interpreted_entry(), "unexpected location");
69 return call_address < compiled_entry();
70 }
71
72 ContinuationEntry* ContinuationEntry::from_frame(const frame& f) {
|