< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahAsserts.cpp

Print this page
*** 27,10 ***
--- 27,11 ---
  #include "gc/shenandoah/shenandoahAsserts.hpp"
  #include "gc/shenandoah/shenandoahForwarding.hpp"
  #include "gc/shenandoah/shenandoahHeap.inline.hpp"
  #include "gc/shenandoah/shenandoahHeapRegionSet.inline.hpp"
  #include "gc/shenandoah/shenandoahMarkingContext.inline.hpp"
+ #include "gc/shenandoah/shenandoahObjectUtils.inline.hpp"
  #include "gc/shenandoah/shenandoahUtils.hpp"
  #include "memory/resourceArea.hpp"
  
  void print_raw_memory(ShenandoahMessageBuffer &msg, void* loc) {
    // Be extra safe. Only access data that is guaranteed to be safe:

*** 195,11 ***
      print_failure(_safe_unknown, obj, interior_loc, nullptr, "Shenandoah assert_correct failed",
                    "oop must point to a heap address",
                    file, line);
    }
  
!   Klass* obj_klass = obj->klass_or_null();
    if (obj_klass == nullptr) {
      print_failure(_safe_unknown, obj, interior_loc, nullptr, "Shenandoah assert_correct failed",
                    "Object klass pointer should not be null",
                    file,line);
    }
--- 196,11 ---
      print_failure(_safe_unknown, obj, interior_loc, nullptr, "Shenandoah assert_correct failed",
                    "oop must point to a heap address",
                    file, line);
    }
  
!   Klass* obj_klass = ShenandoahObjectUtils::klass(obj);
    if (obj_klass == nullptr) {
      print_failure(_safe_unknown, obj, interior_loc, nullptr, "Shenandoah assert_correct failed",
                    "Object klass pointer should not be null",
                    file,line);
    }

*** 227,11 ***
        print_failure(_safe_oop, obj, interior_loc, nullptr, "Shenandoah assert_correct failed",
                      "Forwardee must point to a heap address",
                      file, line);
      }
  
!     if (obj_klass != fwd->klass()) {
        print_failure(_safe_oop, obj, interior_loc, nullptr, "Shenandoah assert_correct failed",
                      "Forwardee klass disagrees with object class",
                      file, line);
      }
  
--- 228,11 ---
        print_failure(_safe_oop, obj, interior_loc, nullptr, "Shenandoah assert_correct failed",
                      "Forwardee must point to a heap address",
                      file, line);
      }
  
!     if (obj_klass != ShenandoahObjectUtils::klass(fwd)) {
        print_failure(_safe_oop, obj, interior_loc, nullptr, "Shenandoah assert_correct failed",
                      "Forwardee klass disagrees with object class",
                      file, line);
      }
  
< prev index next >