< prev index next >

src/hotspot/cpu/zero/frame_zero.cpp

Print this page

377                    fieldbuf, buflen);
378 }
379 
380 void ZeroFrame::identify_vp_word(int       frame_index,
381                                  intptr_t* addr,
382                                  intptr_t* monitor_base,
383                                  intptr_t* stack_base,
384                                  char*     fieldbuf,
385                                  int       buflen) const {
386   // Monitors
387   if (addr >= stack_base && addr < monitor_base) {
388     int monitor_size = frame::interpreter_frame_monitor_size();
389     int last_index = (monitor_base - stack_base) / monitor_size - 1;
390     int index = last_index - (addr - stack_base) / monitor_size;
391     intptr_t monitor = (intptr_t) (
392       (BasicObjectLock *) monitor_base - 1 - index);
393     intptr_t offset = (intptr_t) addr - monitor;
394 
395     if (offset == BasicObjectLock::obj_offset_in_bytes())
396       snprintf(fieldbuf, buflen, "monitor[%d]->_obj", index);
397     else if (offset ==  BasicObjectLock::lock_offset_in_bytes())
398       snprintf(fieldbuf, buflen, "monitor[%d]->_lock", index);
399 
400     return;
401   }
402 
403   // Expression stack
404   if (addr < stack_base) {
405     snprintf(fieldbuf, buflen, "%s[%d]",
406              frame_index == 0 ? "stack_word" : "local",
407              (int) (stack_base - addr - 1));
408     return;
409   }
410 }
411 
412 #ifndef PRODUCT
413 
414 void frame::describe_pd(FrameValues& values, int frame_no) {
415 
416 }
417 
418 #endif

377                    fieldbuf, buflen);
378 }
379 
380 void ZeroFrame::identify_vp_word(int       frame_index,
381                                  intptr_t* addr,
382                                  intptr_t* monitor_base,
383                                  intptr_t* stack_base,
384                                  char*     fieldbuf,
385                                  int       buflen) const {
386   // Monitors
387   if (addr >= stack_base && addr < monitor_base) {
388     int monitor_size = frame::interpreter_frame_monitor_size();
389     int last_index = (monitor_base - stack_base) / monitor_size - 1;
390     int index = last_index - (addr - stack_base) / monitor_size;
391     intptr_t monitor = (intptr_t) (
392       (BasicObjectLock *) monitor_base - 1 - index);
393     intptr_t offset = (intptr_t) addr - monitor;
394 
395     if (offset == BasicObjectLock::obj_offset_in_bytes())
396       snprintf(fieldbuf, buflen, "monitor[%d]->_obj", index);


397 
398     return;
399   }
400 
401   // Expression stack
402   if (addr < stack_base) {
403     snprintf(fieldbuf, buflen, "%s[%d]",
404              frame_index == 0 ? "stack_word" : "local",
405              (int) (stack_base - addr - 1));
406     return;
407   }
408 }
409 
410 #ifndef PRODUCT
411 
412 void frame::describe_pd(FrameValues& values, int frame_no) {
413 
414 }
415 
416 #endif
< prev index next >