@@ -351,6 +351,15 @@ void InstanceStackChunkKlass::do_barriers(stackChunkOop chunk) {
351
351
iterate_stack (chunk, &closure);
352
352
}
353
353
354
+ template <chunk_frames frame_kind, typename RegisterMapT>
355
+ static void relativize_frame (const StackChunkFrameStream<frame_kind>& f, const RegisterMapT* map) {
356
+ bool has_derived = f.is_compiled () && f.oopmap ()->has_derived_oops ();
357
+ if (has_derived) {
358
+ RelativizeDerivedPointers derived_closure;
359
+ f.iterate_derived_pointers (&derived_closure, map);
360
+ }
361
+ }
362
+
354
363
class RelativizeStackClosure {
355
364
const stackChunkOop _chunk;
356
365
@@ -359,11 +368,7 @@ class RelativizeStackClosure {
359
368
360
369
template <chunk_frames frame_kind, typename RegisterMapT>
361
370
bool do_frame (const StackChunkFrameStream<frame_kind>& f, const RegisterMapT* map) {
362
- bool has_derived = f.is_compiled () && f.oopmap ()->has_derived_oops ();
363
- if (has_derived) {
364
- RelativizeDerivedPointers derived_closure;
365
- f.iterate_derived_pointers (&derived_closure, map);
366
- }
371
+ relativize_frame (f, map);
367
372
return true ;
368
373
}
369
374
};
@@ -451,9 +456,8 @@ class BuildBitmapStackClosure {
451
456
452
457
template <chunk_frames frame_kind, typename RegisterMapT>
453
458
bool do_frame (const StackChunkFrameStream<frame_kind>& f, const RegisterMapT* map) {
454
- if (!_chunk->is_gc_mode () && f.is_compiled () && f.oopmap ()->has_derived_oops ()) {
455
- RelativizeDerivedPointers derived_oops_closure;
456
- f.iterate_derived_pointers (&derived_oops_closure, map);
459
+ if (!_chunk->is_gc_mode ()) {
460
+ relativize_frame (f, map);
457
461
}
458
462
459
463
if (UseChunkBitmaps) {
0 commit comments