104 static void handle_overflow(TRAPS);
105
106 public:
107 void zap(int c) PRODUCT_RETURN;
108
109 public:
110 static ByteSize base_offset() {
111 return byte_offset_of(ZeroStack, _base);
112 }
113 static ByteSize top_offset() {
114 return byte_offset_of(ZeroStack, _top);
115 }
116 static ByteSize sp_offset() {
117 return byte_offset_of(ZeroStack, _sp);
118 }
119 };
120
121
122 class EntryFrame;
123 class InterpreterFrame;
124 class SharkFrame;
125 class FakeStubFrame;
126
127 //
128 // | ... |
129 // +--------------------+ ------------------
130 // | ... | low addresses
131 // | frame_type |
132 // | next_frame | high addresses
133 // +--------------------+ ------------------
134 // | ... |
135
136 class ZeroFrame {
137 friend class frame;
138 friend class ZeroStackPrinter;
139
140 protected:
141 ZeroFrame() {
142 ShouldNotCallThis();
143 }
144
145 enum Layout {
146 next_frame_off,
147 frame_type_off,
148 jf_header_words
149 };
150
151 enum FrameType {
152 ENTRY_FRAME = 1,
153 INTERPRETER_FRAME,
154 SHARK_FRAME,
155 FAKE_STUB_FRAME
156 };
157
158 protected:
159 intptr_t *addr_of_word(int offset) const {
160 return (intptr_t *) this - offset;
161 }
162 intptr_t value_of_word(int offset) const {
163 return *addr_of_word(offset);
164 }
165
166 public:
167 ZeroFrame *next() const {
168 return (ZeroFrame *) value_of_word(next_frame_off);
169 }
170
171 protected:
172 FrameType type() const {
173 return (FrameType) value_of_word(frame_type_off);
174 }
175
176 public:
177 bool is_entry_frame() const {
178 return type() == ENTRY_FRAME;
179 }
180 bool is_interpreter_frame() const {
181 return type() == INTERPRETER_FRAME;
182 }
183 bool is_shark_frame() const {
184 return type() == SHARK_FRAME;
185 }
186 bool is_fake_stub_frame() const {
187 return type() == FAKE_STUB_FRAME;
188 }
189
190 public:
191 EntryFrame *as_entry_frame() const {
192 assert(is_entry_frame(), "should be");
193 return (EntryFrame *) this;
194 }
195 InterpreterFrame *as_interpreter_frame() const {
196 assert(is_interpreter_frame(), "should be");
197 return (InterpreterFrame *) this;
198 }
199 SharkFrame *as_shark_frame() const {
200 assert(is_shark_frame(), "should be");
201 return (SharkFrame *) this;
202 }
203 FakeStubFrame *as_fake_stub_frame() const {
204 assert(is_fake_stub_frame(), "should be");
205 return (FakeStubFrame *) this;
206 }
207
208 public:
209 void identify_word(int frame_index,
210 int offset,
211 char* fieldbuf,
212 char* valuebuf,
213 int buflen) const;
214
215 protected:
216 void identify_vp_word(int frame_index,
217 intptr_t* addr,
218 intptr_t* monitor_base,
219 intptr_t* stack_base,
220 char* fieldbuf,
221 int buflen) const;
|
104 static void handle_overflow(TRAPS);
105
106 public:
107 void zap(int c) PRODUCT_RETURN;
108
109 public:
110 static ByteSize base_offset() {
111 return byte_offset_of(ZeroStack, _base);
112 }
113 static ByteSize top_offset() {
114 return byte_offset_of(ZeroStack, _top);
115 }
116 static ByteSize sp_offset() {
117 return byte_offset_of(ZeroStack, _sp);
118 }
119 };
120
121
122 class EntryFrame;
123 class InterpreterFrame;
124 class FakeStubFrame;
125
126 //
127 // | ... |
128 // +--------------------+ ------------------
129 // | ... | low addresses
130 // | frame_type |
131 // | next_frame | high addresses
132 // +--------------------+ ------------------
133 // | ... |
134
135 class ZeroFrame {
136 friend class frame;
137 friend class ZeroStackPrinter;
138
139 protected:
140 ZeroFrame() {
141 ShouldNotCallThis();
142 }
143
144 enum Layout {
145 next_frame_off,
146 frame_type_off,
147 jf_header_words
148 };
149
150 enum FrameType {
151 ENTRY_FRAME = 1,
152 INTERPRETER_FRAME,
153 FAKE_STUB_FRAME
154 };
155
156 protected:
157 intptr_t *addr_of_word(int offset) const {
158 return (intptr_t *) this - offset;
159 }
160 intptr_t value_of_word(int offset) const {
161 return *addr_of_word(offset);
162 }
163
164 public:
165 ZeroFrame *next() const {
166 return (ZeroFrame *) value_of_word(next_frame_off);
167 }
168
169 protected:
170 FrameType type() const {
171 return (FrameType) value_of_word(frame_type_off);
172 }
173
174 public:
175 bool is_entry_frame() const {
176 return type() == ENTRY_FRAME;
177 }
178 bool is_interpreter_frame() const {
179 return type() == INTERPRETER_FRAME;
180 }
181 bool is_fake_stub_frame() const {
182 return type() == FAKE_STUB_FRAME;
183 }
184
185 public:
186 EntryFrame *as_entry_frame() const {
187 assert(is_entry_frame(), "should be");
188 return (EntryFrame *) this;
189 }
190 InterpreterFrame *as_interpreter_frame() const {
191 assert(is_interpreter_frame(), "should be");
192 return (InterpreterFrame *) this;
193 }
194 FakeStubFrame *as_fake_stub_frame() const {
195 assert(is_fake_stub_frame(), "should be");
196 return (FakeStubFrame *) this;
197 }
198
199 public:
200 void identify_word(int frame_index,
201 int offset,
202 char* fieldbuf,
203 char* valuebuf,
204 int buflen) const;
205
206 protected:
207 void identify_vp_word(int frame_index,
208 intptr_t* addr,
209 intptr_t* monitor_base,
210 intptr_t* stack_base,
211 char* fieldbuf,
212 int buflen) const;
|