< prev index next >

src/hotspot/share/runtime/stackChunkFrameStream.hpp

Print this page

 31 #include "utilities/globalDefinitions.hpp"
 32 #include "utilities/macros.hpp"
 33 
 34 class CodeBlob;
 35 class frame;
 36 class ImmutableOopMap;
 37 class RegisterMap;
 38 class VMRegImpl;
 39 typedef VMRegImpl* VMReg;
 40 
 41 enum ChunkFrames { CompiledOnly, Mixed };
 42 
 43 template <ChunkFrames frame_kind>
 44 class StackChunkFrameStream : public StackObj {
 45 private:
 46   intptr_t* _end;
 47   intptr_t* _sp;
 48   intptr_t* _unextended_sp; // used only when mixed
 49   CodeBlob* _cb;
 50   mutable const ImmutableOopMap* _oopmap;

 51 
 52 #ifndef PRODUCT
 53   stackChunkOop _chunk;
 54   int _index;
 55 #endif
 56 
 57 #ifdef ASSERT
 58   int _has_stub;
 59 #endif
 60 
 61 public:
 62   StackChunkFrameStream() { NOT_PRODUCT(_chunk = nullptr; _index = -1;) DEBUG_ONLY(_has_stub = false;) }
 63   inline StackChunkFrameStream(stackChunkOop chunk);
 64   inline StackChunkFrameStream(stackChunkOop chunk, const frame& f);
 65 
 66   bool is_done() const { return _sp >= _end; }
 67 
 68   // Query
 69   intptr_t*        sp() const  { return _sp; }
 70   inline address   pc() const  { return get_pc(); }
 71   inline intptr_t* fp() const;
 72   inline intptr_t* unextended_sp() const { return frame_kind == ChunkFrames::Mixed ? _unextended_sp : _sp; }
 73   inline address orig_pc() const;
 74 
 75   inline bool is_interpreted() const;
 76   inline bool is_stub() const;
 77   inline bool is_compiled() const;
 78   CodeBlob* cb() const { return _cb; }
 79   inline void get_cb();
 80   const ImmutableOopMap* oopmap() const { if (_oopmap == nullptr) get_oopmap(); return _oopmap; }
 81   inline int frame_size() const;
 82   inline int stack_argsize() const;
 83   template <typename RegisterMapT>
 84   inline int num_oops(RegisterMapT* map) const;
 85 
 86   inline void initialize_register_map(RegisterMap* map);
 87   template <typename RegisterMapT> inline void next(RegisterMapT* map, bool stop = false);
 88 
 89   template <typename RegisterMapT> inline void update_reg_map(RegisterMapT* map);
 90 
 91   void handle_deopted() const;
 92 

 31 #include "utilities/globalDefinitions.hpp"
 32 #include "utilities/macros.hpp"
 33 
 34 class CodeBlob;
 35 class frame;
 36 class ImmutableOopMap;
 37 class RegisterMap;
 38 class VMRegImpl;
 39 typedef VMRegImpl* VMReg;
 40 
 41 enum ChunkFrames { CompiledOnly, Mixed };
 42 
 43 template <ChunkFrames frame_kind>
 44 class StackChunkFrameStream : public StackObj {
 45 private:
 46   intptr_t* _end;
 47   intptr_t* _sp;
 48   intptr_t* _unextended_sp; // used only when mixed
 49   CodeBlob* _cb;
 50   mutable const ImmutableOopMap* _oopmap;
 51   bool _callee_augmented;
 52 
 53 #ifndef PRODUCT
 54   stackChunkOop _chunk;
 55   int _index;
 56 #endif
 57 
 58 #ifdef ASSERT
 59   int _has_stub;
 60 #endif
 61 
 62 public:
 63   StackChunkFrameStream() { NOT_PRODUCT(_chunk = nullptr; _index = -1;) DEBUG_ONLY(_has_stub = false;) }
 64   inline StackChunkFrameStream(stackChunkOop chunk);
 65   inline StackChunkFrameStream(stackChunkOop chunk, const frame& f);
 66 
 67   bool is_done() const { return _sp >= _end; }
 68 
 69   // Query
 70   intptr_t*        sp() const  { return _sp; }
 71   inline address   pc() const  { return get_pc(); }
 72   inline intptr_t* fp() const;
 73   inline intptr_t* unextended_sp() const { return _unextended_sp; }
 74   inline address orig_pc() const;
 75 
 76   inline bool is_interpreted() const;
 77   inline bool is_stub() const;
 78   inline bool is_compiled() const;
 79   CodeBlob* cb() const { return _cb; }
 80   inline void get_cb();
 81   const ImmutableOopMap* oopmap() const { if (_oopmap == nullptr) get_oopmap(); return _oopmap; }
 82   inline int frame_size() const;
 83   inline int stack_argsize() const;
 84   template <typename RegisterMapT>
 85   inline int num_oops(RegisterMapT* map) const;
 86 
 87   inline void initialize_register_map(RegisterMap* map);
 88   template <typename RegisterMapT> inline void next(RegisterMapT* map, bool stop = false);
 89 
 90   template <typename RegisterMapT> inline void update_reg_map(RegisterMapT* map);
 91 
 92   void handle_deopted() const;
 93 
< prev index next >