< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahRuntime.cpp

Print this page
rev 54386 : 8221766: Load-reference barriers for Shenandoah


  38   bs->write_ref_array_pre(dst, length, false);
  39 }
  40 
  41 void ShenandoahRuntime::write_ref_array_post_entry(HeapWord* dst, size_t length) {
  42   ShenandoahBarrierSet *bs = ShenandoahBarrierSet::barrier_set();
  43   bs->ShenandoahBarrierSet::write_ref_array(dst, length);
  44 }
  45 
  46 // Shenandoah pre write barrier slowpath
  47 JRT_LEAF(void, ShenandoahRuntime::write_ref_field_pre_entry(oopDesc* orig, JavaThread *thread))
  48   if (orig == NULL) {
  49     assert(false, "should be optimized out");
  50     return;
  51   }
  52   shenandoah_assert_correct(NULL, orig);
  53   // store the original value that was in the field reference
  54   assert(ShenandoahThreadLocalData::satb_mark_queue(thread).is_active(), "Shouldn't be here otherwise");
  55   ShenandoahThreadLocalData::satb_mark_queue(thread).enqueue_known_active(orig);
  56 JRT_END
  57 
  58 JRT_LEAF(oopDesc*, ShenandoahRuntime::write_barrier_JRT(oopDesc* src))
  59   oop result = ShenandoahBarrierSet::barrier_set()->write_barrier_mutator(src);
  60   return (oopDesc*) result;
  61 JRT_END
  62 
  63 // Shenandoah clone barrier: makes sure that references point to to-space
  64 // in cloned objects.
  65 JRT_LEAF(void, ShenandoahRuntime::shenandoah_clone_barrier(oopDesc* obj))
  66   ShenandoahBarrierSet::barrier_set()->write_region(MemRegion((HeapWord*) obj, obj->size()));
  67 JRT_END


  38   bs->write_ref_array_pre(dst, length, false);
  39 }
  40 
  41 void ShenandoahRuntime::write_ref_array_post_entry(HeapWord* dst, size_t length) {
  42   ShenandoahBarrierSet *bs = ShenandoahBarrierSet::barrier_set();
  43   bs->ShenandoahBarrierSet::write_ref_array(dst, length);
  44 }
  45 
  46 // Shenandoah pre write barrier slowpath
  47 JRT_LEAF(void, ShenandoahRuntime::write_ref_field_pre_entry(oopDesc* orig, JavaThread *thread))
  48   if (orig == NULL) {
  49     assert(false, "should be optimized out");
  50     return;
  51   }
  52   shenandoah_assert_correct(NULL, orig);
  53   // store the original value that was in the field reference
  54   assert(ShenandoahThreadLocalData::satb_mark_queue(thread).is_active(), "Shouldn't be here otherwise");
  55   ShenandoahThreadLocalData::satb_mark_queue(thread).enqueue_known_active(orig);
  56 JRT_END
  57 
  58 JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_JRT(oopDesc* src))
  59   oop result = ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator(src);
  60   return (oopDesc*) result;
  61 JRT_END
  62 
  63 // Shenandoah clone barrier: makes sure that references point to to-space
  64 // in cloned objects.
  65 JRT_LEAF(void, ShenandoahRuntime::shenandoah_clone_barrier(oopDesc* obj))
  66   ShenandoahBarrierSet::barrier_set()->write_region(MemRegion((HeapWord*) obj, obj->size()));
  67 JRT_END
< prev index next >