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