< prev index next >

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

Print this page
*** 20,10 ***
--- 20,11 ---
   * or visit www.oracle.com if you need additional information or have any
   * questions.
   */
  
  #include "precompiled.hpp"
+ #include "gc/shared/gc_globals.hpp"
  #include "gc/shared/preservedMarks.inline.hpp"
  #include "oops/oop.inline.hpp"
  #include "unittest.hpp"
  
  // Class to create a "fake" oop with a mark that will

*** 40,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 changedMark()  { return markWord(0x4711); }
  };
  
  #define ASSERT_MARK_WORD_EQ(a, b) ASSERT_EQ((a).value(), (b).value())
  
--- 41,11 ---
    void forward_to(oop obj) {
      markWord m = markWord::encode_pointer_as_mark(obj);
      _oop.set_mark(m);
    }
  
!   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())
  

*** 53,10 ***
--- 54,12 ---
    FakeOop o1;
    FakeOop o2;
    FakeOop o3;
    FakeOop o4;
  
+   FlagSetting fs(UseAltGCForwarding, false);
+ 
    // Make sure initial marks are correct.
    ASSERT_MARK_WORD_EQ(o1.mark(), FakeOop::originalMark());
    ASSERT_MARK_WORD_EQ(o2.mark(), FakeOop::originalMark());
    ASSERT_MARK_WORD_EQ(o3.mark(), FakeOop::originalMark());
    ASSERT_MARK_WORD_EQ(o4.mark(), FakeOop::originalMark());
< prev index next >