コード例 #1
0
 void set_exception_points(address npe_addr, address ame_addr) {
   _npe_offset = npe_addr - code_begin();
   _ame_offset = ame_addr - code_begin();
   assert(is_abstract_method_error(ame_addr),   "offset must be correct");
   assert(is_null_pointer_exception(npe_addr),  "offset must be correct");
   assert(!is_abstract_method_error(npe_addr),  "offset must be correct");
   assert(!is_null_pointer_exception(ame_addr), "offset must be correct");
 }
コード例 #2
0
ファイル: interpreter.cpp プロジェクト: BaHbKaTX/openjdk
void InterpreterCodelet::print_on(outputStream* st) const {
  if (PrintInterpreter) {
    st->cr();
    st->print_cr("----------------------------------------------------------------------");
  }

  if (description() != NULL) st->print("%s  ", description());
  if (bytecode()    >= 0   ) st->print("%d %s  ", bytecode(), Bytecodes::name(bytecode()));
  st->print_cr("[" INTPTR_FORMAT ", " INTPTR_FORMAT "]  %d bytes",
                code_begin(), code_end(), code_size());

  if (PrintInterpreter) {
    st->cr();
    Disassembler::decode(code_begin(), code_end(), st);
  }
}
コード例 #3
0
ファイル: interpreter.cpp プロジェクト: shelan/jdk9-mirror
void InterpreterCodelet::print_on(outputStream* st) const {
  ttyLocker ttyl;

  if (PrintInterpreter) {
    st->cr();
    st->print_cr("----------------------------------------------------------------------");
  }

  if (description() != NULL) st->print("%s  ", description());
  if (bytecode()    >= 0   ) st->print("%d %s  ", bytecode(), Bytecodes::name(bytecode()));
  st->print_cr("[" INTPTR_FORMAT ", " INTPTR_FORMAT "]  %d bytes",
                p2i(code_begin()), p2i(code_end()), code_size());

  if (PrintInterpreter) {
    st->cr();
    Disassembler::decode(code_begin(), code_end(), st, DEBUG_ONLY(_strings) NOT_DEBUG(CodeStrings()));
  }
}
コード例 #4
0
void ICStub::set_stub(CompiledIC *ic, void* cached_val, address dest_addr) {
  // We cannot store a pointer to the 'ic' object, since it is resource allocated. Instead we
  // store the location of the inline cache. Then we have enough information recreate the CompiledIC
  // object when we need to remove the stub.
  _ic_site = ic->instruction_address();

  // Assemble new stub
  InlineCacheBuffer::assemble_ic_buffer_code(code_begin(), cached_val, dest_addr);
  assert(destination() == dest_addr,   "can recover destination");
  assert(cached_value() == cached_val, "can recover destination");
}
コード例 #5
0
 // Interpreter-specific attributes
 int         code_size() const                  { return code_end() - code_begin(); }
コード例 #6
0
inline address ThreadCodeBuffer::capture_pc(address pc) {
  assert(captures(pc), "pc must point into original code for codebuffer") 
  pc = code_begin() + (pc - real_pc());
  assert(contains(pc), "result must be in codebuffer");
  return pc;
}
コード例 #7
0
inline address ThreadCodeBuffer::compute_adjusted_pc(address pc) {
  assert(contains(pc), "pc must point into codebuffer") 
  pc = real_pc() + (pc - code_begin());
  assert(method()->contains(pc), "result must be in nmethod");      
  return pc;
}
コード例 #8
0
 bool	    contains(address pc) const  { return (code_begin() <= pc && pc < code_end()); }
コード例 #9
0
 bool in_code(address pc) const      { return code_begin() <= pc && pc <= code_end(); }
コード例 #10
0
void* ICStub::cached_value() const {
  return InlineCacheBuffer::ic_buffer_cached_value(code_begin());
}
コード例 #11
0
 address entry_point() const                    { return code_begin(); }
コード例 #12
0
 address code_end() const                       { return code_begin() + pd_code_size_limit(_is_vtable_stub); }
コード例 #13
0
ファイル: codeBlob.cpp プロジェクト: netroby/jdk9-dev
const ImmutableOopMap* CodeBlob::oop_map_for_return_address(address return_address) {
  assert(_oop_maps != NULL, "nope");
  return _oop_maps->find_map_at_offset((intptr_t) return_address - (intptr_t) code_begin());
}
コード例 #14
0
ファイル: icBuffer.cpp プロジェクト: guanxiaohua/TransGC
oop ICStub::cached_oop() const {
  return InlineCacheBuffer::ic_buffer_cached_oop(code_begin());
}
コード例 #15
0
void VtableStub::print() {
  tty->print("vtable stub (index = %d, receiver_location = %d, code = [" INTPTR_FORMAT ", " INTPTR_FORMAT "[)",
	     index(), receiver_location(), code_begin(), code_end());
}
コード例 #16
0
ファイル: vtableStubs.cpp プロジェクト: BaHbKaTX/openjdk
void VtableStub::print_on(outputStream* st) const {
  st->print("vtable stub (index = %d, receiver_location = %d, code = [" INTPTR_FORMAT ", " INTPTR_FORMAT "[)",
             index(), receiver_location(), code_begin(), code_end());
}
コード例 #17
0
address ICStub::destination() const {
  return InlineCacheBuffer::ic_buffer_entry_point(code_begin());
}
コード例 #18
0
 bool is_abstract_method_error(address epc)     { return epc == code_begin()+_ame_offset; }
コード例 #19
0
 bool is_null_pointer_exception(address epc)    { return epc == code_begin()+_npe_offset; }
コード例 #20
0
// returns true if successful, false otherwise
bool ThreadCodeBuffer::reposition_and_resume_thread(JavaThread* thread, ExtendedPC addr) {
  return os::set_thread_pc_and_resume(thread, addr, addr.adjust(method()->instructions_begin(), method()->instructions_end(), code_begin()));
}