8138833: Remove CMMarkStack::drain
Remove unused functions and data members. Reviewed-by: pliden, brutisso
This commit is contained in:
parent
af9ada0eb2
commit
d0ae130dd5
@ -246,10 +246,6 @@ MemRegion CMBitMap::getAndClearMarkedRegion(HeapWord* addr,
|
||||
|
||||
CMMarkStack::CMMarkStack(ConcurrentMark* cm) :
|
||||
_base(NULL), _cm(cm)
|
||||
#ifdef ASSERT
|
||||
, _drain_in_progress(false)
|
||||
, _drain_in_progress_yields(false)
|
||||
#endif
|
||||
{}
|
||||
|
||||
bool CMMarkStack::allocate(size_t capacity) {
|
||||
@ -363,30 +359,6 @@ bool CMMarkStack::par_pop_arr(oop* ptr_arr, int max, int* n) {
|
||||
}
|
||||
}
|
||||
|
||||
template<class 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;
|
||||
debug_only(_drain_in_progress = true);
|
||||
debug_only(_drain_in_progress_yields = yield_after);
|
||||
while (!isEmpty()) {
|
||||
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);
|
||||
if (yield_after && _cm->do_yield_check()) {
|
||||
res = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
debug_only(_drain_in_progress = false);
|
||||
return res;
|
||||
}
|
||||
|
||||
void CMMarkStack::note_start_of_gc() {
|
||||
assert(_saved_index == -1,
|
||||
"note_start_of_gc()/end_of_gc() bracketed incorrectly");
|
||||
|
@ -182,15 +182,6 @@ class CMMarkStack VALUE_OBJ_CLASS_SPEC {
|
||||
|
||||
bool _overflow;
|
||||
bool _should_expand;
|
||||
DEBUG_ONLY(bool _drain_in_progress;)
|
||||
DEBUG_ONLY(bool _drain_in_progress_yields;)
|
||||
|
||||
oop pop() {
|
||||
if (!isEmpty()) {
|
||||
return _base[--_index] ;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
public:
|
||||
CMMarkStack(ConcurrentMark* cm);
|
||||
@ -212,17 +203,6 @@ class CMMarkStack VALUE_OBJ_CLASS_SPEC {
|
||||
// operations, which use the same locking strategy.
|
||||
bool par_pop_arr(oop* ptr_arr, int max, int* n);
|
||||
|
||||
// Drain the mark stack, applying the given closure to all fields of
|
||||
// objects on the stack. (That is, continue until the stack is empty,
|
||||
// even if closure applications add entries to the stack.) The "bm"
|
||||
// argument, if non-null, may be used to verify that only marked objects
|
||||
// are on the mark stack. If "yield_after" is "true", then the
|
||||
// concurrent marker performing the drain offers to yield after
|
||||
// processing each object. If a yield occurs, stops the drain operation
|
||||
// and returns false. Otherwise, returns true.
|
||||
template<class OopClosureClass>
|
||||
bool drain(OopClosureClass* cl, CMBitMap* bm, bool yield_after = false);
|
||||
|
||||
bool isEmpty() { return _index == 0; }
|
||||
int maxElems() { return _capacity; }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user