< prev index next >

src/hotspot/cpu/ppc/frame_ppc.cpp

Print this page

202   // constructor retrieves the PC from the stack.
203   frame fr(jfa->last_Java_sp());
204   return fr;
205 }
206 
207 OptimizedEntryBlob::FrameData* OptimizedEntryBlob::frame_data_for_frame(const frame& frame) const {
208   ShouldNotCallThis();
209   return nullptr;
210 }
211 
212 bool frame::optimized_entry_frame_is_first() const {
213   ShouldNotCallThis();
214   return false;
215 }
216 
217 frame frame::sender_for_interpreter_frame(RegisterMap *map) const {
218   // Pass callers initial_caller_sp as unextended_sp.
219   return frame(sender_sp(), sender_pc(), (intptr_t*)get_ijava_state()->sender_sp);
220 }
221 

222 frame frame::sender_for_compiled_frame(RegisterMap *map) const {
223   assert(map != NULL, "map must be set");
224 
225   // Frame owned by compiler.
226   address pc = *compiled_sender_pc_addr(_cb);
227   frame caller(compiled_sender_sp(_cb), pc);
228 
229   // Now adjust the map.
230 
231   // Get the rest.
232   if (map->update_map()) {
233     // Tell GC to use argument oopmaps for some runtime stubs that need it.
234     map->set_include_argument_oops(_cb->caller_must_gc_arguments(map->thread()));
235     if (_cb->oop_maps() != NULL) {
236       OopMapSet::update_register_map(this, map);
237     }
238   }
239 
240   return caller;
241 }
242 
243 intptr_t* frame::compiled_sender_sp(CodeBlob* cb) const {
244   return sender_sp();
245 }
246 
247 address* frame::compiled_sender_pc_addr(CodeBlob* cb) const {
248   return sender_pc_addr();
249 }
250 
251 frame frame::sender_raw(RegisterMap* map) const {
252   // Default is we do have to follow them. The sender_for_xxx will
253   // update it accordingly.
254   map->set_include_argument_oops(false);
255 
256   if (is_entry_frame())       return sender_for_entry_frame(map);
257   if (is_interpreted_frame()) return sender_for_interpreter_frame(map);
258   assert(_cb == CodeCache::find_blob(pc()),"Must be the same");
259 
260   if (_cb != NULL) {
261     return sender_for_compiled_frame(map);
262   }
263   // Must be native-compiled frame, i.e. the marshaling code for native
264   // methods that exists in the core system.
265   return frame(sender_sp(), sender_pc());
266 }
267 
268 frame frame::sender(RegisterMap* map) const {
269   frame result = sender_raw(map);
270 
271   if (map->process_frames()) {
272     StackWatermarkSet::on_iteration(map->thread(), result);
273   }
274 
275   return result;
276 }
277 
278 void frame::patch_pc(Thread* thread, address pc) {
279   assert(_cb == CodeCache::find_blob(pc), "unexpected pc");
280   if (TracePcPatching) {
281     tty->print_cr("patch_pc at address " PTR_FORMAT " [" PTR_FORMAT " -> " PTR_FORMAT "]",

357 void frame::describe_pd(FrameValues& values, int frame_no) {
358   if (is_interpreted_frame()) {
359 #define DESCRIBE_ADDRESS(name) \
360   values.describe(frame_no, (intptr_t*)&(get_ijava_state()->name), #name);
361 
362       DESCRIBE_ADDRESS(method);
363       DESCRIBE_ADDRESS(mirror);
364       DESCRIBE_ADDRESS(locals);
365       DESCRIBE_ADDRESS(monitors);
366       DESCRIBE_ADDRESS(cpoolCache);
367       DESCRIBE_ADDRESS(bcp);
368       DESCRIBE_ADDRESS(esp);
369       DESCRIBE_ADDRESS(mdx);
370       DESCRIBE_ADDRESS(top_frame_sp);
371       DESCRIBE_ADDRESS(sender_sp);
372       DESCRIBE_ADDRESS(oop_tmp);
373       DESCRIBE_ADDRESS(lresult);
374       DESCRIBE_ADDRESS(fresult);
375   }
376 }




377 #endif
378 
379 intptr_t *frame::initial_deoptimization_info() {
380   // unused... but returns fp() to minimize changes introduced by 7087445
381   return fp();
382 }
383 
384 #ifndef PRODUCT
385 // This is a generic constructor which is only used by pns() in debug.cpp.
386 frame::frame(void* sp, void* fp, void* pc) : _sp((intptr_t*)sp), _unextended_sp((intptr_t*)sp) {
387   find_codeblob_and_set_pc_and_deopt_state((address)pc); // also sets _fp and adjusts _unextended_sp
388 }
389 
390 #endif


















202   // constructor retrieves the PC from the stack.
203   frame fr(jfa->last_Java_sp());
204   return fr;
205 }
206 
207 OptimizedEntryBlob::FrameData* OptimizedEntryBlob::frame_data_for_frame(const frame& frame) const {
208   ShouldNotCallThis();
209   return nullptr;
210 }
211 
212 bool frame::optimized_entry_frame_is_first() const {
213   ShouldNotCallThis();
214   return false;
215 }
216 
217 frame frame::sender_for_interpreter_frame(RegisterMap *map) const {
218   // Pass callers initial_caller_sp as unextended_sp.
219   return frame(sender_sp(), sender_pc(), (intptr_t*)get_ijava_state()->sender_sp);
220 }
221 
222 template <bool stub>
223 frame frame::sender_for_compiled_frame(RegisterMap *map) const {
224   assert(map != NULL, "map must be set");
225 
226   // Frame owned by compiler.
227   address pc = *compiled_sender_pc_addr(_cb);
228   frame caller(compiled_sender_sp(_cb), pc);
229 
230   // Now adjust the map.
231 
232   // Get the rest.
233   if (map->update_map()) {
234     // Tell GC to use argument oopmaps for some runtime stubs that need it.
235     map->set_include_argument_oops(_cb->caller_must_gc_arguments(map->thread()));
236     if (_cb->oop_maps() != NULL) {
237       OopMapSet::update_register_map(this, map);
238     }
239   }
240 
241   return caller;
242 }
243 
244 intptr_t* frame::compiled_sender_sp(CodeBlob* cb) const {
245   return sender_sp();
246 }
247 
248 address* frame::compiled_sender_pc_addr(CodeBlob* cb) const {
249   return sender_pc_addr();
250 }
251 
252 frame frame::sender_raw(RegisterMap* map) const {
253   // Default is we do have to follow them. The sender_for_xxx will
254   // update it accordingly.
255   map->set_include_argument_oops(false);
256 
257   if (is_entry_frame())       return sender_for_entry_frame(map);
258   if (is_interpreted_frame()) return sender_for_interpreter_frame(map);
259   assert(_cb == CodeCache::find_blob(pc()),"Must be the same");
260 
261   if (_cb != NULL) {
262     return sender_for_compiled_frame<false>(map);
263   }
264   // Must be native-compiled frame, i.e. the marshaling code for native
265   // methods that exists in the core system.
266   return frame(sender_sp(), sender_pc());
267 }
268 
269 frame frame::sender(RegisterMap* map) const {
270   frame result = sender_raw(map);
271 
272   if (map->process_frames()) {
273     StackWatermarkSet::on_iteration(map->thread(), result);
274   }
275 
276   return result;
277 }
278 
279 void frame::patch_pc(Thread* thread, address pc) {
280   assert(_cb == CodeCache::find_blob(pc), "unexpected pc");
281   if (TracePcPatching) {
282     tty->print_cr("patch_pc at address " PTR_FORMAT " [" PTR_FORMAT " -> " PTR_FORMAT "]",

358 void frame::describe_pd(FrameValues& values, int frame_no) {
359   if (is_interpreted_frame()) {
360 #define DESCRIBE_ADDRESS(name) \
361   values.describe(frame_no, (intptr_t*)&(get_ijava_state()->name), #name);
362 
363       DESCRIBE_ADDRESS(method);
364       DESCRIBE_ADDRESS(mirror);
365       DESCRIBE_ADDRESS(locals);
366       DESCRIBE_ADDRESS(monitors);
367       DESCRIBE_ADDRESS(cpoolCache);
368       DESCRIBE_ADDRESS(bcp);
369       DESCRIBE_ADDRESS(esp);
370       DESCRIBE_ADDRESS(mdx);
371       DESCRIBE_ADDRESS(top_frame_sp);
372       DESCRIBE_ADDRESS(sender_sp);
373       DESCRIBE_ADDRESS(oop_tmp);
374       DESCRIBE_ADDRESS(lresult);
375       DESCRIBE_ADDRESS(fresult);
376   }
377 }
378 
379 void frame::describe_top_pd(FrameValues& values) {
380   Unimplemented();
381 }
382 #endif
383 
384 intptr_t *frame::initial_deoptimization_info() {
385   // unused... but returns fp() to minimize changes introduced by 7087445
386   return fp();
387 }
388 
389 #ifndef PRODUCT
390 // This is a generic constructor which is only used by pns() in debug.cpp.
391 frame::frame(void* sp, void* fp, void* pc) : _sp((intptr_t*)sp), _unextended_sp((intptr_t*)sp) {
392   find_codeblob_and_set_pc_and_deopt_state((address)pc); // also sets _fp and adjusts _unextended_sp
393 }
394 
395 #endif
396 
397 // Pointer beyond the "oldest/deepest" BasicObjectLock on stack.
398 template BasicObjectLock* frame::interpreter_frame_monitor_end<true>() const;
399 template BasicObjectLock* frame::interpreter_frame_monitor_end<false>() const;
400 
401 template <bool relative>
402 inline BasicObjectLock* frame::interpreter_frame_monitor_end() const {
403   return (BasicObjectLock*) get_ijava_state()->monitors;
404 }
405 
406 template intptr_t* frame::interpreter_frame_tos_at<false>(jint offset) const;
407 template intptr_t* frame::interpreter_frame_tos_at<true >(jint offset) const;
408 
409 template <bool relative>
410 inline intptr_t* frame::interpreter_frame_tos_at(jint offset) const {
411   return &interpreter_frame_tos_address()[offset];
412 }
< prev index next >