< prev index next >

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

Print this page
*** 104,11 ***
    } DEBUG_ONLY(else _has_stub = false;)
  }
  
  template <ChunkFrames frame_kind>
  inline bool StackChunkFrameStream<frame_kind>::is_stub() const {
!   return cb() != nullptr && (_cb->is_safepoint_stub() || _cb->is_runtime_stub());
  }
  
  template <ChunkFrames frame_kind>
  inline bool StackChunkFrameStream<frame_kind>::is_compiled() const {
    return cb() != nullptr && _cb->is_nmethod();
--- 104,11 ---
    } DEBUG_ONLY(else _has_stub = false;)
  }
  
  template <ChunkFrames frame_kind>
  inline bool StackChunkFrameStream<frame_kind>::is_stub() const {
!   return cb() != nullptr && _cb->is_runtime_stub();
  }
  
  template <ChunkFrames frame_kind>
  inline bool StackChunkFrameStream<frame_kind>::is_compiled() const {
    return cb() != nullptr && _cb->is_nmethod();

*** 194,11 ***
    return (cb()->as_nmethod()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord;
  }
  
  template <ChunkFrames frame_kind>
  inline int StackChunkFrameStream<frame_kind>::num_oops() const {
!   return is_interpreted() ? interpreter_frame_num_oops() : oopmap()->num_oops();
  }
  
  template <ChunkFrames frame_kind>
  inline void StackChunkFrameStream<frame_kind>::initialize_register_map(RegisterMap* map) {
    update_reg_map_pd(map);
--- 194,18 ---
    return (cb()->as_nmethod()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord;
  }
  
  template <ChunkFrames frame_kind>
  inline int StackChunkFrameStream<frame_kind>::num_oops() const {
!   if (is_interpreted()) {
+     return interpreter_frame_num_oops();
+   } else if (is_compiled()) {
+     return oopmap()->num_oops();
+   } else {
+     assert(is_stub(), "invariant");
+     return 0;
+   }
  }
  
  template <ChunkFrames frame_kind>
  inline void StackChunkFrameStream<frame_kind>::initialize_register_map(RegisterMap* map) {
    update_reg_map_pd(map);

*** 206,11 ***
  
  template <ChunkFrames frame_kind>
  template <typename RegisterMapT>
  inline void StackChunkFrameStream<frame_kind>::next(RegisterMapT* map, bool stop) {
    update_reg_map(map);
!   bool safepoint = is_stub();
    if (frame_kind == ChunkFrames::Mixed) {
      if (is_interpreted()) {
        next_for_interpreter_frame();
      } else {
        _sp = _unextended_sp + cb()->frame_size();
--- 213,11 ---
  
  template <ChunkFrames frame_kind>
  template <typename RegisterMapT>
  inline void StackChunkFrameStream<frame_kind>::next(RegisterMapT* map, bool stop) {
    update_reg_map(map);
!   bool is_runtime_stub = is_stub();
    if (frame_kind == ChunkFrames::Mixed) {
      if (is_interpreted()) {
        next_for_interpreter_frame();
      } else {
        _sp = _unextended_sp + cb()->frame_size();

*** 230,12 ***
      return;
    }
  
    get_cb();
    update_reg_map_pd(map);
!   if (safepoint && cb() != nullptr) { // there's no post-call nop and no fast oopmap lookup
!     _oopmap = cb()->oop_map_for_return_address(pc());
    }
  }
  
  template <ChunkFrames frame_kind>
  inline void StackChunkFrameStream<frame_kind>::get_cb() {
--- 237,13 ---
      return;
    }
  
    get_cb();
    update_reg_map_pd(map);
!   if (is_runtime_stub && cb() != nullptr) { // there's no post-call nop and no fast oopmap lookup
!     // caller could have been deoptimized so use orig_pc()
+     _oopmap = cb()->oop_map_for_return_address(orig_pc());
    }
  }
  
  template <ChunkFrames frame_kind>
  inline void StackChunkFrameStream<frame_kind>::get_cb() {

*** 298,13 ***
  }
  
  template<>
  template<>
  inline void StackChunkFrameStream<ChunkFrames::CompiledOnly>::update_reg_map(RegisterMap* map) {
!   assert(map->in_cont(), "");
!   assert(map->stack_chunk()() == _chunk, "");
-   if (map->update_map()) {
      frame f = to_frame();
      oopmap()->update_register_map(&f, map); // we have callee-save registers in this case
    }
  }
  
--- 306,12 ---
  }
  
  template<>
  template<>
  inline void StackChunkFrameStream<ChunkFrames::CompiledOnly>::update_reg_map(RegisterMap* map) {
!   assert(!map->in_cont() || map->stack_chunk() == _chunk, "");
!   if (map->update_map() && is_stub()) {
      frame f = to_frame();
      oopmap()->update_register_map(&f, map); // we have callee-save registers in this case
    }
  }
  
< prev index next >