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