src/share/vm/runtime/safepoint.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File warning2 Sdiff src/share/vm/runtime

src/share/vm/runtime/safepoint.cpp

Print this page
rev 3821 : [mq]: unused


 728   // be delivered. (Polling at a return point is ok though). Sure is
 729   // a lot of bother for a deprecated feature...
 730   //
 731   // We don't deliver an async exception if the thread state is
 732   // _thread_in_native_trans so JNI functions won't be called with
 733   // a surprising pending exception. If the thread state is going back to java,
 734   // async exception is checked in check_special_condition_for_native_trans().
 735 
 736   if (state != _thread_blocked_trans &&
 737       state != _thread_in_vm_trans &&
 738       thread->has_special_runtime_exit_condition()) {
 739     thread->handle_special_runtime_exit_condition(
 740       !thread->is_at_poll_safepoint() && (state != _thread_in_native_trans));
 741   }
 742 }
 743 
 744 // ------------------------------------------------------------------------------------------------------
 745 // Exception handlers
 746 
 747 #ifndef PRODUCT



 748 #ifdef _LP64
 749 #define PTR_PAD ""
 750 #else
 751 #define PTR_PAD "        "
 752 #endif
 753 
 754 static void print_ptrs(intptr_t oldptr, intptr_t newptr, bool wasoop) {
 755   bool is_oop = newptr ? ((oop)newptr)->is_oop() : false;
 756   tty->print_cr(PTR_FORMAT PTR_PAD " %s %c " PTR_FORMAT PTR_PAD " %s %s",
 757                 oldptr, wasoop?"oop":"   ", oldptr == newptr ? ' ' : '!',
 758                 newptr, is_oop?"oop":"   ", (wasoop && !is_oop) ? "STALE" : ((wasoop==false&&is_oop==false&&oldptr !=newptr)?"STOMP":"     "));
 759 }
 760 
 761 static void print_longs(jlong oldptr, jlong newptr, bool wasoop) {
 762   bool is_oop = newptr ? ((oop)(intptr_t)newptr)->is_oop() : false;
 763   tty->print_cr(PTR64_FORMAT " %s %c " PTR64_FORMAT " %s %s",
 764                 oldptr, wasoop?"oop":"   ", oldptr == newptr ? ' ' : '!',
 765                 newptr, is_oop?"oop":"   ", (wasoop && !is_oop) ? "STALE" : ((wasoop==false&&is_oop==false&&oldptr !=newptr)?"STOMP":"     "));
 766 }
 767 
 768 #ifdef SPARC
 769 static void print_me(intptr_t *new_sp, intptr_t *old_sp, bool *was_oops) {
 770 #ifdef _LP64
 771   tty->print_cr("--------+------address-----+------before-----------+-------after----------+");
 772   const int incr = 1;           // Increment to skip a long, in units of intptr_t
 773 #else
 774   tty->print_cr("--------+--address-+------before-----------+-------after----------+");
 775   const int incr = 2;           // Increment to skip a long, in units of intptr_t
 776 #endif
 777   tty->print_cr("---SP---|");
 778   for( int i=0; i<16; i++ ) {
 779     tty->print("blob %c%d |"PTR_FORMAT" ","LO"[i>>3],i&7,new_sp); print_ptrs(*old_sp++,*new_sp++,*was_oops++); }
 780   tty->print_cr("--------|");
 781   for( int i1=0; i1<frame::memory_parameter_word_sp_offset-16; i1++ ) {
 782     tty->print("argv pad|"PTR_FORMAT" ",new_sp); print_ptrs(*old_sp++,*new_sp++,*was_oops++); }
 783   tty->print("     pad|"PTR_FORMAT" ",new_sp); print_ptrs(*old_sp++,*new_sp++,*was_oops++);
 784   tty->print_cr("--------|");
 785   tty->print(" G1     |"PTR_FORMAT" ",new_sp); print_longs(*(jlong*)old_sp,*(jlong*)new_sp,was_oops[incr-1]); old_sp += incr; new_sp += incr; was_oops += incr;
 786   tty->print(" G3     |"PTR_FORMAT" ",new_sp); print_longs(*(jlong*)old_sp,*(jlong*)new_sp,was_oops[incr-1]); old_sp += incr; new_sp += incr; was_oops += incr;
 787   tty->print(" G4     |"PTR_FORMAT" ",new_sp); print_longs(*(jlong*)old_sp,*(jlong*)new_sp,was_oops[incr-1]); old_sp += incr; new_sp += incr; was_oops += incr;
 788   tty->print(" G5     |"PTR_FORMAT" ",new_sp); print_longs(*(jlong*)old_sp,*(jlong*)new_sp,was_oops[incr-1]); old_sp += incr; new_sp += incr; was_oops += incr;




 728   // be delivered. (Polling at a return point is ok though). Sure is
 729   // a lot of bother for a deprecated feature...
 730   //
 731   // We don't deliver an async exception if the thread state is
 732   // _thread_in_native_trans so JNI functions won't be called with
 733   // a surprising pending exception. If the thread state is going back to java,
 734   // async exception is checked in check_special_condition_for_native_trans().
 735 
 736   if (state != _thread_blocked_trans &&
 737       state != _thread_in_vm_trans &&
 738       thread->has_special_runtime_exit_condition()) {
 739     thread->handle_special_runtime_exit_condition(
 740       !thread->is_at_poll_safepoint() && (state != _thread_in_native_trans));
 741   }
 742 }
 743 
 744 // ------------------------------------------------------------------------------------------------------
 745 // Exception handlers
 746 
 747 #ifndef PRODUCT
 748 
 749 #ifdef SPARC
 750 
 751 #ifdef _LP64
 752 #define PTR_PAD ""
 753 #else
 754 #define PTR_PAD "        "
 755 #endif
 756 
 757 static void print_ptrs(intptr_t oldptr, intptr_t newptr, bool wasoop) {
 758   bool is_oop = newptr ? ((oop)newptr)->is_oop() : false;
 759   tty->print_cr(PTR_FORMAT PTR_PAD " %s %c " PTR_FORMAT PTR_PAD " %s %s",
 760                 oldptr, wasoop?"oop":"   ", oldptr == newptr ? ' ' : '!',
 761                 newptr, is_oop?"oop":"   ", (wasoop && !is_oop) ? "STALE" : ((wasoop==false&&is_oop==false&&oldptr !=newptr)?"STOMP":"     "));
 762 }
 763 
 764 static void print_longs(jlong oldptr, jlong newptr, bool wasoop) {
 765   bool is_oop = newptr ? ((oop)(intptr_t)newptr)->is_oop() : false;
 766   tty->print_cr(PTR64_FORMAT " %s %c " PTR64_FORMAT " %s %s",
 767                 oldptr, wasoop?"oop":"   ", oldptr == newptr ? ' ' : '!',
 768                 newptr, is_oop?"oop":"   ", (wasoop && !is_oop) ? "STALE" : ((wasoop==false&&is_oop==false&&oldptr !=newptr)?"STOMP":"     "));
 769 }
 770 

 771 static void print_me(intptr_t *new_sp, intptr_t *old_sp, bool *was_oops) {
 772 #ifdef _LP64
 773   tty->print_cr("--------+------address-----+------before-----------+-------after----------+");
 774   const int incr = 1;           // Increment to skip a long, in units of intptr_t
 775 #else
 776   tty->print_cr("--------+--address-+------before-----------+-------after----------+");
 777   const int incr = 2;           // Increment to skip a long, in units of intptr_t
 778 #endif
 779   tty->print_cr("---SP---|");
 780   for( int i=0; i<16; i++ ) {
 781     tty->print("blob %c%d |"PTR_FORMAT" ","LO"[i>>3],i&7,new_sp); print_ptrs(*old_sp++,*new_sp++,*was_oops++); }
 782   tty->print_cr("--------|");
 783   for( int i1=0; i1<frame::memory_parameter_word_sp_offset-16; i1++ ) {
 784     tty->print("argv pad|"PTR_FORMAT" ",new_sp); print_ptrs(*old_sp++,*new_sp++,*was_oops++); }
 785   tty->print("     pad|"PTR_FORMAT" ",new_sp); print_ptrs(*old_sp++,*new_sp++,*was_oops++);
 786   tty->print_cr("--------|");
 787   tty->print(" G1     |"PTR_FORMAT" ",new_sp); print_longs(*(jlong*)old_sp,*(jlong*)new_sp,was_oops[incr-1]); old_sp += incr; new_sp += incr; was_oops += incr;
 788   tty->print(" G3     |"PTR_FORMAT" ",new_sp); print_longs(*(jlong*)old_sp,*(jlong*)new_sp,was_oops[incr-1]); old_sp += incr; new_sp += incr; was_oops += incr;
 789   tty->print(" G4     |"PTR_FORMAT" ",new_sp); print_longs(*(jlong*)old_sp,*(jlong*)new_sp,was_oops[incr-1]); old_sp += incr; new_sp += incr; was_oops += incr;
 790   tty->print(" G5     |"PTR_FORMAT" ",new_sp); print_longs(*(jlong*)old_sp,*(jlong*)new_sp,was_oops[incr-1]); old_sp += incr; new_sp += incr; was_oops += incr;


src/share/vm/runtime/safepoint.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File