186 inline bool G1CollectedHeap::isMarkedNext(oop obj) const {
187 return _cm->nextMarkBitMap()->isMarked((HeapWord *)obj);
188 }
189
190 // This is a fast test on whether a reference points into the
191 // collection set or not. Assume that the reference
192 // points into the heap.
193 inline bool G1CollectedHeap::is_in_cset(oop obj) {
194 bool ret = _in_cset_fast_test.is_in_cset((HeapWord*)obj);
195 // let's make sure the result is consistent with what the slower
196 // test returns
197 assert( ret || !obj_in_cs(obj), "sanity");
198 assert(!ret || obj_in_cs(obj), "sanity");
199 return ret;
200 }
201
202 bool G1CollectedHeap::is_in_cset_or_humongous(const oop obj) {
203 return _in_cset_fast_test.is_in_cset_or_humongous((HeapWord*)obj);
204 }
205
206 G1CollectedHeap::in_cset_state_t G1CollectedHeap::in_cset_state(const oop obj) {
207 return _in_cset_fast_test.at((HeapWord*)obj);
208 }
209
210 void G1CollectedHeap::register_humongous_region_with_in_cset_fast_test(uint index) {
211 _in_cset_fast_test.set_humongous(index);
212 }
213
214 #ifndef PRODUCT
215 // Support for G1EvacuationFailureALot
216
217 inline bool
218 G1CollectedHeap::evacuation_failure_alot_for_gc_type(bool gcs_are_young,
219 bool during_initial_mark,
220 bool during_marking) {
221 bool res = false;
222 if (during_marking) {
223 res |= G1EvacuationFailureALotDuringConcMark;
224 }
225 if (during_initial_mark) {
226 res |= G1EvacuationFailureALotDuringInitialMark;
|
186 inline bool G1CollectedHeap::isMarkedNext(oop obj) const {
187 return _cm->nextMarkBitMap()->isMarked((HeapWord *)obj);
188 }
189
190 // This is a fast test on whether a reference points into the
191 // collection set or not. Assume that the reference
192 // points into the heap.
193 inline bool G1CollectedHeap::is_in_cset(oop obj) {
194 bool ret = _in_cset_fast_test.is_in_cset((HeapWord*)obj);
195 // let's make sure the result is consistent with what the slower
196 // test returns
197 assert( ret || !obj_in_cs(obj), "sanity");
198 assert(!ret || obj_in_cs(obj), "sanity");
199 return ret;
200 }
201
202 bool G1CollectedHeap::is_in_cset_or_humongous(const oop obj) {
203 return _in_cset_fast_test.is_in_cset_or_humongous((HeapWord*)obj);
204 }
205
206 in_cset_state_t G1CollectedHeap::in_cset_state(const oop obj) {
207 return _in_cset_fast_test.at((HeapWord*)obj);
208 }
209
210 void G1CollectedHeap::register_humongous_region_with_in_cset_fast_test(uint index) {
211 _in_cset_fast_test.set_humongous(index);
212 }
213
214 #ifndef PRODUCT
215 // Support for G1EvacuationFailureALot
216
217 inline bool
218 G1CollectedHeap::evacuation_failure_alot_for_gc_type(bool gcs_are_young,
219 bool during_initial_mark,
220 bool during_marking) {
221 bool res = false;
222 if (during_marking) {
223 res |= G1EvacuationFailureALotDuringConcMark;
224 }
225 if (during_initial_mark) {
226 res |= G1EvacuationFailureALotDuringInitialMark;
|