182 #ifdef ASSERT
183
184 class DescribeStackChunkClosure {
185 stackChunkOop _chunk;
186 FrameValues _values;
187 RegisterMap _map;
188 int _frame_no;
189
190 public:
191 DescribeStackChunkClosure(stackChunkOop chunk)
192 : _chunk(chunk),
193 _map(nullptr,
194 RegisterMap::UpdateMap::include,
195 RegisterMap::ProcessFrames::skip,
196 RegisterMap::WalkContinuation::include),
197 _frame_no(0) {
198 _map.set_include_argument_oops(false);
199 }
200
201 const RegisterMap* get_map(const RegisterMap* map, intptr_t* sp) { return map; }
202 const RegisterMap* get_map(const SmallRegisterMap* map, intptr_t* sp) { return map->copy_to_RegisterMap(&_map, sp); }
203
204 template <ChunkFrames frame_kind, typename RegisterMapT>
205 bool do_frame(const StackChunkFrameStream<frame_kind>& f, const RegisterMapT* map) {
206 ResetNoHandleMark rnhm;
207 HandleMark hm(Thread::current());
208
209 frame fr = f.to_frame();
210 fr.describe(_values, _frame_no++, get_map(map, f.sp()));
211 return true;
212 }
213
214 void describe_chunk() {
215 // _values.describe(-1, _chunk->start_address(), "CHUNK START");
216 _values.describe(-1, _chunk->sp_address(), "CHUNK SP");
217 _values.describe(-1, _chunk->bottom_address() - 1, "CHUNK ARGS");
218 _values.describe(-1, _chunk->end_address() - 1, "CHUNK END");
219 }
220
221 void print_on(outputStream* out) {
222 if (_frame_no > 0) {
|
182 #ifdef ASSERT
183
184 class DescribeStackChunkClosure {
185 stackChunkOop _chunk;
186 FrameValues _values;
187 RegisterMap _map;
188 int _frame_no;
189
190 public:
191 DescribeStackChunkClosure(stackChunkOop chunk)
192 : _chunk(chunk),
193 _map(nullptr,
194 RegisterMap::UpdateMap::include,
195 RegisterMap::ProcessFrames::skip,
196 RegisterMap::WalkContinuation::include),
197 _frame_no(0) {
198 _map.set_include_argument_oops(false);
199 }
200
201 const RegisterMap* get_map(const RegisterMap* map, intptr_t* sp) { return map; }
202 template <typename SmallRegisterMapT>
203 const RegisterMap* get_map(const SmallRegisterMapT map, intptr_t* sp) { return map->copy_to_RegisterMap(&_map, sp); }
204
205 template <ChunkFrames frame_kind, typename RegisterMapT>
206 bool do_frame(const StackChunkFrameStream<frame_kind>& f, const RegisterMapT* map) {
207 ResetNoHandleMark rnhm;
208 HandleMark hm(Thread::current());
209
210 frame fr = f.to_frame();
211 fr.describe(_values, _frame_no++, get_map(map, f.sp()));
212 return true;
213 }
214
215 void describe_chunk() {
216 // _values.describe(-1, _chunk->start_address(), "CHUNK START");
217 _values.describe(-1, _chunk->sp_address(), "CHUNK SP");
218 _values.describe(-1, _chunk->bottom_address() - 1, "CHUNK ARGS");
219 _values.describe(-1, _chunk->end_address() - 1, "CHUNK END");
220 }
221
222 void print_on(outputStream* out) {
223 if (_frame_no > 0) {
|