1.1 --- a/src/share/vm/runtime/safepoint.cpp Thu Dec 17 17:17:31 2015 -0800 1.2 +++ b/src/share/vm/runtime/safepoint.cpp Thu Dec 17 17:18:59 2015 -0800 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -739,80 +739,12 @@ 1.11 // ------------------------------------------------------------------------------------------------------ 1.12 // Exception handlers 1.13 1.14 -#ifndef PRODUCT 1.15 - 1.16 -#ifdef SPARC 1.17 - 1.18 -#ifdef _LP64 1.19 -#define PTR_PAD "" 1.20 -#else 1.21 -#define PTR_PAD " " 1.22 -#endif 1.23 - 1.24 -static void print_ptrs(intptr_t oldptr, intptr_t newptr, bool wasoop) { 1.25 - bool is_oop = newptr ? (cast_to_oop(newptr))->is_oop() : false; 1.26 - tty->print_cr(PTR_FORMAT PTR_PAD " %s %c " PTR_FORMAT PTR_PAD " %s %s", 1.27 - oldptr, wasoop?"oop":" ", oldptr == newptr ? ' ' : '!', 1.28 - newptr, is_oop?"oop":" ", (wasoop && !is_oop) ? "STALE" : ((wasoop==false&&is_oop==false&&oldptr !=newptr)?"STOMP":" ")); 1.29 -} 1.30 - 1.31 -static void print_longs(jlong oldptr, jlong newptr, bool wasoop) { 1.32 - bool is_oop = newptr ? (cast_to_oop(newptr))->is_oop() : false; 1.33 - tty->print_cr(PTR64_FORMAT " %s %c " PTR64_FORMAT " %s %s", 1.34 - oldptr, wasoop?"oop":" ", oldptr == newptr ? ' ' : '!', 1.35 - newptr, is_oop?"oop":" ", (wasoop && !is_oop) ? "STALE" : ((wasoop==false&&is_oop==false&&oldptr !=newptr)?"STOMP":" ")); 1.36 -} 1.37 - 1.38 -static void print_me(intptr_t *new_sp, intptr_t *old_sp, bool *was_oops) { 1.39 -#ifdef _LP64 1.40 - tty->print_cr("--------+------address-----+------before-----------+-------after----------+"); 1.41 - const int incr = 1; // Increment to skip a long, in units of intptr_t 1.42 -#else 1.43 - tty->print_cr("--------+--address-+------before-----------+-------after----------+"); 1.44 - const int incr = 2; // Increment to skip a long, in units of intptr_t 1.45 -#endif 1.46 - tty->print_cr("---SP---|"); 1.47 - for( int i=0; i<16; i++ ) { 1.48 - tty->print("blob %c%d |"PTR_FORMAT" ","LO"[i>>3],i&7,new_sp); print_ptrs(*old_sp++,*new_sp++,*was_oops++); } 1.49 - tty->print_cr("--------|"); 1.50 - for( int i1=0; i1<frame::memory_parameter_word_sp_offset-16; i1++ ) { 1.51 - tty->print("argv pad|"PTR_FORMAT" ",new_sp); print_ptrs(*old_sp++,*new_sp++,*was_oops++); } 1.52 - tty->print(" pad|"PTR_FORMAT" ",new_sp); print_ptrs(*old_sp++,*new_sp++,*was_oops++); 1.53 - tty->print_cr("--------|"); 1.54 - 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; 1.55 - 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; 1.56 - 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; 1.57 - 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; 1.58 - tty->print_cr(" FSR |"PTR_FORMAT" "PTR64_FORMAT" "PTR64_FORMAT,new_sp,*(jlong*)old_sp,*(jlong*)new_sp); 1.59 - old_sp += incr; new_sp += incr; was_oops += incr; 1.60 - // Skip the floats 1.61 - tty->print_cr("--Float-|"PTR_FORMAT,new_sp); 1.62 - tty->print_cr("---FP---|"); 1.63 - old_sp += incr*32; new_sp += incr*32; was_oops += incr*32; 1.64 - for( int i2=0; i2<16; i2++ ) { 1.65 - tty->print("call %c%d |"PTR_FORMAT" ","LI"[i2>>3],i2&7,new_sp); print_ptrs(*old_sp++,*new_sp++,*was_oops++); } 1.66 - tty->cr(); 1.67 -} 1.68 -#endif // SPARC 1.69 -#endif // PRODUCT 1.70 - 1.71 1.72 void SafepointSynchronize::handle_polling_page_exception(JavaThread *thread) { 1.73 assert(thread->is_Java_thread(), "polling reference encountered by VM thread"); 1.74 assert(thread->thread_state() == _thread_in_Java, "should come from Java code"); 1.75 assert(SafepointSynchronize::is_synchronizing(), "polling encountered outside safepoint synchronization"); 1.76 1.77 - // Uncomment this to get some serious before/after printing of the 1.78 - // Sparc safepoint-blob frame structure. 1.79 - /* 1.80 - intptr_t* sp = thread->last_Java_sp(); 1.81 - intptr_t stack_copy[150]; 1.82 - for( int i=0; i<150; i++ ) stack_copy[i] = sp[i]; 1.83 - bool was_oops[150]; 1.84 - for( int i=0; i<150; i++ ) 1.85 - was_oops[i] = stack_copy[i] ? ((oop)stack_copy[i])->is_oop() : false; 1.86 - */ 1.87 - 1.88 if (ShowSafepointMsgs) { 1.89 tty->print("handle_polling_page_exception: "); 1.90 } 1.91 @@ -824,7 +756,6 @@ 1.92 ThreadSafepointState* state = thread->safepoint_state(); 1.93 1.94 state->handle_polling_page_exception(); 1.95 - // print_me(sp,stack_copy,was_oops); 1.96 } 1.97 1.98