8287089: G1CollectedHeap::is_in_cset() can be const methods

Reviewed-by: ayang, kbarrett
This commit is contained in:
Thomas Schatzl 2022-05-25 14:40:14 +00:00
parent 81d7eafd91
commit e990fec195
2 changed files with 6 additions and 6 deletions

View File

@ -1044,9 +1044,9 @@ public:
// Return "TRUE" iff the given object address is within the collection
// set. Assumes that the reference points into the heap.
inline bool is_in_cset(const HeapRegion *hr);
inline bool is_in_cset(oop obj);
inline bool is_in_cset(HeapWord* addr);
inline bool is_in_cset(const HeapRegion *hr) const;
inline bool is_in_cset(oop obj) const;
inline bool is_in_cset(HeapWord* addr) const;
inline bool is_in_cset_or_humongous(const oop obj);

View File

@ -162,15 +162,15 @@ inline bool G1CollectedHeap::is_marked_next(oop obj) const {
return _cm->next_mark_bitmap()->is_marked(obj);
}
inline bool G1CollectedHeap::is_in_cset(oop obj) {
inline bool G1CollectedHeap::is_in_cset(oop obj) const {
return is_in_cset(cast_from_oop<HeapWord*>(obj));
}
inline bool G1CollectedHeap::is_in_cset(HeapWord* addr) {
inline bool G1CollectedHeap::is_in_cset(HeapWord* addr) const {
return _region_attr.is_in_cset(addr);
}
bool G1CollectedHeap::is_in_cset(const HeapRegion* hr) {
bool G1CollectedHeap::is_in_cset(const HeapRegion* hr) const {
return _region_attr.is_in_cset(hr);
}