src/hotspot/share/code/compiledMethod.cpp
changeset 52410 9d3abb1b7b1f
parent 52405 c0c6cdea32f1
child 52453 6e99148dbf33
equal deleted inserted replaced
52409:87bc444ca642 52410:9d3abb1b7b1f
   291 address CompiledMethod::oops_reloc_begin() const {
   291 address CompiledMethod::oops_reloc_begin() const {
   292   // If the method is not entrant or zombie then a JMP is plastered over the
   292   // If the method is not entrant or zombie then a JMP is plastered over the
   293   // first few bytes.  If an oop in the old code was there, that oop
   293   // first few bytes.  If an oop in the old code was there, that oop
   294   // should not get GC'd.  Skip the first few bytes of oops on
   294   // should not get GC'd.  Skip the first few bytes of oops on
   295   // not-entrant methods.
   295   // not-entrant methods.
       
   296   if (frame_complete_offset() != CodeOffsets::frame_never_safe &&
       
   297       code_begin() + frame_complete_offset() >
       
   298       verified_entry_point() + NativeJump::instruction_size)
       
   299   {
       
   300     // If we have a frame_complete_offset after the native jump, then there
       
   301     // is no point trying to look for oops before that. This is a requirement
       
   302     // for being allowed to scan oops concurrently.
       
   303     return code_begin() + frame_complete_offset();
       
   304   }
       
   305 
       
   306   // It is not safe to read oops concurrently using entry barriers, if their
       
   307   // location depend on whether the nmethod is entrant or not.
       
   308   assert(BarrierSet::barrier_set()->barrier_set_nmethod() == NULL, "Not safe oop scan");
       
   309 
   296   address low_boundary = verified_entry_point();
   310   address low_boundary = verified_entry_point();
   297   if (!is_in_use() && is_nmethod()) {
   311   if (!is_in_use() && is_nmethod()) {
   298     low_boundary += NativeJump::instruction_size;
   312     low_boundary += NativeJump::instruction_size;
   299     // %%% Note:  On SPARC we patch only a 4-byte trap, not a full NativeJump.
   313     // %%% Note:  On SPARC we patch only a 4-byte trap, not a full NativeJump.
   300     // This means that the low_boundary is going to be a little too high.
   314     // This means that the low_boundary is going to be a little too high.