< prev index next >

src/hotspot/share/runtime/stackChunkFrameStream.hpp

Print this page
*** 24,10 ***
--- 24,11 ---
  
  #ifndef SHARE_RUNTIME_STACKCHUNKFRAMESTREAM_HPP
  #define SHARE_RUNTIME_STACKCHUNKFRAMESTREAM_HPP
  
  #include "memory/allocation.hpp"
+ #include "memory/iterator.hpp"
  #include "oops/oopsHierarchy.hpp"
  #include "utilities/globalDefinitions.hpp"
  #include "utilities/macros.hpp"
  
  class CodeBlob;

*** 77,11 ***
    CodeBlob* cb() const { return _cb; }
    inline void get_cb();
    const ImmutableOopMap* oopmap() const { if (_oopmap == nullptr) get_oopmap(); return _oopmap; }
    inline int frame_size() const;
    inline int stack_argsize() const;
!   inline int num_oops() const;
  
    inline void initialize_register_map(RegisterMap* map);
    template <typename RegisterMapT> inline void next(RegisterMapT* map, bool stop = false);
  
    template <typename RegisterMapT> inline void update_reg_map(RegisterMapT* map);
--- 78,12 ---
    CodeBlob* cb() const { return _cb; }
    inline void get_cb();
    const ImmutableOopMap* oopmap() const { if (_oopmap == nullptr) get_oopmap(); return _oopmap; }
    inline int frame_size() const;
    inline int stack_argsize() const;
!   template <typename RegisterMapT>
+   inline int num_oops(RegisterMapT* map) const;
  
    inline void initialize_register_map(RegisterMap* map);
    template <typename RegisterMapT> inline void next(RegisterMapT* map, bool stop = false);
  
    template <typename RegisterMapT> inline void update_reg_map(RegisterMapT* map);

*** 99,11 ***
  
   private:
    inline address get_pc() const;
  
    inline int interpreter_frame_size() const;
!   inline int interpreter_frame_num_oops() const;
    inline int interpreter_frame_stack_argsize() const;
    inline void next_for_interpreter_frame();
    inline intptr_t* unextended_sp_for_interpreter_frame() const;
    inline intptr_t* derelativize(int offset) const;
    inline void get_oopmap() const;
--- 101,12 ---
  
   private:
    inline address get_pc() const;
  
    inline int interpreter_frame_size() const;
!   template <typename RegisterMapT>
+   inline int interpreter_frame_num_oops(RegisterMapT* map) const;
    inline int interpreter_frame_stack_argsize() const;
    inline void next_for_interpreter_frame();
    inline intptr_t* unextended_sp_for_interpreter_frame() const;
    inline intptr_t* derelativize(int offset) const;
    inline void get_oopmap() const;

*** 121,6 ***
--- 124,15 ---
    inline void iterate_oops(OopClosureType* closure, const RegisterMapT* map) const;
    template <class DerivedOopClosureType, class RegisterMapT>
    inline void iterate_derived_pointers(DerivedOopClosureType* closure, const RegisterMapT* map) const;
  };
  
+ class InterpreterOopCount : public OopClosure {
+   int _count;
+ public:
+   InterpreterOopCount() : _count(0) {}
+   void do_oop(oop* p) override { _count++; }
+   void do_oop(narrowOop* p) override { _count++; }
+   int count() { return _count; }
+ };
+ 
  #endif // SHARE_RUNTIME_STACKCHUNKFRAMESTREAM_HPP
< prev index next >