< prev index next >

src/hotspot/share/jfr/leakprofiler/chains/objectSampleMarker.hpp

Print this page

        

@@ -66,16 +66,15 @@
   void mark(oop obj) {
     assert(obj != NULL, "invariant");
     // save the original markWord
     _store->push(ObjectSampleMarkWord(obj, obj->mark()));
     // now we will "poison" the mark word of the sample object
-    // to the intermediate monitor INFLATING state.
-    // This is an "impossible" state during a safepoint,
-    // hence we will use it to quickly identify sample objects
+    // to marked.
+    // This will be used to quickly identify sample objects
     // during the reachability search from gc roots.
-    assert(NULL == markWord::INFLATING().to_pointer(), "invariant");
-    obj->set_mark(markWord::INFLATING());
-    assert(NULL == obj->mark().to_pointer(), "invariant");
+    assert(!obj->mark().is_marked(), "should only mark an object once");
+    obj->set_mark(markWord::prototype().set_marked());
+    assert(obj->mark().is_marked(), "invariant");
   }
 };
 
 #endif // SHARE_JFR_LEAKPROFILER_CHAINS_OBJECTSAMPLEMARKER_HPP
< prev index next >