--- old/src/hotspot/share/jfr/leakprofiler/chains/objectSampleMarker.hpp 2020-01-14 13:46:52.933328491 -0800 +++ new/src/hotspot/share/jfr/leakprofiler/chains/objectSampleMarker.hpp 2020-01-14 13:46:52.637328501 -0800 @@ -68,13 +68,12 @@ // 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"); } };