Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
8241748: Shenandoah: inline MarkingContext TAMS methods
- Loading branch information
|
@@ -59,36 +59,6 @@ void ShenandoahMarkingContext::initialize_top_at_mark_start(ShenandoahHeapRegion |
|
|
_top_bitmaps[idx] = bottom; |
|
|
} |
|
|
|
|
|
void ShenandoahMarkingContext::capture_top_at_mark_start(ShenandoahHeapRegion *r) { |
|
|
size_t region_number = r->region_number(); |
|
|
HeapWord* old_tams = _top_at_mark_starts_base[region_number]; |
|
|
HeapWord* new_tams = r->top(); |
|
|
|
|
|
assert(new_tams >= old_tams, |
|
|
"Region " SIZE_FORMAT", TAMS updates should be monotonic: " PTR_FORMAT " -> " PTR_FORMAT, |
|
|
region_number, p2i(old_tams), p2i(new_tams)); |
|
|
assert(is_bitmap_clear_range(old_tams, new_tams), |
|
|
"Region " SIZE_FORMAT ", bitmap should be clear while adjusting TAMS: " PTR_FORMAT " -> " PTR_FORMAT, |
|
|
region_number, p2i(old_tams), p2i(new_tams)); |
|
|
|
|
|
_top_at_mark_starts_base[region_number] = new_tams; |
|
|
_top_bitmaps[region_number] = new_tams; |
|
|
} |
|
|
|
|
|
void ShenandoahMarkingContext::reset_top_at_mark_start(ShenandoahHeapRegion* r) { |
|
|
_top_at_mark_starts_base[r->region_number()] = r->bottom(); |
|
|
} |
|
|
|
|
|
HeapWord* ShenandoahMarkingContext::top_at_mark_start(ShenandoahHeapRegion* r) const { |
|
|
return _top_at_mark_starts_base[r->region_number()]; |
|
|
} |
|
|
|
|
|
void ShenandoahMarkingContext::reset_top_bitmap(ShenandoahHeapRegion* r) { |
|
|
assert(is_bitmap_clear_range(r->bottom(), r->end()), |
|
|
"Region " SIZE_FORMAT " should have no marks in bitmap", r->region_number()); |
|
|
_top_bitmaps[r->region_number()] = r->bottom(); |
|
|
} |
|
|
|
|
|
void ShenandoahMarkingContext::clear_bitmap(ShenandoahHeapRegion* r) { |
|
|
HeapWord* bottom = r->bottom(); |
|
|
HeapWord* top_bitmap = _top_bitmaps[r->region_number()]; |
|
|
|
@@ -60,12 +60,12 @@ class ShenandoahMarkingContext : public CHeapObj<mtGC> { |
|
|
|
|
|
inline MarkBitMap* mark_bit_map(); |
|
|
|
|
|
HeapWord* top_at_mark_start(ShenandoahHeapRegion* r) const; |
|
|
void capture_top_at_mark_start(ShenandoahHeapRegion* r); |
|
|
void reset_top_at_mark_start(ShenandoahHeapRegion* r); |
|
|
inline HeapWord* top_at_mark_start(ShenandoahHeapRegion* r) const; |
|
|
inline void capture_top_at_mark_start(ShenandoahHeapRegion* r); |
|
|
inline void reset_top_at_mark_start(ShenandoahHeapRegion* r); |
|
|
void initialize_top_at_mark_start(ShenandoahHeapRegion* r); |
|
|
|
|
|
void reset_top_bitmap(ShenandoahHeapRegion *r); |
|
|
inline void reset_top_bitmap(ShenandoahHeapRegion *r); |
|
|
void clear_bitmap(ShenandoahHeapRegion *r); |
|
|
|
|
|
bool is_bitmap_clear() const; |
|
|
|
@@ -52,4 +52,34 @@ inline bool ShenandoahMarkingContext::allocated_after_mark_start(HeapWord* addr) |
|
|
return alloc_after_mark_start; |
|
|
} |
|
|
|
|
|
inline void ShenandoahMarkingContext::capture_top_at_mark_start(ShenandoahHeapRegion *r) { |
|
|
size_t region_number = r->region_number(); |
|
|
HeapWord* old_tams = _top_at_mark_starts_base[region_number]; |
|
|
HeapWord* new_tams = r->top(); |
|
|
|
|
|
assert(new_tams >= old_tams, |
|
|
"Region " SIZE_FORMAT", TAMS updates should be monotonic: " PTR_FORMAT " -> " PTR_FORMAT, |
|
|
region_number, p2i(old_tams), p2i(new_tams)); |
|
|
assert(is_bitmap_clear_range(old_tams, new_tams), |
|
|
"Region " SIZE_FORMAT ", bitmap should be clear while adjusting TAMS: " PTR_FORMAT " -> " PTR_FORMAT, |
|
|
region_number, p2i(old_tams), p2i(new_tams)); |
|
|
|
|
|
_top_at_mark_starts_base[region_number] = new_tams; |
|
|
_top_bitmaps[region_number] = new_tams; |
|
|
} |
|
|
|
|
|
inline void ShenandoahMarkingContext::reset_top_at_mark_start(ShenandoahHeapRegion* r) { |
|
|
_top_at_mark_starts_base[r->region_number()] = r->bottom(); |
|
|
} |
|
|
|
|
|
inline HeapWord* ShenandoahMarkingContext::top_at_mark_start(ShenandoahHeapRegion* r) const { |
|
|
return _top_at_mark_starts_base[r->region_number()]; |
|
|
} |
|
|
|
|
|
inline void ShenandoahMarkingContext::reset_top_bitmap(ShenandoahHeapRegion* r) { |
|
|
assert(is_bitmap_clear_range(r->bottom(), r->end()), |
|
|
"Region " SIZE_FORMAT " should have no marks in bitmap", r->region_number()); |
|
|
_top_bitmaps[r->region_number()] = r->bottom(); |
|
|
} |
|
|
|
|
|
#endif // SHARE_GC_SHENANDOAH_SHENANDOAHMARKINGCONTEXT_INLINE_HPP |