< prev index next >

test/hotspot/gtest/gc/shared/test_preservedMarks.cpp

Print this page
@@ -47,11 +47,11 @@
    void forward_to(oop obj) {
      markWord m = markWord::encode_pointer_as_mark(obj);
      _oop.set_mark(m);
    }
  
-   static markWord originalMark() { return markWord(markWord::lock_mask_in_place); }
+   static markWord originalMark() { return markWord(markWord::unlocked_value); }
    static markWord changedMark()  { return markWord(0x4711); }
  };
  
  #define ASSERT_MARK_WORD_EQ(a, b) ASSERT_EQ((a).value(), (b).value())
  

@@ -87,10 +87,13 @@
    o2.forward_to(o4.get_oop());
    ASSERT_EQ(o1.get_oop()->forwardee(), o3.get_oop());
    ASSERT_EQ(o2.get_oop()->forwardee(), o4.get_oop());
    // Adjust will update the PreservedMarks stack to
    // make sure the mark is updated at the new location.
+   // TODO: This is the only use of PM::adjust_during_full_gc().
+   // GCs use the variant with a forwarding structure here,
+   // test that variant, and remove the method.
    pm.adjust_during_full_gc();
  
    // Restore all preserved and verify that the changed
    // mark is now present at o3 and o4.
    pm.restore();
< prev index next >