< prev index next >

src/hotspot/share/gc/cms/promotionInfo.cpp

Print this page
rev 49289 : 8199735: Mark word updates need to use Access API

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -82,14 +82,14 @@
       assert(_promoTail == curObj, "Should have been the tail");            \
       _promoHead = _promoTail = NULL;                                       \
     }                                                                       \
     if (curObj->hasDisplacedMark()) {                                       \
       /* restore displaced header */                                        \
-      oop(curObj)->set_mark(nextDisplacedHeader());                         \
+      oop(curObj)->set_mark_raw(nextDisplacedHeader());                     \
     } else {                                                                \
       /* restore prototypical header */                                     \
-      oop(curObj)->init_mark();                                             \
+      oop(curObj)->init_mark_raw();                                         \
     }                                                                       \
     /* The "promoted_mark" should now not be set */                         \
     assert(!curObj->hasPromotedMark(),                                      \
            "Should have been cleared by restoring displaced mark-word");    \
     NOT_PRODUCT(_promoHead = nextObj);                                      \

@@ -144,11 +144,11 @@
   track(trackOop, oop(trackOop)->klass());
 }
 
 void PromotionInfo::track(PromotedObject* trackOop, Klass* klassOfOop) {
   // make a copy of header as it may need to be spooled
-  markOop mark = oop(trackOop)->mark();
+  markOop mark = oop(trackOop)->mark_raw();
   trackOop->clear_next();
   if (mark->must_be_preserved_for_cms_scavenge(klassOfOop)) {
     // save non-prototypical header, and mark oop
     saveDisplacedHeader(mark);
     trackOop->setDisplacedMark();

@@ -284,11 +284,11 @@
   // 1. the number of displaced headers matches the number of promoted
   //    objects that have displaced headers
   // 2. each promoted object lies in this space
   debug_only(
     PromotedObject* junk = NULL;
-    assert(junk->next_addr() == (void*)(oop(junk)->mark_addr()),
+    assert(junk->next_addr() == (void*)(oop(junk)->mark_addr_raw()),
            "Offset of PromotedObject::_next is expected to align with "
            "  the OopDesc::_mark within OopDesc");
   )
   // FIXME: guarantee????
   guarantee(_spoolHead == NULL || _spoolTail != NULL ||
< prev index next >