< prev index next >
src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.cpp
Print this page
@@ -8006,18 +8006,18 @@
}
// Single threaded
void CMSCollector::preserve_mark_if_necessary(oop p) {
markWord m = p->mark_raw();
- if (m.must_be_preserved(p)) {
+ if (p->mark_must_be_preserved(m)) {
preserve_mark_work(p, m);
}
}
void CMSCollector::par_preserve_mark_if_necessary(oop p) {
markWord m = p->mark_raw();
- if (m.must_be_preserved(p)) {
+ if (p->mark_must_be_preserved(m)) {
MutexLocker x(ParGCRareEvent_lock, Mutex::_no_safepoint_check_flag);
// Even though we read the mark word without holding
// the lock, we are assured that it will not change
// because we "own" this oop, so no other thread can
// be trying to push it on the overflow list; see
< prev index next >