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