< prev index next >

src/hotspot/cpu/ppc/stackChunkFrameStream_ppc.inline.hpp

Print this page

159   intptr_t* bottom = derelativize(ijava_idx(locals)) + 1;
160   return (int)(bottom - top);
161 }
162 
163 // Size of stack args in words (P0..Pn above). Only valid if the caller is also
164 // interpreted. The function is also called if the caller is compiled but the
165 // result is not used in that case (same on x86).
166 // See also setting of sender_sp in ContinuationHelper::InterpretedFrame::patch_sender_sp()
167 template <ChunkFrames frame_kind>
168 inline int StackChunkFrameStream<frame_kind>::interpreter_frame_stack_argsize() const {
169   assert_is_interpreted_and_frame_type_mixed();
170   frame::ijava_state* state = (frame::ijava_state*)((uintptr_t)fp() - frame::ijava_state_size);
171   int diff = (int)(state->locals - (state->sender_sp + frame::metadata_words_at_top) + 1);
172   assert(diff == -frame::metadata_words_at_top || ((Method*)state->method)->size_of_parameters() == diff,
173          "size_of_parameters(): %d diff: %d sp: " PTR_FORMAT " fp:" PTR_FORMAT,
174          ((Method*)state->method)->size_of_parameters(), diff, p2i(sp()), p2i(fp()));
175   return diff;
176 }
177 
178 template <ChunkFrames frame_kind>
179 inline int StackChunkFrameStream<frame_kind>::interpreter_frame_num_oops() const {

180   assert_is_interpreted_and_frame_type_mixed();
181   ResourceMark rm;
182   InterpreterOopMap mask;
183   frame f = to_frame();
184   f.interpreted_frame_oop_map(&mask);
185   return  mask.num_oops()
186           + 1 // for the mirror oop
187           + (f.interpreter_frame_method()->is_native() ? 1 : 0) // temp oop slot
188           + pointer_delta_as_int((intptr_t*)f.interpreter_frame_monitor_begin(),
189                                  (intptr_t*)f.interpreter_frame_monitor_end())/BasicObjectLock::size();
190 }
191 
192 template<>
193 template<>
194 inline void StackChunkFrameStream<ChunkFrames::Mixed>::update_reg_map_pd(RegisterMap* map) {
195   // Nothing to do (no non-volatile registers in java calling convention)
196 }
197 
198 template<>
199 template<>

159   intptr_t* bottom = derelativize(ijava_idx(locals)) + 1;
160   return (int)(bottom - top);
161 }
162 
163 // Size of stack args in words (P0..Pn above). Only valid if the caller is also
164 // interpreted. The function is also called if the caller is compiled but the
165 // result is not used in that case (same on x86).
166 // See also setting of sender_sp in ContinuationHelper::InterpretedFrame::patch_sender_sp()
167 template <ChunkFrames frame_kind>
168 inline int StackChunkFrameStream<frame_kind>::interpreter_frame_stack_argsize() const {
169   assert_is_interpreted_and_frame_type_mixed();
170   frame::ijava_state* state = (frame::ijava_state*)((uintptr_t)fp() - frame::ijava_state_size);
171   int diff = (int)(state->locals - (state->sender_sp + frame::metadata_words_at_top) + 1);
172   assert(diff == -frame::metadata_words_at_top || ((Method*)state->method)->size_of_parameters() == diff,
173          "size_of_parameters(): %d diff: %d sp: " PTR_FORMAT " fp:" PTR_FORMAT,
174          ((Method*)state->method)->size_of_parameters(), diff, p2i(sp()), p2i(fp()));
175   return diff;
176 }
177 
178 template <ChunkFrames frame_kind>
179 template <typename RegisterMapT>
180 inline int StackChunkFrameStream<frame_kind>::interpreter_frame_num_oops(RegisterMapT* map) const {
181   assert_is_interpreted_and_frame_type_mixed();
182   ResourceMark rm;
183   InterpreterOopMap mask;
184   frame f = to_frame();
185   f.interpreted_frame_oop_map(&mask);
186   return  mask.num_oops()
187           + 1 // for the mirror oop
188           + (f.interpreter_frame_method()->is_native() ? 1 : 0) // temp oop slot
189           + pointer_delta_as_int((intptr_t*)f.interpreter_frame_monitor_begin(),
190                                  (intptr_t*)f.interpreter_frame_monitor_end())/BasicObjectLock::size();
191 }
192 
193 template<>
194 template<>
195 inline void StackChunkFrameStream<ChunkFrames::Mixed>::update_reg_map_pd(RegisterMap* map) {
196   // Nothing to do (no non-volatile registers in java calling convention)
197 }
198 
199 template<>
200 template<>
< prev index next >