< prev index next >
src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp
Print this page
rev 59476 : 8245880: Shenandoah: check class unloading flag early in concurrent code root scan
@@ -388,13 +388,16 @@
_task_queues->register_queue(i, task_queue);
}
}
void ShenandoahConcurrentMark::concurrent_scan_code_roots(uint worker_id, ReferenceProcessor* rp) {
+ if (_heap->unload_classes()) {
+ return;
+ }
+
if (claim_codecache()) {
ShenandoahObjToScanQueue* q = task_queues()->queue(worker_id);
- if (!_heap->unload_classes()) {
MutexLocker mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
// TODO: We can not honor StringDeduplication here, due to lock ranking
// inversion. So, we may miss some deduplication candidates.
if (_heap->has_forwarded_objects()) {
ShenandoahMarkResolveRefsClosure cl(q, rp);
@@ -404,11 +407,10 @@
ShenandoahMarkRefsClosure cl(q, rp);
CodeBlobToOopClosure blobs(&cl, !CodeBlobToOopClosure::FixRelocations);
CodeCache::blobs_do(&blobs);
}
}
- }
}
void ShenandoahConcurrentMark::mark_from_roots() {
WorkGang* workers = _heap->workers();
uint nworkers = workers->active_workers();
< prev index next >