8062836: BACKOUT - Parallelize clearing the next mark bitmap
Backing out due to non-trivial issues found in nightly testing Reviewed-by: mgerdin, mlarsson
This commit is contained in:
parent
0e54928686
commit
7339456266
@ -180,32 +180,9 @@ class ClearBitmapHRClosure : public HeapRegionClosure {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class ParClearNextMarkBitmapTask : public AbstractGangTask {
|
|
||||||
ClearBitmapHRClosure* _cl;
|
|
||||||
HeapRegionClaimer _hrclaimer;
|
|
||||||
bool _suspendible; // If the task is suspendible, workers must join the STS.
|
|
||||||
|
|
||||||
public:
|
|
||||||
ParClearNextMarkBitmapTask(ClearBitmapHRClosure *cl, uint n_workers, bool suspendible) :
|
|
||||||
_cl(cl), _suspendible(suspendible), AbstractGangTask("Parallel Clear Bitmap Task"), _hrclaimer(n_workers) {}
|
|
||||||
|
|
||||||
void work(uint worker_id) {
|
|
||||||
if (_suspendible) {
|
|
||||||
SuspendibleThreadSet::join();
|
|
||||||
}
|
|
||||||
G1CollectedHeap::heap()->heap_region_par_iterate(_cl, worker_id, &_hrclaimer);
|
|
||||||
if (_suspendible) {
|
|
||||||
SuspendibleThreadSet::leave();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
void CMBitMap::clearAll() {
|
void CMBitMap::clearAll() {
|
||||||
G1CollectedHeap* g1h = G1CollectedHeap::heap();
|
|
||||||
ClearBitmapHRClosure cl(NULL, this, false /* may_yield */);
|
ClearBitmapHRClosure cl(NULL, this, false /* may_yield */);
|
||||||
uint n_workers = g1h->workers()->active_workers();
|
G1CollectedHeap::heap()->heap_region_iterate(&cl);
|
||||||
ParClearNextMarkBitmapTask task(&cl, n_workers, false);
|
|
||||||
g1h->workers()->run_task(&task);
|
|
||||||
guarantee(cl.complete(), "Must have completed iteration.");
|
guarantee(cl.complete(), "Must have completed iteration.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -884,8 +861,7 @@ void ConcurrentMark::clearNextBitmap() {
|
|||||||
guarantee(!g1h->mark_in_progress(), "invariant");
|
guarantee(!g1h->mark_in_progress(), "invariant");
|
||||||
|
|
||||||
ClearBitmapHRClosure cl(this, _nextMarkBitMap, true /* may_yield */);
|
ClearBitmapHRClosure cl(this, _nextMarkBitMap, true /* may_yield */);
|
||||||
ParClearNextMarkBitmapTask task(&cl, parallel_marking_threads(), true);
|
g1h->heap_region_iterate(&cl);
|
||||||
_parallel_workers->run_task(&task);
|
|
||||||
|
|
||||||
// Clear the liveness counting data. If the marking has been aborted, the abort()
|
// Clear the liveness counting data. If the marking has been aborted, the abort()
|
||||||
// call already did that.
|
// call already did that.
|
||||||
|
@ -280,6 +280,7 @@ void ConcurrentMarkThread::run() {
|
|||||||
// We may have aborted just before the remark. Do not bother clearing the
|
// We may have aborted just before the remark. Do not bother clearing the
|
||||||
// bitmap then, as it has been done during mark abort.
|
// bitmap then, as it has been done during mark abort.
|
||||||
if (!cm()->has_aborted()) {
|
if (!cm()->has_aborted()) {
|
||||||
|
SuspendibleThreadSetJoiner sts;
|
||||||
_cm->clearNextBitmap();
|
_cm->clearNextBitmap();
|
||||||
} else {
|
} else {
|
||||||
assert(!G1VerifyBitmaps || _cm->nextMarkBitmapIsClear(), "Next mark bitmap must be clear");
|
assert(!G1VerifyBitmaps || _cm->nextMarkBitmapIsClear(), "Next mark bitmap must be clear");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user