src/share/vm/gc_implementation/g1/concurrentMark.cpp
Print this page
rev 6796 : [mq]: templateOopIterate
rev 6801 : imported patch defaultToTrue
@@ -342,11 +342,11 @@
*n = k;
return true;
}
}
-template<class OopClosureClass>
+template<bool nv, typename OopClosureClass>
bool CMMarkStack::drain(OopClosureClass* cl, CMBitMap* bm, bool yield_after) {
assert(!_drain_in_progress || !_drain_in_progress_yields || yield_after
|| SafepointSynchronize::is_at_safepoint(),
"Drain recursion must be yield-safe.");
bool res = true;
@@ -356,11 +356,11 @@
oop newOop = pop();
assert(G1CollectedHeap::heap()->is_in_reserved(newOop), "Bad pop");
assert(newOop->is_oop(), "Expected an oop");
assert(bm == NULL || bm->isMarked((HeapWord*)newOop),
"only grey objects on this stack");
- newOop->oop_iterate(cl);
+ newOop->oop_iterate<nv>(cl);
if (yield_after && _cm->do_yield_check()) {
res = false;
break;
}
}