[8] RFR: Fix naked heap loads in HeapDumper

Aleksey Shipilev shade at redhat.com
Mon Nov 4 10:36:34 UTC 2019


Trivial thing for sh/jdk8, follows what JDK-8199328 is doing:

diff -r a56f86355f8d src/share/vm/services/heapDumper.cpp
--- a/src/share/vm/services/heapDumper.cpp      Thu Oct 31 12:50:02 2019 +0100
+++ b/src/share/vm/services/heapDumper.cpp      Mon Nov 04 11:35:57 2019 +0100
@@ -720,10 +720,16 @@
         o = oopDesc::load_decode_heap_oop((narrowOop*)addr);
       } else {
         o = oopDesc::load_decode_heap_oop((oop*)addr);
       }

+#if INCLUDE_ALL_GCS
+      if (UseShenandoahGC) {
+        o = ShenandoahBarrierSet::barrier_set()->load_reference_barrier(o);
+      }
+#endif
+
       // reflection and sun.misc.Unsafe classes may have a reference to a
       // Klass* so filter it out.
       assert(o->is_oop_or_null(), "should always be an oop");
       writer->write_objectID(o);
       break;

Testing: hotspot_gc_shenandoah {fastdebug, release}

-- 
Thanks,
-Aleksey



More information about the shenandoah-dev mailing list