changeset 58529:cc739b0abc44

8241067: Shenandoah: improve ShenandoahNMethod::has_cset_oops arguments Reviewed-by: shade Contributed-by: Aditya Mandaleeka <adityam@microsoft.com>
author adityam
date Tue, 24 Mar 2020 06:13:39 +0100
parents c0dd28941d68
children 98cfafb96a72
files src/hotspot/share/gc/shenandoah/shenandoahNMethod.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/gc/shenandoah/shenandoahNMethod.cpp	Mon Mar 23 23:18:42 2020 +0100
+++ b/src/hotspot/share/gc/shenandoah/shenandoahNMethod.cpp	Tue Mar 24 06:13:39 2020 +0100
@@ -57,8 +57,8 @@
   bool                  _has_cset_oops;
 
 public:
-  ShenandoahHasCSetOopClosure() :
-    _heap(ShenandoahHeap::heap()),
+  ShenandoahHasCSetOopClosure(ShenandoahHeap *heap) :
+    _heap(heap),
     _has_cset_oops(false) {
   }
 
@@ -79,7 +79,7 @@
 };
 
 bool ShenandoahNMethod::has_cset_oops(ShenandoahHeap *heap) {
-  ShenandoahHasCSetOopClosure cl;
+  ShenandoahHasCSetOopClosure cl(heap);
   oops_do(&cl);
   return cl.has_cset_oops();
 }