RFR: Missing OOMScope in ShenandoahFixRootsTask

Aleksey Shipilev shade at redhat.com
Tue Mar 13 11:51:11 UTC 2018


sh/jdk8u identified a missing OOM scope in ShenandoahFixRootsTask, see:

class ShenandoahEvacuateUpdateRootsTask ... {
  void work(uint worker_id) {
    ShenandoahEvacOOMScope oom_evac_scope;  // <--- we have it here

    ...
    _rp->process_evacuate_roots(&cl, NULL, worker_id);
};

class ShenandoahFixRootsTask ... {
  void work(uint worker_id) {
    // <-- but not here!
    ...
    _rp->process_evacuate_roots(&cl, &blobsCl, worker_id);
  }
};

Fix:

diff -r 2742d73decc4 src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp	Mon Mar 12 19:38:36 2018 +0100
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp	Tue Mar 13 12:48:32 2018 +0100
@@ -1073,6 +1073,7 @@
   }

   void work(uint worker_id) {
+    ShenandoahEvacOOMScope oom_evac_scope;
     ShenandoahUpdateRefsClosure cl;
     MarkingCodeBlobClosure blobsCl(&cl, CodeBlobToOopClosure::FixRelocations);


Testing: hotspot_gc_shenandoah, sh/jdk8u

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list