< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp

Print this page




  29 #include "gc/shared/threadLocalAllocBuffer.inline.hpp"
  30 #include "gc/shared/suspendibleThreadSet.hpp"
  31 #include "gc/shenandoah/shenandoahAsserts.hpp"
  32 #include "gc/shenandoah/shenandoahBarrierSet.inline.hpp"
  33 #include "gc/shenandoah/shenandoahBrooksPointer.inline.hpp"
  34 #include "gc/shenandoah/shenandoahCollectionSet.inline.hpp"
  35 #include "gc/shenandoah/shenandoahWorkGroup.hpp"
  36 #include "gc/shenandoah/shenandoahHeap.hpp"
  37 #include "gc/shenandoah/shenandoahHeapRegionSet.inline.hpp"
  38 #include "gc/shenandoah/shenandoahHeapRegion.inline.hpp"
  39 #include "gc/shenandoah/shenandoahControlThread.hpp"
  40 #include "gc/shenandoah/shenandoahMarkingContext.inline.hpp"
  41 #include "gc/shenandoah/shenandoahThreadLocalData.hpp"
  42 #include "oops/oop.inline.hpp"
  43 #include "runtime/atomic.hpp"
  44 #include "runtime/prefetch.inline.hpp"
  45 #include "runtime/thread.hpp"
  46 #include "utilities/copy.hpp"
  47 #include "utilities/globalDefinitions.hpp"
  48 











  49 
  50 inline ShenandoahHeapRegion* ShenandoahRegionIterator::next() {
  51   size_t new_index = Atomic::add((size_t) 1, &_index);
  52   // get_region() provides the bounds-check and returns NULL on OOB.
  53   return _heap->get_region(new_index - 1);
  54 }
  55 
  56 inline bool ShenandoahHeap::has_forwarded_objects() const {
  57   return _gc_state.is_set(HAS_FORWARDED);
  58 }
  59 
  60 inline WorkGang* ShenandoahHeap::workers() const {
  61   return _workers;
  62 }
  63 
  64 inline WorkGang* ShenandoahHeap::get_safepoint_workers() {
  65   return _safepoint_workers;
  66 }
  67 
  68 inline size_t ShenandoahHeap::heap_region_index_containing(const void* addr) const {




  29 #include "gc/shared/threadLocalAllocBuffer.inline.hpp"
  30 #include "gc/shared/suspendibleThreadSet.hpp"
  31 #include "gc/shenandoah/shenandoahAsserts.hpp"
  32 #include "gc/shenandoah/shenandoahBarrierSet.inline.hpp"
  33 #include "gc/shenandoah/shenandoahBrooksPointer.inline.hpp"
  34 #include "gc/shenandoah/shenandoahCollectionSet.inline.hpp"
  35 #include "gc/shenandoah/shenandoahWorkGroup.hpp"
  36 #include "gc/shenandoah/shenandoahHeap.hpp"
  37 #include "gc/shenandoah/shenandoahHeapRegionSet.inline.hpp"
  38 #include "gc/shenandoah/shenandoahHeapRegion.inline.hpp"
  39 #include "gc/shenandoah/shenandoahControlThread.hpp"
  40 #include "gc/shenandoah/shenandoahMarkingContext.inline.hpp"
  41 #include "gc/shenandoah/shenandoahThreadLocalData.hpp"
  42 #include "oops/oop.inline.hpp"
  43 #include "runtime/atomic.hpp"
  44 #include "runtime/prefetch.inline.hpp"
  45 #include "runtime/thread.hpp"
  46 #include "utilities/copy.hpp"
  47 #include "utilities/globalDefinitions.hpp"
  48 
  49 template <class T>
  50 void ShenandoahUpdateRefsClosure::do_oop_work(T* p) {
  51   T o = RawAccess<>::oop_load(p);
  52   if (!CompressedOops::is_null(o)) {
  53     oop obj = CompressedOops::decode_not_null(o);
  54     _heap->update_with_forwarded_not_null(p, obj);
  55   }
  56 }
  57 
  58 void ShenandoahUpdateRefsClosure::do_oop(oop* p)       { do_oop_work(p); }
  59 void ShenandoahUpdateRefsClosure::do_oop(narrowOop* p) { do_oop_work(p); }
  60 
  61 inline ShenandoahHeapRegion* ShenandoahRegionIterator::next() {
  62   size_t new_index = Atomic::add((size_t) 1, &_index);
  63   // get_region() provides the bounds-check and returns NULL on OOB.
  64   return _heap->get_region(new_index - 1);
  65 }
  66 
  67 inline bool ShenandoahHeap::has_forwarded_objects() const {
  68   return _gc_state.is_set(HAS_FORWARDED);
  69 }
  70 
  71 inline WorkGang* ShenandoahHeap::workers() const {
  72   return _workers;
  73 }
  74 
  75 inline WorkGang* ShenandoahHeap::get_safepoint_workers() {
  76   return _safepoint_workers;
  77 }
  78 
  79 inline size_t ShenandoahHeap::heap_region_index_containing(const void* addr) const {


< prev index next >