< prev index next >

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

Print this page

36   return _cset_map[region_idx] == 1;
37 }
38 
39 bool ShenandoahCollectionSet::is_in(ShenandoahHeapRegion* r) const {
40   return is_in(r->index());
41 }
42 
43 bool ShenandoahCollectionSet::is_in(oop p) const {
44   shenandoah_assert_in_heap_or_null(nullptr, p);
45   return is_in_loc(cast_from_oop<void*>(p));
46 }
47 
48 bool ShenandoahCollectionSet::is_in_loc(void* p) const {
49   assert(p == nullptr || _heap->is_in(p), "Must be in the heap");
50   uintx index = ((uintx) p) >> _region_size_bytes_shift;
51   // no need to subtract the bottom of the heap from p,
52   // _biased_cset_map is biased
53   return _biased_cset_map[index] == 1;
54 }
55 




































56 #endif // SHARE_GC_SHENANDOAH_SHENANDOAHCOLLECTIONSET_INLINE_HPP

36   return _cset_map[region_idx] == 1;
37 }
38 
39 bool ShenandoahCollectionSet::is_in(ShenandoahHeapRegion* r) const {
40   return is_in(r->index());
41 }
42 
43 bool ShenandoahCollectionSet::is_in(oop p) const {
44   shenandoah_assert_in_heap_or_null(nullptr, p);
45   return is_in_loc(cast_from_oop<void*>(p));
46 }
47 
48 bool ShenandoahCollectionSet::is_in_loc(void* p) const {
49   assert(p == nullptr || _heap->is_in(p), "Must be in the heap");
50   uintx index = ((uintx) p) >> _region_size_bytes_shift;
51   // no need to subtract the bottom of the heap from p,
52   // _biased_cset_map is biased
53   return _biased_cset_map[index] == 1;
54 }
55 
56 void ShenandoahCollectionSet::set_immediate_trash(size_t immediate_trash) {
57   _immediate_trash = immediate_trash;
58 }
59 
60 size_t ShenandoahCollectionSet::get_immediate_trash() {
61   return _immediate_trash;
62 }
63 
64 size_t ShenandoahCollectionSet::get_old_bytes_reserved_for_evacuation() {
65   return _old_bytes_to_evacuate;
66 }
67 
68 size_t ShenandoahCollectionSet::get_young_bytes_reserved_for_evacuation() {
69   return _young_bytes_to_evacuate - _young_bytes_to_promote;
70 }
71 
72 size_t ShenandoahCollectionSet::get_young_bytes_to_be_promoted() {
73   return _young_bytes_to_promote;
74 }
75 
76 size_t ShenandoahCollectionSet::get_bytes_reserved_for_evacuation() {
77   return _young_bytes_to_evacuate + _old_bytes_to_evacuate;
78 }
79 
80 size_t ShenandoahCollectionSet::get_old_region_count() {
81   return _old_region_count;
82 }
83 
84 size_t ShenandoahCollectionSet::get_young_region_count() {
85   return _young_region_count;
86 }
87 
88 size_t ShenandoahCollectionSet::get_old_garbage() {
89   return _old_garbage;
90 }
91 
92 #endif // SHARE_GC_SHENANDOAH_SHENANDOAHCOLLECTIONSET_INLINE_HPP
< prev index next >