8046611: Build errors with gcc on sparc/fastdebug

Thu, 17 Dec 2015 17:18:59 -0800

author
gthornbr
date
Thu, 17 Dec 2015 17:18:59 -0800
changeset 8199
5d96c022391c
parent 8198
6fb4d6e02e92
child 8200
bd33e3fce750

8046611: Build errors with gcc on sparc/fastdebug
Reviewed-by: dcubed, mikael

src/cpu/sparc/vm/frame_sparc.cpp file | annotate | diff | comparison | revisions
src/share/vm/runtime/safepoint.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/cpu/sparc/vm/frame_sparc.cpp	Thu Dec 17 17:17:31 2015 -0800
     1.2 +++ b/src/cpu/sparc/vm/frame_sparc.cpp	Thu Dec 17 17:18:59 2015 -0800
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2013, 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 @@ -447,32 +447,6 @@
    1.11  }
    1.12  #endif // CC_INTERP
    1.13  
    1.14 -
    1.15 -#ifdef ASSERT
    1.16 -// Debugging aid
    1.17 -static frame nth_sender(int n) {
    1.18 -  frame f = JavaThread::current()->last_frame();
    1.19 -
    1.20 -  for(int i = 0; i < n; ++i)
    1.21 -    f = f.sender((RegisterMap*)NULL);
    1.22 -
    1.23 -  printf("first frame %d\n",          f.is_first_frame()       ? 1 : 0);
    1.24 -  printf("interpreted frame %d\n",    f.is_interpreted_frame() ? 1 : 0);
    1.25 -  printf("java frame %d\n",           f.is_java_frame()        ? 1 : 0);
    1.26 -  printf("entry frame %d\n",          f.is_entry_frame()       ? 1 : 0);
    1.27 -  printf("native frame %d\n",         f.is_native_frame()      ? 1 : 0);
    1.28 -  if (f.is_compiled_frame()) {
    1.29 -    if (f.is_deoptimized_frame())
    1.30 -      printf("deoptimized frame 1\n");
    1.31 -    else
    1.32 -      printf("compiled frame 1\n");
    1.33 -  }
    1.34 -
    1.35 -  return f;
    1.36 -}
    1.37 -#endif
    1.38 -
    1.39 -
    1.40  frame frame::sender_for_entry_frame(RegisterMap *map) const {
    1.41    assert(map != NULL, "map must be set");
    1.42    // Java frame called from C; skip all C frames and return top C
     2.1 --- a/src/share/vm/runtime/safepoint.cpp	Thu Dec 17 17:17:31 2015 -0800
     2.2 +++ b/src/share/vm/runtime/safepoint.cpp	Thu Dec 17 17:18:59 2015 -0800
     2.3 @@ -1,5 +1,5 @@
     2.4  /*
     2.5 - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     2.6 + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
     2.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     2.8   *
     2.9   * This code is free software; you can redistribute it and/or modify it
    2.10 @@ -739,80 +739,12 @@
    2.11  // ------------------------------------------------------------------------------------------------------
    2.12  // Exception handlers
    2.13  
    2.14 -#ifndef PRODUCT
    2.15 -
    2.16 -#ifdef SPARC
    2.17 -
    2.18 -#ifdef _LP64
    2.19 -#define PTR_PAD ""
    2.20 -#else
    2.21 -#define PTR_PAD "        "
    2.22 -#endif
    2.23 -
    2.24 -static void print_ptrs(intptr_t oldptr, intptr_t newptr, bool wasoop) {
    2.25 -  bool is_oop = newptr ? (cast_to_oop(newptr))->is_oop() : false;
    2.26 -  tty->print_cr(PTR_FORMAT PTR_PAD " %s %c " PTR_FORMAT PTR_PAD " %s %s",
    2.27 -                oldptr, wasoop?"oop":"   ", oldptr == newptr ? ' ' : '!',
    2.28 -                newptr, is_oop?"oop":"   ", (wasoop && !is_oop) ? "STALE" : ((wasoop==false&&is_oop==false&&oldptr !=newptr)?"STOMP":"     "));
    2.29 -}
    2.30 -
    2.31 -static void print_longs(jlong oldptr, jlong newptr, bool wasoop) {
    2.32 -  bool is_oop = newptr ? (cast_to_oop(newptr))->is_oop() : false;
    2.33 -  tty->print_cr(PTR64_FORMAT " %s %c " PTR64_FORMAT " %s %s",
    2.34 -                oldptr, wasoop?"oop":"   ", oldptr == newptr ? ' ' : '!',
    2.35 -                newptr, is_oop?"oop":"   ", (wasoop && !is_oop) ? "STALE" : ((wasoop==false&&is_oop==false&&oldptr !=newptr)?"STOMP":"     "));
    2.36 -}
    2.37 -
    2.38 -static void print_me(intptr_t *new_sp, intptr_t *old_sp, bool *was_oops) {
    2.39 -#ifdef _LP64
    2.40 -  tty->print_cr("--------+------address-----+------before-----------+-------after----------+");
    2.41 -  const int incr = 1;           // Increment to skip a long, in units of intptr_t
    2.42 -#else
    2.43 -  tty->print_cr("--------+--address-+------before-----------+-------after----------+");
    2.44 -  const int incr = 2;           // Increment to skip a long, in units of intptr_t
    2.45 -#endif
    2.46 -  tty->print_cr("---SP---|");
    2.47 -  for( int i=0; i<16; i++ ) {
    2.48 -    tty->print("blob %c%d |"PTR_FORMAT" ","LO"[i>>3],i&7,new_sp); print_ptrs(*old_sp++,*new_sp++,*was_oops++); }
    2.49 -  tty->print_cr("--------|");
    2.50 -  for( int i1=0; i1<frame::memory_parameter_word_sp_offset-16; i1++ ) {
    2.51 -    tty->print("argv pad|"PTR_FORMAT" ",new_sp); print_ptrs(*old_sp++,*new_sp++,*was_oops++); }
    2.52 -  tty->print("     pad|"PTR_FORMAT" ",new_sp); print_ptrs(*old_sp++,*new_sp++,*was_oops++);
    2.53 -  tty->print_cr("--------|");
    2.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;
    2.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;
    2.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;
    2.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;
    2.58 -  tty->print_cr(" FSR    |"PTR_FORMAT" "PTR64_FORMAT"       "PTR64_FORMAT,new_sp,*(jlong*)old_sp,*(jlong*)new_sp);
    2.59 -  old_sp += incr; new_sp += incr; was_oops += incr;
    2.60 -  // Skip the floats
    2.61 -  tty->print_cr("--Float-|"PTR_FORMAT,new_sp);
    2.62 -  tty->print_cr("---FP---|");
    2.63 -  old_sp += incr*32;  new_sp += incr*32;  was_oops += incr*32;
    2.64 -  for( int i2=0; i2<16; i2++ ) {
    2.65 -    tty->print("call %c%d |"PTR_FORMAT" ","LI"[i2>>3],i2&7,new_sp); print_ptrs(*old_sp++,*new_sp++,*was_oops++); }
    2.66 -  tty->cr();
    2.67 -}
    2.68 -#endif  // SPARC
    2.69 -#endif  // PRODUCT
    2.70 -
    2.71  
    2.72  void SafepointSynchronize::handle_polling_page_exception(JavaThread *thread) {
    2.73    assert(thread->is_Java_thread(), "polling reference encountered by VM thread");
    2.74    assert(thread->thread_state() == _thread_in_Java, "should come from Java code");
    2.75    assert(SafepointSynchronize::is_synchronizing(), "polling encountered outside safepoint synchronization");
    2.76  
    2.77 -  // Uncomment this to get some serious before/after printing of the
    2.78 -  // Sparc safepoint-blob frame structure.
    2.79 -  /*
    2.80 -  intptr_t* sp = thread->last_Java_sp();
    2.81 -  intptr_t stack_copy[150];
    2.82 -  for( int i=0; i<150; i++ ) stack_copy[i] = sp[i];
    2.83 -  bool was_oops[150];
    2.84 -  for( int i=0; i<150; i++ )
    2.85 -    was_oops[i] = stack_copy[i] ? ((oop)stack_copy[i])->is_oop() : false;
    2.86 -  */
    2.87 -
    2.88    if (ShowSafepointMsgs) {
    2.89      tty->print("handle_polling_page_exception: ");
    2.90    }
    2.91 @@ -824,7 +756,6 @@
    2.92    ThreadSafepointState* state = thread->safepoint_state();
    2.93  
    2.94    state->handle_polling_page_exception();
    2.95 -  // print_me(sp,stack_copy,was_oops);
    2.96  }
    2.97  
    2.98  

mercurial