author | lana |
Sat, 22 Apr 2017 00:22:47 +0000 | |
changeset 44716 | 60901aefa352 |
parent 38144 | 0976c0c5c5d3 |
permissions | -rw-r--r-- |
4013 | 1 |
/* |
38074
8475fdc6dcc3
8154580: Save mirror in interpreter frame to enable cleanups of CLDClosure
coleenp
parents:
35214
diff
changeset
|
2 |
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. |
5418 | 3 |
* Copyright 2007, 2008, 2009, 2010 Red Hat, Inc. |
4013 | 4 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 |
* |
|
6 |
* This code is free software; you can redistribute it and/or modify it |
|
7 |
* under the terms of the GNU General Public License version 2 only, as |
|
8 |
* published by the Free Software Foundation. |
|
9 |
* |
|
10 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
11 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
12 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
13 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
14 |
* accompanied this code). |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License version |
|
17 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
18 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
19 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5418
diff
changeset
|
20 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5418
diff
changeset
|
21 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5418
diff
changeset
|
22 |
* questions. |
4013 | 23 |
* |
24 |
*/ |
|
25 |
||
7397 | 26 |
#ifndef CPU_ZERO_VM_FRAME_ZERO_INLINE_HPP |
27 |
#define CPU_ZERO_VM_FRAME_ZERO_INLINE_HPP |
|
28 |
||
26142 | 29 |
#include "code/codeCache.hpp" |
30 |
||
4013 | 31 |
// Constructors |
32 |
||
33 |
inline frame::frame() { |
|
5418 | 34 |
_zeroframe = NULL; |
4013 | 35 |
_sp = NULL; |
36 |
_pc = NULL; |
|
37 |
_cb = NULL; |
|
38 |
_deopt_state = unknown; |
|
39 |
} |
|
40 |
||
19336
ddceb0657500
8022956: Clang: enable return type warnings on BSD
twisti
parents:
19267
diff
changeset
|
41 |
inline address frame::sender_pc() const { ShouldNotCallThis(); return NULL; } |
14294 | 42 |
|
5418 | 43 |
inline frame::frame(ZeroFrame* zf, intptr_t* sp) { |
44 |
_zeroframe = zf; |
|
4013 | 45 |
_sp = sp; |
46 |
switch (zeroframe()->type()) { |
|
47 |
case ZeroFrame::ENTRY_FRAME: |
|
48 |
_pc = StubRoutines::call_stub_return_pc(); |
|
49 |
_cb = NULL; |
|
15205 | 50 |
_deopt_state = not_deoptimized; |
4013 | 51 |
break; |
52 |
||
53 |
case ZeroFrame::INTERPRETER_FRAME: |
|
54 |
_pc = NULL; |
|
55 |
_cb = NULL; |
|
15205 | 56 |
_deopt_state = not_deoptimized; |
4013 | 57 |
break; |
58 |
||
15205 | 59 |
case ZeroFrame::SHARK_FRAME: { |
4013 | 60 |
_pc = zero_sharkframe()->pc(); |
61 |
_cb = CodeCache::find_blob_unsafe(pc()); |
|
38133
78b95467b9f1
8151956: Support non-continuous CodeBlobs in HotSpot
rbackman
parents:
35214
diff
changeset
|
62 |
address original_pc = CompiledMethod::get_deopt_original_pc(this); |
15205 | 63 |
if (original_pc != NULL) { |
64 |
_pc = original_pc; |
|
65 |
_deopt_state = is_deoptimized; |
|
66 |
} else { |
|
67 |
_deopt_state = not_deoptimized; |
|
68 |
} |
|
4013 | 69 |
break; |
15205 | 70 |
} |
4013 | 71 |
case ZeroFrame::FAKE_STUB_FRAME: |
72 |
_pc = NULL; |
|
73 |
_cb = NULL; |
|
15205 | 74 |
_deopt_state = not_deoptimized; |
4013 | 75 |
break; |
76 |
||
77 |
default: |
|
78 |
ShouldNotReachHere(); |
|
79 |
} |
|
80 |
} |
|
81 |
||
82 |
// Accessors |
|
83 |
||
84 |
inline intptr_t* frame::sender_sp() const { |
|
5418 | 85 |
return fp() + 1; |
4013 | 86 |
} |
87 |
||
11486
cdc636532368
7120448: Fix FP values for compiled frames in frame::describe
bdelsart
parents:
7397
diff
changeset
|
88 |
inline intptr_t* frame::real_fp() const { |
cdc636532368
7120448: Fix FP values for compiled frames in frame::describe
bdelsart
parents:
7397
diff
changeset
|
89 |
return fp(); |
cdc636532368
7120448: Fix FP values for compiled frames in frame::describe
bdelsart
parents:
7397
diff
changeset
|
90 |
} |
cdc636532368
7120448: Fix FP values for compiled frames in frame::describe
bdelsart
parents:
7397
diff
changeset
|
91 |
|
4013 | 92 |
inline intptr_t* frame::link() const { |
93 |
ShouldNotCallThis(); |
|
19336
ddceb0657500
8022956: Clang: enable return type warnings on BSD
twisti
parents:
19267
diff
changeset
|
94 |
return NULL; |
4013 | 95 |
} |
96 |
||
97 |
#ifdef CC_INTERP |
|
98 |
inline interpreterState frame::get_interpreterState() const { |
|
99 |
return zero_interpreterframe()->interpreter_state(); |
|
100 |
} |
|
101 |
||
102 |
inline intptr_t** frame::interpreter_frame_locals_addr() const { |
|
103 |
return &(get_interpreterState()->_locals); |
|
104 |
} |
|
105 |
||
25714
87fa6860b5ae
8004128: NPG: remove stackwalking in Threads::gc_prologue and gc_epilogue code
coleenp
parents:
22234
diff
changeset
|
106 |
inline intptr_t* frame::interpreter_frame_bcp_addr() const { |
4013 | 107 |
return (intptr_t*) &(get_interpreterState()->_bcp); |
108 |
} |
|
109 |
||
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
11486
diff
changeset
|
110 |
inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const { |
4013 | 111 |
return &(get_interpreterState()->_constants); |
112 |
} |
|
113 |
||
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
11486
diff
changeset
|
114 |
inline Method** frame::interpreter_frame_method_addr() const { |
4013 | 115 |
return &(get_interpreterState()->_method); |
116 |
} |
|
117 |
||
38074
8475fdc6dcc3
8154580: Save mirror in interpreter frame to enable cleanups of CLDClosure
coleenp
parents:
35214
diff
changeset
|
118 |
inline oop* frame::interpreter_frame_mirror_addr() const { |
8475fdc6dcc3
8154580: Save mirror in interpreter frame to enable cleanups of CLDClosure
coleenp
parents:
35214
diff
changeset
|
119 |
return &(get_interpreterState()->_mirror); |
8475fdc6dcc3
8154580: Save mirror in interpreter frame to enable cleanups of CLDClosure
coleenp
parents:
35214
diff
changeset
|
120 |
} |
8475fdc6dcc3
8154580: Save mirror in interpreter frame to enable cleanups of CLDClosure
coleenp
parents:
35214
diff
changeset
|
121 |
|
25714
87fa6860b5ae
8004128: NPG: remove stackwalking in Threads::gc_prologue and gc_epilogue code
coleenp
parents:
22234
diff
changeset
|
122 |
inline intptr_t* frame::interpreter_frame_mdp_addr() const { |
4013 | 123 |
return (intptr_t*) &(get_interpreterState()->_mdx); |
124 |
} |
|
125 |
||
126 |
inline intptr_t* frame::interpreter_frame_tos_address() const { |
|
127 |
return get_interpreterState()->_stack + 1; |
|
128 |
} |
|
35214 | 129 |
|
130 |
inline oop* frame::interpreter_frame_temp_oop_addr() const { |
|
131 |
interpreterState istate = get_interpreterState(); |
|
132 |
return (oop *)&istate->_oop_temp; |
|
133 |
} |
|
4013 | 134 |
#endif // CC_INTERP |
135 |
||
136 |
inline int frame::interpreter_frame_monitor_size() { |
|
137 |
return BasicObjectLock::size(); |
|
138 |
} |
|
139 |
||
140 |
inline intptr_t* frame::interpreter_frame_expression_stack() const { |
|
141 |
intptr_t* monitor_end = (intptr_t*) interpreter_frame_monitor_end(); |
|
142 |
return monitor_end - 1; |
|
143 |
} |
|
144 |
||
145 |
inline jint frame::interpreter_frame_expression_stack_direction() { |
|
146 |
return -1; |
|
147 |
} |
|
148 |
||
149 |
// Return a unique id for this frame. The id must have a value where |
|
150 |
// we can distinguish identity and younger/older relationship. NULL |
|
151 |
// represents an invalid (incomparable) frame. |
|
152 |
inline intptr_t* frame::id() const { |
|
5418 | 153 |
return fp(); |
4013 | 154 |
} |
155 |
||
19267
058bf12be1e0
8022188: Make zero compile after 8016131 and 8016697
omajid
parents:
15205
diff
changeset
|
156 |
inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const { |
4013 | 157 |
return zero_entryframe()->call_wrapper(); |
158 |
} |
|
159 |
||
160 |
inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) { |
|
161 |
ShouldNotCallThis(); |
|
162 |
} |
|
163 |
||
164 |
inline oop frame::saved_oop_result(RegisterMap* map) const { |
|
165 |
ShouldNotCallThis(); |
|
19336
ddceb0657500
8022956: Clang: enable return type warnings on BSD
twisti
parents:
19267
diff
changeset
|
166 |
return NULL; |
4013 | 167 |
} |
168 |
||
169 |
inline bool frame::is_older(intptr_t* id) const { |
|
170 |
ShouldNotCallThis(); |
|
19336
ddceb0657500
8022956: Clang: enable return type warnings on BSD
twisti
parents:
19267
diff
changeset
|
171 |
return false; |
4013 | 172 |
} |
173 |
||
174 |
inline intptr_t* frame::entry_frame_argument_at(int offset) const { |
|
175 |
ShouldNotCallThis(); |
|
19336
ddceb0657500
8022956: Clang: enable return type warnings on BSD
twisti
parents:
19267
diff
changeset
|
176 |
return NULL; |
4013 | 177 |
} |
178 |
||
179 |
inline intptr_t* frame::unextended_sp() const { |
|
180 |
if (zeroframe()->is_shark_frame()) |
|
181 |
return zero_sharkframe()->unextended_sp(); |
|
182 |
else |
|
183 |
return (intptr_t *) -1; |
|
184 |
} |
|
7397 | 185 |
|
186 |
#endif // CPU_ZERO_VM_FRAME_ZERO_INLINE_HPP |