From 8db994854fca64f2c6b09946667b88d8bca60028 Mon Sep 17 00:00:00 2001 From: Zhengyu Gu Date: Thu, 23 Apr 2020 10:14:42 -0400 Subject: [PATCH] 8243478: Shenandoah: avoid implicit worker_id = 0 Reviewed-by: shade --- src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp | 6 +++--- .../share/gc/shenandoah/shenandoahRootProcessor.hpp | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp index 95115ada568..c59db64f3fa 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp @@ -1655,13 +1655,13 @@ public: // vm_roots and weak_roots are OopStorage backed roots, concurrent iteration // may race against OopStorage::release() calls. ShenandoahEvacUpdateOopStorageRootsClosure cl; - _vm_roots.oops_do(&cl); + _vm_roots.oops_do(&cl, worker_id); } { ShenandoahEvacuateUpdateRootsClosure<> cl; CLDToOopClosure clds(&cl, ClassLoaderData::_claim_strong); - _cld_roots.cld_do(&clds); + _cld_roots.cld_do(&clds, worker_id); } { @@ -1811,7 +1811,7 @@ public: // Applies ShenandoahIsCLDAlive closure to CLDs, native barrier will either NULL the // CLD's holder or evacuate it. ShenandoahIsCLDAliveClosure is_cld_alive; - _cld_roots.cld_do(&is_cld_alive); + _cld_roots.cld_do(&is_cld_alive, worker_id); // Applies ShenandoahIsNMethodAliveClosure to registered nmethods. // The closure calls nmethod->is_unloading(). The is_unloading diff --git a/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.hpp b/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.hpp index 5baa96480c5..43558a5660e 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.hpp @@ -137,7 +137,7 @@ public: ShenandoahWeakRoots(); template - void oops_do(Closure* cl, uint worker_id = 0); + void oops_do(Closure* cl, uint worker_id); }; template <> @@ -151,7 +151,7 @@ public: ShenandoahWeakRoots(); template - void oops_do(Closure* cl, uint worker_id = 0); + void oops_do(Closure* cl, uint worker_id); template void weak_oops_do(IsAliveClosure* is_alive, KeepAliveClosure* keep_alive, uint worker_id); @@ -167,7 +167,7 @@ public: ShenandoahVMRoots(); template - void oops_do(T* cl, uint worker_id = 0); + void oops_do(T* cl, uint worker_id); }; class ShenandoahThreadRoots { @@ -214,8 +214,8 @@ public: ShenandoahClassLoaderDataRoots(); ~ShenandoahClassLoaderDataRoots(); - void always_strong_cld_do(CLDClosure* clds, uint worker_id = 0); - void cld_do(CLDClosure* clds, uint worker_id = 0); + void always_strong_cld_do(CLDClosure* clds, uint worker_id); + void cld_do(CLDClosure* clds, uint worker_id); }; class ShenandoahRootProcessor : public StackObj {