8144992: Remove OopIterateClosure::idempotent

Reviewed-by: pliden, kbarrett
This commit is contained in:
Stefan Karlsson 2018-06-26 13:55:17 +02:00
parent 5012044e63
commit d4280206fd
2 changed files with 2 additions and 14 deletions

View File

@ -133,8 +133,7 @@ void DirtyCardToOopClosure::do_MemRegion(MemRegion mr) {
"Only ones we deal with for now.");
assert(_precision != CardTable::ObjHeadPreciseArray ||
_cl->idempotent() || _last_bottom == NULL ||
top <= _last_bottom,
_last_bottom == NULL || top <= _last_bottom,
"Not decreasing");
NOT_PRODUCT(_last_bottom = mr.start());
@ -172,14 +171,7 @@ void DirtyCardToOopClosure::do_MemRegion(MemRegion mr) {
walk_mem_region(extended_mr, bottom_obj, top);
}
// An idempotent closure might be applied in any order, so we don't
// record a _min_done for it.
if (!_cl->idempotent()) {
_min_done = bottom;
} else {
assert(_min_done == _last_explicit_min_done,
"Don't update _min_done for idempotent cl");
}
}
DirtyCardToOopClosure* Space::new_dcto_cl(OopIterateClosure* cl,

View File

@ -94,10 +94,6 @@ class OopIterateClosure : public OopClosure {
virtual void do_klass(Klass* k) = 0;
virtual void do_cld(ClassLoaderData* cld) = 0;
// True iff this closure may be safely applied more than once to an oop
// location without an intervening "major reset" (like the end of a GC).
virtual bool idempotent() { return false; }
#ifdef ASSERT
// Default verification of each visited oop field.
template <typename T> void verify(T* p);