< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp

Print this page
@@ -330,15 +330,17 @@
  // necessarily be determined because of concurrent locking by the
  // mutator
  uint ShenandoahHeap::get_object_age(oop obj) {
    markWord w = obj->mark();
    assert(!w.is_marked(), "must not be forwarded");
+ 
    if (UseObjectMonitorTable) {
      assert(LockingMode == LM_LIGHTWEIGHT, "Must use LW locking, too");
      assert(w.age() <= markWord::max_age, "Impossible!");
      return w.age();
    }
+ 
    if (w.has_monitor()) {
      w = w.monitor()->header();
    } else if (w.is_being_inflated() || w.has_displaced_mark_helper()) {
      // Informs caller that we aren't able to determine the age
      return markWord::max_age + 1; // sentinel
< prev index next >