< prev index next >
src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.cpp
Print this page
rev 48675 : Roots verification should take the special roots first
*** 70,85 ****
op->_safepoint_cleanup_done = true;
}
}
void ShenandoahRootProcessor::process_all_roots_slow(OopClosure* oops) {
- ShenandoahAlwaysTrueClosure always_true;
-
CLDToOopClosure clds(oops);
CodeBlobToOopClosure blobs(oops, !CodeBlobToOopClosure::FixRelocations);
- Threads::possibly_parallel_oops_do(false, oops, &blobs);
CodeCache::blobs_do(&blobs);
ClassLoaderDataGraph::cld_do(&clds);
Universe::oops_do(oops);
Management::oops_do(oops);
JvmtiExport::oops_do(oops);
--- 70,82 ----
*** 90,99 ****
--- 87,101 ----
StringTable::oops_do(oops);
if (ShenandoahStringDedup::is_enabled()) {
ShenandoahStringDedup::parallel_oops_do(oops);
}
+
+ // Do thread roots the last. This allows verification code to find
+ // any broken objects from those special roots first, not the accidental
+ // dangling reference from the thread root.
+ Threads::possibly_parallel_oops_do(false, oops, &blobs);
}
void ShenandoahRootProcessor::process_strong_roots(OopClosure* oops,
OopClosure* weak_oops,
CLDClosure* clds,
< prev index next >