author | kvn |
Tue, 28 Jan 2014 12:25:34 -0800 | |
changeset 22872 | b6902ee5bc8d |
parent 22234 | da823d78ad65 |
child 25714 | 87fa6860b5ae |
permissions | -rw-r--r-- |
4013 | 1 |
/* |
22234
da823d78ad65
8029233: Update copyright year to match last edit in jdk8 hotspot repository for 2013
mikael
parents:
19336
diff
changeset
|
2 |
* Copyright (c) 2003, 2013, 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 |
||
4013 | 29 |
// Constructors |
30 |
||
31 |
inline frame::frame() { |
|
5418 | 32 |
_zeroframe = NULL; |
4013 | 33 |
_sp = NULL; |
34 |
_pc = NULL; |
|
35 |
_cb = NULL; |
|
36 |
_deopt_state = unknown; |
|
37 |
} |
|
38 |
||
19336
ddceb0657500
8022956: Clang: enable return type warnings on BSD
twisti
parents:
19267
diff
changeset
|
39 |
inline address frame::sender_pc() const { ShouldNotCallThis(); return NULL; } |
14294 | 40 |
|
5418 | 41 |
inline frame::frame(ZeroFrame* zf, intptr_t* sp) { |
42 |
_zeroframe = zf; |
|
4013 | 43 |
_sp = sp; |
44 |
switch (zeroframe()->type()) { |
|
45 |
case ZeroFrame::ENTRY_FRAME: |
|
46 |
_pc = StubRoutines::call_stub_return_pc(); |
|
47 |
_cb = NULL; |
|
15205 | 48 |
_deopt_state = not_deoptimized; |
4013 | 49 |
break; |
50 |
||
51 |
case ZeroFrame::INTERPRETER_FRAME: |
|
52 |
_pc = NULL; |
|
53 |
_cb = NULL; |
|
15205 | 54 |
_deopt_state = not_deoptimized; |
4013 | 55 |
break; |
56 |
||
15205 | 57 |
case ZeroFrame::SHARK_FRAME: { |
4013 | 58 |
_pc = zero_sharkframe()->pc(); |
59 |
_cb = CodeCache::find_blob_unsafe(pc()); |
|
15205 | 60 |
address original_pc = nmethod::get_deopt_original_pc(this); |
61 |
if (original_pc != NULL) { |
|
62 |
_pc = original_pc; |
|
63 |
_deopt_state = is_deoptimized; |
|
64 |
} else { |
|
65 |
_deopt_state = not_deoptimized; |
|
66 |
} |
|
4013 | 67 |
break; |
15205 | 68 |
} |
4013 | 69 |
case ZeroFrame::FAKE_STUB_FRAME: |
70 |
_pc = NULL; |
|
71 |
_cb = NULL; |
|
15205 | 72 |
_deopt_state = not_deoptimized; |
4013 | 73 |
break; |
74 |
||
75 |
default: |
|
76 |
ShouldNotReachHere(); |
|
77 |
} |
|
78 |
} |
|
79 |
||
80 |
// Accessors |
|
81 |
||
82 |
inline intptr_t* frame::sender_sp() const { |
|
5418 | 83 |
return fp() + 1; |
4013 | 84 |
} |
85 |
||
11486
cdc636532368
7120448: Fix FP values for compiled frames in frame::describe
bdelsart
parents:
7397
diff
changeset
|
86 |
inline intptr_t* frame::real_fp() const { |
cdc636532368
7120448: Fix FP values for compiled frames in frame::describe
bdelsart
parents:
7397
diff
changeset
|
87 |
return fp(); |
cdc636532368
7120448: Fix FP values for compiled frames in frame::describe
bdelsart
parents:
7397
diff
changeset
|
88 |
} |
cdc636532368
7120448: Fix FP values for compiled frames in frame::describe
bdelsart
parents:
7397
diff
changeset
|
89 |
|
4013 | 90 |
inline intptr_t* frame::link() const { |
91 |
ShouldNotCallThis(); |
|
19336
ddceb0657500
8022956: Clang: enable return type warnings on BSD
twisti
parents:
19267
diff
changeset
|
92 |
return NULL; |
4013 | 93 |
} |
94 |
||
95 |
#ifdef CC_INTERP |
|
96 |
inline interpreterState frame::get_interpreterState() const { |
|
97 |
return zero_interpreterframe()->interpreter_state(); |
|
98 |
} |
|
99 |
||
100 |
inline intptr_t** frame::interpreter_frame_locals_addr() const { |
|
101 |
return &(get_interpreterState()->_locals); |
|
102 |
} |
|
103 |
||
104 |
inline intptr_t* frame::interpreter_frame_bcx_addr() const { |
|
105 |
return (intptr_t*) &(get_interpreterState()->_bcp); |
|
106 |
} |
|
107 |
||
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
11486
diff
changeset
|
108 |
inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const { |
4013 | 109 |
return &(get_interpreterState()->_constants); |
110 |
} |
|
111 |
||
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
11486
diff
changeset
|
112 |
inline Method** frame::interpreter_frame_method_addr() const { |
4013 | 113 |
return &(get_interpreterState()->_method); |
114 |
} |
|
115 |
||
116 |
inline intptr_t* frame::interpreter_frame_mdx_addr() const { |
|
117 |
return (intptr_t*) &(get_interpreterState()->_mdx); |
|
118 |
} |
|
119 |
||
120 |
inline intptr_t* frame::interpreter_frame_tos_address() const { |
|
121 |
return get_interpreterState()->_stack + 1; |
|
122 |
} |
|
123 |
#endif // CC_INTERP |
|
124 |
||
125 |
inline int frame::interpreter_frame_monitor_size() { |
|
126 |
return BasicObjectLock::size(); |
|
127 |
} |
|
128 |
||
129 |
inline intptr_t* frame::interpreter_frame_expression_stack() const { |
|
130 |
intptr_t* monitor_end = (intptr_t*) interpreter_frame_monitor_end(); |
|
131 |
return monitor_end - 1; |
|
132 |
} |
|
133 |
||
134 |
inline jint frame::interpreter_frame_expression_stack_direction() { |
|
135 |
return -1; |
|
136 |
} |
|
137 |
||
138 |
// Return a unique id for this frame. The id must have a value where |
|
139 |
// we can distinguish identity and younger/older relationship. NULL |
|
140 |
// represents an invalid (incomparable) frame. |
|
141 |
inline intptr_t* frame::id() const { |
|
5418 | 142 |
return fp(); |
4013 | 143 |
} |
144 |
||
19267
058bf12be1e0
8022188: Make zero compile after 8016131 and 8016697
omajid
parents:
15205
diff
changeset
|
145 |
inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const { |
4013 | 146 |
return zero_entryframe()->call_wrapper(); |
147 |
} |
|
148 |
||
149 |
inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) { |
|
150 |
ShouldNotCallThis(); |
|
151 |
} |
|
152 |
||
153 |
inline oop frame::saved_oop_result(RegisterMap* map) const { |
|
154 |
ShouldNotCallThis(); |
|
19336
ddceb0657500
8022956: Clang: enable return type warnings on BSD
twisti
parents:
19267
diff
changeset
|
155 |
return NULL; |
4013 | 156 |
} |
157 |
||
158 |
inline bool frame::is_older(intptr_t* id) const { |
|
159 |
ShouldNotCallThis(); |
|
19336
ddceb0657500
8022956: Clang: enable return type warnings on BSD
twisti
parents:
19267
diff
changeset
|
160 |
return false; |
4013 | 161 |
} |
162 |
||
163 |
inline intptr_t* frame::entry_frame_argument_at(int offset) const { |
|
164 |
ShouldNotCallThis(); |
|
19336
ddceb0657500
8022956: Clang: enable return type warnings on BSD
twisti
parents:
19267
diff
changeset
|
165 |
return NULL; |
4013 | 166 |
} |
167 |
||
168 |
inline intptr_t* frame::unextended_sp() const { |
|
169 |
if (zeroframe()->is_shark_frame()) |
|
170 |
return zero_sharkframe()->unextended_sp(); |
|
171 |
else |
|
172 |
return (intptr_t *) -1; |
|
173 |
} |
|
7397 | 174 |
|
175 |
#endif // CPU_ZERO_VM_FRAME_ZERO_INLINE_HPP |