< prev index next >

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

Print this page

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           + ((intptr_t*)f.interpreter_frame_monitor_begin()
188              - (intptr_t*)f.interpreter_frame_monitor_end())/BasicObjectLock::size();

189 }
190 
191 template<>
192 template<>
193 inline void StackChunkFrameStream<ChunkFrames::Mixed>::update_reg_map_pd(RegisterMap* map) {
194   // Nothing to do (no non-volatile registers in java calling convention)
195 }
196 
197 template<>
198 template<>
199 inline void StackChunkFrameStream<ChunkFrames::CompiledOnly>::update_reg_map_pd(RegisterMap* map) {
200   // Nothing to do (no non-volatile registers in java calling convention)
201 }
202 
203 template <ChunkFrames frame_kind>
204 template <typename RegisterMapT>
205 inline void StackChunkFrameStream<frame_kind>::update_reg_map_pd(RegisterMapT* map) {}
206 
207 #endif // CPU_PPC_STACKCHUNKFRAMESTREAM_PPC_INLINE_HPP

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<>
200 inline void StackChunkFrameStream<ChunkFrames::CompiledOnly>::update_reg_map_pd(RegisterMap* map) {
201   // Nothing to do (no non-volatile registers in java calling convention)
202 }
203 
204 template <ChunkFrames frame_kind>
205 template <typename RegisterMapT>
206 inline void StackChunkFrameStream<frame_kind>::update_reg_map_pd(RegisterMapT* map) {}
207 
208 #endif // CPU_PPC_STACKCHUNKFRAMESTREAM_PPC_INLINE_HPP
< prev index next >