Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8276887: G1: Move precleaning to Concurrent Mark From Roots subphase #6327

wants to merge 6 commits into from
Changes from 1 commit
File filter

Filter by extension

Filter by extension

Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -919,13 +919,14 @@ class G1CMConcurrentMarkingTask : public WorkerTask {
} while (!_cm->has_aborted() && task->has_aborted());

void preclean() {
void preclean(uint worker_id) {
BarrierEnqueueDiscoveredFieldClosure enqueue;
G1PrecleanYieldClosure yield_cl(_cm);
void work(uint worker_id) {
@@ -945,7 +946,7 @@ class G1CMConcurrentMarkingTask : public WorkerTask {

// Marking is complete; preclean non-strong references
if (G1UseReferencePrecleaning) {
guarantee(!task->has_aborted() || _cm->has_aborted(), "invariant");
@@ -1067,11 +1067,10 @@ bool ReferenceProcessor::has_discovered_references() {
void ReferenceProcessor::preclean_discovered_references(BoolObjectClosure* is_alive,
EnqueueDiscoveredFieldClosure* enqueue,
YieldClosure* yield,
GCTimer* gc_timer) {
GCTimer* gc_timer,
uint worker_id) {
Ticks preclean_start = Ticks::now();

uint worker_id = WorkerThread::current()->id();

size_t soft_count = _discoveredSoftRefs[worker_id].length();
size_t weak_count = _discoveredWeakRefs[worker_id].length();
size_t final_count = _discoveredFinalRefs[worker_id].length();
@@ -318,7 +318,8 @@ class ReferenceProcessor : public ReferenceDiscoverer {
void preclean_discovered_references(BoolObjectClosure* is_alive,
EnqueueDiscoveredFieldClosure* enqueue,
YieldClosure* yield,
GCTimer* gc_timer);
GCTimer* gc_timer,
uint worker_id);

// Returns the name of the discovered reference list