< prev index next >

src/share/vm/gc/g1/g1ParScanThreadState.cpp

Print this page
rev 8978 : imported patch remove_err_msg

*** 95,122 **** #ifdef ASSERT bool G1ParScanThreadState::verify_ref(narrowOop* ref) const { assert(ref != NULL, "invariant"); assert(UseCompressedOops, "sanity"); ! assert(!has_partial_array_mask(ref), err_msg("ref=" PTR_FORMAT, p2i(ref))); oop p = oopDesc::load_decode_heap_oop(ref); assert(_g1h->is_in_g1_reserved(p), ! err_msg("ref=" PTR_FORMAT " p=" PTR_FORMAT, p2i(ref), p2i(p))); return true; } bool G1ParScanThreadState::verify_ref(oop* ref) const { assert(ref != NULL, "invariant"); if (has_partial_array_mask(ref)) { // Must be in the collection set--it's already been copied. oop p = clear_partial_array_mask(ref); assert(_g1h->obj_in_cs(p), ! err_msg("ref=" PTR_FORMAT " p=" PTR_FORMAT, p2i(ref), p2i(p))); } else { oop p = oopDesc::load_decode_heap_oop(ref); assert(_g1h->is_in_g1_reserved(p), ! err_msg("ref=" PTR_FORMAT " p=" PTR_FORMAT, p2i(ref), p2i(p))); } return true; } bool G1ParScanThreadState::verify_task(StarTask ref) const { --- 95,122 ---- #ifdef ASSERT bool G1ParScanThreadState::verify_ref(narrowOop* ref) const { assert(ref != NULL, "invariant"); assert(UseCompressedOops, "sanity"); ! assert(!has_partial_array_mask(ref), "ref=" PTR_FORMAT, p2i(ref)); oop p = oopDesc::load_decode_heap_oop(ref); assert(_g1h->is_in_g1_reserved(p), ! "ref=" PTR_FORMAT " p=" PTR_FORMAT, p2i(ref), p2i(p)); return true; } bool G1ParScanThreadState::verify_ref(oop* ref) const { assert(ref != NULL, "invariant"); if (has_partial_array_mask(ref)) { // Must be in the collection set--it's already been copied. oop p = clear_partial_array_mask(ref); assert(_g1h->obj_in_cs(p), ! "ref=" PTR_FORMAT " p=" PTR_FORMAT, p2i(ref), p2i(p)); } else { oop p = oopDesc::load_decode_heap_oop(ref); assert(_g1h->is_in_g1_reserved(p), ! "ref=" PTR_FORMAT " p=" PTR_FORMAT, p2i(ref), p2i(p)); } return true; } bool G1ParScanThreadState::verify_task(StarTask ref) const {
*** 145,156 **** HeapWord* G1ParScanThreadState::allocate_in_next_plab(InCSetState const state, InCSetState* dest, size_t word_sz, AllocationContext_t const context, bool previous_plab_refill_failed) { ! assert(state.is_in_cset_or_humongous(), err_msg("Unexpected state: " CSETSTATE_FORMAT, state.value())); ! assert(dest->is_in_cset_or_humongous(), err_msg("Unexpected dest: " CSETSTATE_FORMAT, dest->value())); // Right now we only have two types of regions (young / old) so // let's keep the logic here simple. We can generalize it when necessary. if (dest->is_young()) { bool plab_refill_in_old_failed = false; --- 145,156 ---- HeapWord* G1ParScanThreadState::allocate_in_next_plab(InCSetState const state, InCSetState* dest, size_t word_sz, AllocationContext_t const context, bool previous_plab_refill_failed) { ! assert(state.is_in_cset_or_humongous(), "Unexpected state: " CSETSTATE_FORMAT, state.value()); ! assert(dest->is_in_cset_or_humongous(), "Unexpected dest: " CSETSTATE_FORMAT, dest->value()); // Right now we only have two types of regions (young / old) so // let's keep the logic here simple. We can generalize it when necessary. if (dest->is_young()) { bool plab_refill_in_old_failed = false;
*** 175,185 **** _old_gen_is_full = plab_refill_in_old_failed; } return obj_ptr; } else { _old_gen_is_full = previous_plab_refill_failed; ! assert(dest->is_old(), err_msg("Unexpected dest: " CSETSTATE_FORMAT, dest->value())); // no other space to try. return NULL; } } --- 175,185 ---- _old_gen_is_full = plab_refill_in_old_failed; } return obj_ptr; } else { _old_gen_is_full = previous_plab_refill_failed; ! assert(dest->is_old(), "Unexpected dest: " CSETSTATE_FORMAT, dest->value()); // no other space to try. return NULL; } }
*** 357,368 **** } _flushed = true; } oop G1ParScanThreadState::handle_evacuation_failure_par(oop old, markOop m) { ! assert(_g1h->obj_in_cs(old), ! err_msg("Object " PTR_FORMAT " should be in the CSet", p2i(old))); oop forward_ptr = old->forward_to_atomic(old); if (forward_ptr == NULL) { // Forward-to-self succeeded. We are the "owner" of the object. HeapRegion* r = _g1h->heap_region_containing(old); --- 357,367 ---- } _flushed = true; } oop G1ParScanThreadState::handle_evacuation_failure_par(oop old, markOop m) { ! assert(_g1h->obj_in_cs(old), "Object " PTR_FORMAT " should be in the CSet", p2i(old)); oop forward_ptr = old->forward_to_atomic(old); if (forward_ptr == NULL) { // Forward-to-self succeeded. We are the "owner" of the object. HeapRegion* r = _g1h->heap_region_containing(old);
*** 381,392 **** } else { // Forward-to-self failed. Either someone else managed to allocate // space for this object (old != forward_ptr) or they beat us in // self-forwarding it (old == forward_ptr). assert(old == forward_ptr || !_g1h->obj_in_cs(forward_ptr), ! err_msg("Object " PTR_FORMAT " forwarded to: " PTR_FORMAT " " "should not be in the CSet", ! p2i(old), p2i(forward_ptr))); return forward_ptr; } } --- 380,391 ---- } else { // Forward-to-self failed. Either someone else managed to allocate // space for this object (old != forward_ptr) or they beat us in // self-forwarding it (old == forward_ptr). assert(old == forward_ptr || !_g1h->obj_in_cs(forward_ptr), ! "Object " PTR_FORMAT " forwarded to: " PTR_FORMAT " " "should not be in the CSet", ! p2i(old), p2i(forward_ptr)); return forward_ptr; } }
< prev index next >