< prev index next >

src/hotspot/share/interpreter/bytecodeTracer.cpp

Print this page
*** 21,10 ***
--- 21,11 ---
   * questions.
   *
   */
  
  #include "precompiled.hpp"
+ #include "cds/heapShared.hpp"
  #include "classfile/classPrinter.hpp"
  #include "classfile/javaClasses.inline.hpp"
  #include "interpreter/bytecodeHistogram.hpp"
  #include "interpreter/bytecodeStream.hpp"
  #include "interpreter/bytecodeTracer.hpp"

*** 120,14 ***
      }
      _code = code;
       int bci = (int)(bcp - method->code_base());
      st->print("[%ld] ", (long) Thread::current()->osthread()->thread_id());
      if (Verbose) {
!       st->print("%8d  %4d  " INTPTR_FORMAT " " INTPTR_FORMAT " %s",
             BytecodeCounter::counter_value(), bci, tos, tos2, Bytecodes::name(code));
      } else {
!       st->print("%8d  %4d  %s",
             BytecodeCounter::counter_value(), bci, Bytecodes::name(code));
      }
      _next_pc = is_wide() ? bcp+2 : bcp+1;
      print_attributes(bci, st);
      // Set is_wide for the next one, since the caller of this doesn't skip
--- 121,14 ---
      }
      _code = code;
       int bci = (int)(bcp - method->code_base());
      st->print("[%ld] ", (long) Thread::current()->osthread()->thread_id());
      if (Verbose) {
!       st->print("%8ld  %4d  " INTPTR_FORMAT " " INTPTR_FORMAT " %s",
             BytecodeCounter::counter_value(), bci, tos, tos2, Bytecodes::name(code));
      } else {
!       st->print("%8ld  %4d  %s",
             BytecodeCounter::counter_value(), bci, Bytecodes::name(code));
      }
      _next_pc = is_wide() ? bcp+2 : bcp+1;
      print_attributes(bci, st);
      // Set is_wide for the next one, since the caller of this doesn't skip

*** 165,11 ***
      } else {
        st->print("%4d %s", bci, Bytecodes::name(code));
      }
      _next_pc = is_wide() ? bcp+2 : bcp+1;
      print_attributes(bci, st);
!     bytecode_epilog(bci, st);
    }
  };
  
  // We need a global instance to keep track of the states when the bytecodes
  // are executed. Access by multiple threads are controlled by ttyLocker.
--- 166,13 ---
      } else {
        st->print("%4d %s", bci, Bytecodes::name(code));
      }
      _next_pc = is_wide() ? bcp+2 : bcp+1;
      print_attributes(bci, st);
!     if (ClassPrinter::has_mode(_flags, ClassPrinter::PRINT_PROFILE)) {
+       bytecode_epilog(bci, st);
+     }
    }
  };
  
  // We need a global instance to keep track of the states when the bytecodes
  // are executed. Access by multiple threads are controlled by ttyLocker.

*** 292,10 ***
--- 295,16 ---
  
      if (is_linked()) {
        ResolvedIndyEntry* indy_entry = constants()->resolved_indy_entry_at(indy_index);
        st->print("  ResolvedIndyEntry: ");
        indy_entry->print_on(st);
+       if (indy_entry->has_appendix()) {
+         oop apx = constants()->resolved_reference_from_indy(indy_index);
+         //FIXME: lock out of order with runtime/interpreter/BytecodeTracerTest.java
+         //int perm_index = HeapShared::get_archived_object_permanent_index(apx);
+         st->print_cr(" - appendix = " INTPTR_FORMAT, p2i(apx));
+       }
      }
    }
  }
  
  // cp_index: must be the cp_index of a JVM_CONSTANT_{Dynamic, DynamicInError, InvokeDynamic}
< prev index next >