mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8253434: Shenandoah: Cleanup ShenandoahRootScanner
Reviewed-by: rkennke
This commit is contained in:
parent
8c02bdbf13
commit
3d5fea1f07
3 changed files with 7 additions and 42 deletions
|
@ -168,30 +168,13 @@ ShenandoahRootScanner::~ShenandoahRootScanner() {
|
|||
}
|
||||
|
||||
void ShenandoahRootScanner::roots_do(uint worker_id, OopClosure* oops) {
|
||||
CLDToOopClosure clds_cl(oops, ClassLoaderData::_claim_strong);
|
||||
MarkingCodeBlobClosure blobs_cl(oops, !CodeBlobToOopClosure::FixRelocations);
|
||||
roots_do(worker_id, oops, &clds_cl, &blobs_cl);
|
||||
roots_do(worker_id, oops, &blobs_cl);
|
||||
}
|
||||
|
||||
void ShenandoahRootScanner::strong_roots_do(uint worker_id, OopClosure* oops) {
|
||||
CLDToOopClosure clds_cl(oops, ClassLoaderData::_claim_strong);
|
||||
MarkingCodeBlobClosure blobs_cl(oops, !CodeBlobToOopClosure::FixRelocations);
|
||||
strong_roots_do(worker_id, oops, &clds_cl, &blobs_cl);
|
||||
}
|
||||
void ShenandoahRootScanner::roots_do(uint worker_id, OopClosure* oops, CodeBlobClosure* code, ThreadClosure *tc) {
|
||||
assert(ShenandoahSafepoint::is_at_shenandoah_safepoint(), "Must be at a safepoint");
|
||||
|
||||
void ShenandoahRootScanner::roots_do(uint worker_id, OopClosure* oops, CLDClosure* clds, CodeBlobClosure* code, ThreadClosure *tc) {
|
||||
assert(!ShenandoahSafepoint::is_at_shenandoah_safepoint() ||
|
||||
!ShenandoahHeap::heap()->unload_classes(),
|
||||
"Expect class unloading when Shenandoah cycle is running");
|
||||
assert(clds != NULL, "Only possible with CLD closure");
|
||||
|
||||
ShenandoahParallelOopsDoThreadClosure tc_cl(oops, code, tc);
|
||||
ResourceMark rm;
|
||||
_thread_roots.threads_do(&tc_cl, worker_id);
|
||||
}
|
||||
|
||||
void ShenandoahRootScanner::strong_roots_do(uint worker_id, OopClosure* oops, CLDClosure* clds, CodeBlobClosure* code, ThreadClosure* tc) {
|
||||
assert(ShenandoahHeap::heap()->unload_classes(), "Should be used during class unloading");
|
||||
ShenandoahParallelOopsDoThreadClosure tc_cl(oops, code, tc);
|
||||
ResourceMark rm;
|
||||
_thread_roots.threads_do(&tc_cl, worker_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue