51
52 class frame VALUE_OBJ_CLASS_SPEC {
53 private:
54 // Instance variables:
55 intptr_t* _sp; // stack pointer (from Thread::last_Java_sp)
56 address _pc; // program counter (the next instruction after the call)
57
58 CodeBlob* _cb; // CodeBlob that "owns" pc
59 enum deopt_state {
60 not_deoptimized,
61 is_deoptimized,
62 unknown
63 };
64
65 deopt_state _deopt_state;
66
67 public:
68 // Constructors
69 frame();
70
71 // Accessors
72
73 // pc: Returns the pc at which this frame will continue normally.
74 // It must point at the beginning of the next instruction to execute.
75 address pc() const { return _pc; }
76
77 // This returns the pc that if you were in the debugger you'd see. Not
78 // the idealized value in the frame object. This undoes the magic conversion
79 // that happens for deoptimized frames. In addition it makes the value the
80 // hardware would want to see in the native frame. The only user (at this point)
81 // is deoptimization. It likely no one else should ever use it.
82 address raw_pc() const;
83
84 void set_pc( address newpc );
85
86 intptr_t* sp() const { return _sp; }
87 void set_sp( intptr_t* newsp ) { _sp = newsp; }
88
89
90 CodeBlob* cb() const { return _cb; }
|
51
52 class frame VALUE_OBJ_CLASS_SPEC {
53 private:
54 // Instance variables:
55 intptr_t* _sp; // stack pointer (from Thread::last_Java_sp)
56 address _pc; // program counter (the next instruction after the call)
57
58 CodeBlob* _cb; // CodeBlob that "owns" pc
59 enum deopt_state {
60 not_deoptimized,
61 is_deoptimized,
62 unknown
63 };
64
65 deopt_state _deopt_state;
66
67 public:
68 // Constructors
69 frame();
70
71 #ifndef PRODUCT
72 // This is a generic constructor which is only used by pns() in debug.cpp.
73 // pns (i.e. print native stack) uses this constructor to create a starting
74 // frame for stack walking. The implementation of this constructor is platform
75 // dependent (i.e. SPARC doesn't need an 'fp' argument an will ignore it) but
76 // we want to keep the signature generic because pns() is shared code.
77 frame(void* sp, void* fp, void* pc);
78 #endif
79
80 // Accessors
81
82 // pc: Returns the pc at which this frame will continue normally.
83 // It must point at the beginning of the next instruction to execute.
84 address pc() const { return _pc; }
85
86 // This returns the pc that if you were in the debugger you'd see. Not
87 // the idealized value in the frame object. This undoes the magic conversion
88 // that happens for deoptimized frames. In addition it makes the value the
89 // hardware would want to see in the native frame. The only user (at this point)
90 // is deoptimization. It likely no one else should ever use it.
91 address raw_pc() const;
92
93 void set_pc( address newpc );
94
95 intptr_t* sp() const { return _sp; }
96 void set_sp( intptr_t* newsp ) { _sp = newsp; }
97
98
99 CodeBlob* cb() const { return _cb; }
|