< prev index next >

src/hotspot/share/runtime/frame.inline.hpp

Print this page
*** 27,11 ***
--- 27,13 ---
  
  #include "runtime/frame.hpp"
  
  #include "code/compiledMethod.inline.hpp"
  #include "interpreter/interpreter.hpp"
+ #include "oops/instanceStackChunkKlass.inline.hpp"
  #include "oops/method.hpp"
+ #include "runtime/continuation.hpp"
  #include "runtime/registerMap.hpp"
  #include "runtime/stubRoutines.hpp"
  #include "utilities/macros.hpp"
  #ifdef ZERO
  # include "entryFrame_zero.hpp"

*** 57,20 ***
  
  inline bool frame::is_optimized_entry_frame() const {
    return _cb != NULL && _cb->is_optimized_entry_blob();
  }
  
! inline address frame::oopmapreg_to_location(VMReg reg, const RegisterMap* reg_map) const {
!   if(reg->is_reg()) {
      // If it is passed in a register, it got spilled in the stub frame.
!     return reg_map->location(reg);
    } else {
      int sp_offset_in_bytes = reg->reg2stack() * VMRegImpl::stack_slot_size;
!     return ((address)unextended_sp()) + sp_offset_in_bytes;
    }
  }
  
! inline oop* frame::oopmapreg_to_oop_location(VMReg reg, const RegisterMap* reg_map) const {
    return (oop*)oopmapreg_to_location(reg, reg_map);
  }
  
  #endif // SHARE_RUNTIME_FRAME_INLINE_HPP
--- 59,55 ---
  
  inline bool frame::is_optimized_entry_frame() const {
    return _cb != NULL && _cb->is_optimized_entry_blob();
  }
  
! inline bool frame::is_compiled_frame() const {
!   if (_cb != NULL &&
+       _cb->is_compiled() &&
+       ((CompiledMethod*)_cb)->is_java_method()) {
+     return true;
+   }
+   return false;
+ }
+ 
+ template <typename RegisterMapT>
+ inline address frame::oopmapreg_to_location(VMReg reg, const RegisterMapT* reg_map) const {
+   if (reg->is_reg()) {
      // If it is passed in a register, it got spilled in the stub frame.
!     return reg_map->location(reg, sp());
    } else {
      int sp_offset_in_bytes = reg->reg2stack() * VMRegImpl::stack_slot_size;
!     if (reg_map->in_cont()) {
+       return (address)((intptr_t)reg_map->as_RegisterMap()->stack_chunk()->relativize_usp_offset(*this, sp_offset_in_bytes));
+     }
+     address usp = (address)unextended_sp();
+     assert(reg_map->thread() == NULL || reg_map->thread()->is_in_usable_stack(usp), INTPTR_FORMAT, p2i(usp)); 
+     return (usp + sp_offset_in_bytes);
    }
  }
  
! template <typename RegisterMapT>
+ inline oop* frame::oopmapreg_to_oop_location(VMReg reg, const RegisterMapT* reg_map) const {
    return (oop*)oopmapreg_to_location(reg, reg_map);
  }
  
+ inline CodeBlob* frame::get_cb() const {
+   // if (_cb == NULL) _cb = CodeCache::find_blob(_pc);
+   if (_cb == NULL) {
+     int slot;
+     _cb = CodeCache::find_blob_and_oopmap(_pc, slot);
+     if (_oop_map == NULL && slot >= 0) {
+       _oop_map = _cb->oop_map_for_slot(slot, _pc);
+     }
+   }
+   return _cb;
+ }
+ 
+ // inline void frame::set_cb(CodeBlob* cb) {
+ //   if (_cb == NULL) _cb = cb;
+ //   assert (_cb == cb, "");
+ //   assert (_cb->contains(_pc), "");
+ // }
+ 
+ 
  #endif // SHARE_RUNTIME_FRAME_INLINE_HPP
< prev index next >