< prev index next >

src/hotspot/cpu/zero/frame_zero.inline.hpp

Print this page

  1 /*
  2  * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
  3  * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
  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  *
 20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 21  * or visit www.oracle.com if you need additional information or have any
 22  * questions.
 23  *
 24  */
 25 
 26 #ifndef CPU_ZERO_FRAME_ZERO_INLINE_HPP
 27 #define CPU_ZERO_FRAME_ZERO_INLINE_HPP
 28 
 29 #include "code/codeCache.hpp"
 30 
 31 // Constructors
 32 
 33 inline frame::frame() {
 34   _zeroframe = NULL;
 35   _sp = NULL;
 36   _pc = NULL;
 37   _cb = NULL;
 38   _deopt_state = unknown;
 39 }
 40 
 41 inline address  frame::sender_pc()           const { ShouldNotCallThis(); return NULL; }
 42 




 43 inline frame::frame(ZeroFrame* zf, intptr_t* sp) {
 44   _zeroframe = zf;
 45   _sp = sp;
 46   switch (zeroframe()->type()) {
 47   case ZeroFrame::ENTRY_FRAME:
 48     _pc = StubRoutines::call_stub_return_pc();
 49     _cb = NULL;
 50     _deopt_state = not_deoptimized;
 51     break;
 52 
 53   case ZeroFrame::INTERPRETER_FRAME:
 54     _pc = NULL;
 55     _cb = NULL;
 56     _deopt_state = not_deoptimized;
 57     break;
 58 
 59   case ZeroFrame::FAKE_STUB_FRAME:
 60     _pc = NULL;
 61     _cb = NULL;
 62     _deopt_state = not_deoptimized;

 94   return (intptr_t*) &(get_interpreterState()->_bcp);
 95 }
 96 
 97 inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const {
 98   return &(get_interpreterState()->_constants);
 99 }
100 
101 inline Method** frame::interpreter_frame_method_addr() const {
102   return &(get_interpreterState()->_method);
103 }
104 
105 inline oop* frame::interpreter_frame_mirror_addr() const {
106   return &(get_interpreterState()->_mirror);
107 }
108 
109 inline intptr_t* frame::interpreter_frame_mdp_addr() const {
110   fatal("Should not call this: Zero never profiles");
111   return NULL; // silence compiler warnings
112 }
113 

114 inline intptr_t* frame::interpreter_frame_tos_address() const {
115   return get_interpreterState()->_stack + 1;
116 }
117 
118 inline oop* frame::interpreter_frame_temp_oop_addr() const {
119   interpreterState istate = get_interpreterState();
120   return (oop *)&istate->_oop_temp;
121 }
122 
123 inline int frame::interpreter_frame_monitor_size() {
124   return BasicObjectLock::size();
125 }
126 

127 inline intptr_t* frame::interpreter_frame_expression_stack() const {
128   intptr_t* monitor_end = (intptr_t*) interpreter_frame_monitor_end();
129   return monitor_end - 1;
130 }
131 
132 // Return a unique id for this frame. The id must have a value where
133 // we can distinguish identity and younger/older relationship. NULL
134 // represents an invalid (incomparable) frame.
135 inline intptr_t* frame::id() const {
136   return fp();
137 }
138 
139 inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
140   return zero_entryframe()->call_wrapper();
141 }
142 
143 inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) {
144   ShouldNotCallThis();
145 }
146 
147 inline oop frame::saved_oop_result(RegisterMap* map) const {
148   ShouldNotCallThis();
149   return NULL;
150 }
151 
152 inline bool frame::is_older(intptr_t* id) const {
153   ShouldNotCallThis();
154   return false;
155 }
156 
157 inline intptr_t* frame::entry_frame_argument_at(int offset) const {
158   ShouldNotCallThis();
159   return NULL;
160 }
161 
162 inline intptr_t* frame::unextended_sp() const {
163   return (intptr_t *) -1;
164 }
165 























































166 #endif // CPU_ZERO_FRAME_ZERO_INLINE_HPP

  1 /*
  2  * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
  3  * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
  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  *
 20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 21  * or visit www.oracle.com if you need additional information or have any
 22  * questions.
 23  *
 24  */
 25 
 26 #ifndef CPU_ZERO_FRAME_ZERO_INLINE_HPP
 27 #define CPU_ZERO_FRAME_ZERO_INLINE_HPP
 28 
 29 #include "code/codeCache.hpp"
 30 
 31 // Constructors
 32 
 33 inline frame::frame() {
 34   _zeroframe = NULL;
 35   _sp = NULL;
 36   _pc = NULL;
 37   _cb = NULL;
 38   _deopt_state = unknown;
 39 }
 40 
 41 inline address  frame::sender_pc()           const { ShouldNotCallThis(); return NULL; }
 42 
 43 inline frame::frame(intptr_t* sp) {
 44   Unimplemented();
 45 }
 46 
 47 inline frame::frame(ZeroFrame* zf, intptr_t* sp) {
 48   _zeroframe = zf;
 49   _sp = sp;
 50   switch (zeroframe()->type()) {
 51   case ZeroFrame::ENTRY_FRAME:
 52     _pc = StubRoutines::call_stub_return_pc();
 53     _cb = NULL;
 54     _deopt_state = not_deoptimized;
 55     break;
 56 
 57   case ZeroFrame::INTERPRETER_FRAME:
 58     _pc = NULL;
 59     _cb = NULL;
 60     _deopt_state = not_deoptimized;
 61     break;
 62 
 63   case ZeroFrame::FAKE_STUB_FRAME:
 64     _pc = NULL;
 65     _cb = NULL;
 66     _deopt_state = not_deoptimized;

 98   return (intptr_t*) &(get_interpreterState()->_bcp);
 99 }
100 
101 inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const {
102   return &(get_interpreterState()->_constants);
103 }
104 
105 inline Method** frame::interpreter_frame_method_addr() const {
106   return &(get_interpreterState()->_method);
107 }
108 
109 inline oop* frame::interpreter_frame_mirror_addr() const {
110   return &(get_interpreterState()->_mirror);
111 }
112 
113 inline intptr_t* frame::interpreter_frame_mdp_addr() const {
114   fatal("Should not call this: Zero never profiles");
115   return NULL; // silence compiler warnings
116 }
117 
118 template <bool relative>
119 inline intptr_t* frame::interpreter_frame_tos_address() const {
120   return get_interpreterState()->_stack + 1;
121 }
122 
123 inline oop* frame::interpreter_frame_temp_oop_addr() const {
124   interpreterState istate = get_interpreterState();
125   return (oop *)&istate->_oop_temp;
126 }
127 
128 inline int frame::interpreter_frame_monitor_size() {
129   return BasicObjectLock::size();
130 }
131 
132 template <bool relative>
133 inline intptr_t* frame::interpreter_frame_expression_stack() const {
134   intptr_t* monitor_end = (intptr_t*) interpreter_frame_monitor_end();
135   return monitor_end - 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 {
142   return fp();
143 }
144 
145 inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
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();
155   return NULL;
156 }
157 
158 inline bool frame::is_older(intptr_t* id) const {
159   ShouldNotCallThis();
160   return false;
161 }
162 
163 inline intptr_t* frame::entry_frame_argument_at(int offset) const {
164   ShouldNotCallThis();
165   return NULL;
166 }
167 
168 inline intptr_t* frame::unextended_sp() const {
169   return (intptr_t *) -1;
170 }
171 
172 inline const ImmutableOopMap* frame::get_oop_map() const {
173   Unimplemented();
174   return NULL;
175 }
176 
177 inline int frame::compiled_frame_stack_argsize() const {
178   Unimplemented();
179   return 0;
180 }
181 
182 inline void frame::interpreted_frame_oop_map(InterpreterOopMap* mask) const {
183   Unimplemented();
184 }
185 
186 template <bool relative>
187 inline intptr_t* frame::interpreter_frame_last_sp() const {
188   Unimplemented();
189   return NULL;
190 }
191 
192 inline int frame::sender_sp_ret_address_offset() {
193   Unimplemented();
194   return 0;
195 }
196 
197 template <typename RegisterMapT>
198 void frame::update_map_with_saved_link(RegisterMapT* map, intptr_t** link_addr) {
199   Unimplemented();
200 }
201 
202 inline void frame::set_unextended_sp(intptr_t* value) {
203   Unimplemented();
204 }
205 
206 inline int frame::offset_unextended_sp() const {
207   Unimplemented();
208   return 0;
209 }
210 
211 inline void frame::set_offset_unextended_sp(int value) {
212   Unimplemented();
213 }
214 
215 inline int frame::frame_size() const {
216 #ifdef PRODUCT
217   ShouldNotCallThis();
218 #endif // PRODUCT
219   return 0; // make javaVFrame::print_value work
220 }
221 
222 inline address* frame::sender_pc_addr() const {
223   ShouldNotCallThis();
224   return NULL;
225 }
226 
227 #endif // CPU_ZERO_FRAME_ZERO_INLINE_HPP
< prev index next >