< prev index next >

src/hotspot/cpu/x86/interp_masm_x86.cpp

Print this page

  39 #include "runtime/safepointMechanism.hpp"
  40 #include "runtime/sharedRuntime.hpp"
  41 #include "runtime/thread.inline.hpp"
  42 #include "utilities/powerOfTwo.hpp"
  43 
  44 // Implementation of InterpreterMacroAssembler
  45 
  46 void InterpreterMacroAssembler::jump_to_entry(address entry) {
  47   assert(entry, "Entry must have been generated by now");
  48   jump(RuntimeAddress(entry));
  49 }
  50 
  51 void InterpreterMacroAssembler::profile_obj_type(Register obj, const Address& mdo_addr) {
  52   Label update, next, none;
  53 
  54   interp_verify_oop(obj, atos);
  55 
  56   testptr(obj, obj);
  57   jccb(Assembler::notZero, update);
  58   orptr(mdo_addr, TypeEntries::null_seen);
  59   jmpb(next);
  60 
  61   bind(update);
  62   Register tmp_load_klass = LP64_ONLY(rscratch1) NOT_LP64(noreg);
  63   load_klass(obj, obj, tmp_load_klass);
  64 
  65   xorptr(obj, mdo_addr);
  66   testptr(obj, TypeEntries::type_klass_mask);
  67   jccb(Assembler::zero, next); // klass seen before, nothing to
  68                                // do. The unknown bit may have been
  69                                // set already but no need to check.
  70 
  71   testptr(obj, TypeEntries::type_unknown);
  72   jccb(Assembler::notZero, next); // already unknown. Nothing to do anymore.
  73 
  74   cmpptr(mdo_addr, 0);
  75   jccb(Assembler::equal, none);
  76   cmpptr(mdo_addr, TypeEntries::null_seen);
  77   jccb(Assembler::equal, none);
  78   // There is a chance that the checks above (re-reading profiling
  79   // data from memory) fail if another thread has just set the

  39 #include "runtime/safepointMechanism.hpp"
  40 #include "runtime/sharedRuntime.hpp"
  41 #include "runtime/thread.inline.hpp"
  42 #include "utilities/powerOfTwo.hpp"
  43 
  44 // Implementation of InterpreterMacroAssembler
  45 
  46 void InterpreterMacroAssembler::jump_to_entry(address entry) {
  47   assert(entry, "Entry must have been generated by now");
  48   jump(RuntimeAddress(entry));
  49 }
  50 
  51 void InterpreterMacroAssembler::profile_obj_type(Register obj, const Address& mdo_addr) {
  52   Label update, next, none;
  53 
  54   interp_verify_oop(obj, atos);
  55 
  56   testptr(obj, obj);
  57   jccb(Assembler::notZero, update);
  58   orptr(mdo_addr, TypeEntries::null_seen);
  59   jmp(next);
  60 
  61   bind(update);
  62   Register tmp_load_klass = LP64_ONLY(rscratch1) NOT_LP64(noreg);
  63   load_klass(obj, obj, tmp_load_klass);
  64 
  65   xorptr(obj, mdo_addr);
  66   testptr(obj, TypeEntries::type_klass_mask);
  67   jccb(Assembler::zero, next); // klass seen before, nothing to
  68                                // do. The unknown bit may have been
  69                                // set already but no need to check.
  70 
  71   testptr(obj, TypeEntries::type_unknown);
  72   jccb(Assembler::notZero, next); // already unknown. Nothing to do anymore.
  73 
  74   cmpptr(mdo_addr, 0);
  75   jccb(Assembler::equal, none);
  76   cmpptr(mdo_addr, TypeEntries::null_seen);
  77   jccb(Assembler::equal, none);
  78   // There is a chance that the checks above (re-reading profiling
  79   // data from memory) fail if another thread has just set the
< prev index next >