< prev index next >

src/share/vm/prims/jvmtiTagMap.cpp

Print this page
rev 14282 : Factor out keep-alive barrier from usual pre-barrier implementations.

@@ -49,11 +49,10 @@
 #include "runtime/vmThread.hpp"
 #include "runtime/vm_operations.hpp"
 #include "services/serviceUtil.hpp"
 #include "utilities/macros.hpp"
 #if INCLUDE_ALL_GCS
-#include "gc/g1/g1SATBCardTableModRefBS.hpp"
 #include "gc/parallel/parallelScavengeHeap.hpp"
 #endif // INCLUDE_ALL_GCS
 
 // JvmtiTagHashmapEntry
 //

@@ -1534,16 +1533,14 @@
     for (int i=0; i<_tag_count; i++) {
       if (_tags[i] == entry->tag()) {
         oop o = entry->object();
         assert(o != NULL && Universe::heap()->is_in_reserved(o), "sanity check");
 #if INCLUDE_ALL_GCS
-        if (UseG1GC || UseShenandoahGC) {
           // The reference in this tag map could be the only (implicitly weak)
           // reference to that object. If we hand it out, we need to keep it live wrt
           // SATB marking similar to other j.l.ref.Reference referents.
-          G1SATBCardTableModRefBS::enqueue(o);
-        }
+        oopDesc::bs()->keep_alive_barrier(o);
 #endif
         jobject ref = JNIHandles::make_local(JavaThread::current(), o);
         _object_results->append(ref);
         _tag_results->append((uint64_t)entry->tag());
       }
< prev index next >