< prev index next >

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

Print this page

        

*** 397,407 **** // accidentally add something to the mark stack during GC, it // will be a correctness issue so it's better if we crash. we'll // only check this once per GC anyway, so it won't be a performance // issue in any way. guarantee(_saved_index == _index, ! err_msg("saved index: %d index: %d", _saved_index, _index)); _saved_index = -1; } CMRootRegions::CMRootRegions() : _young_list(NULL), _cm(NULL), _scan_in_progress(false), --- 397,407 ---- // accidentally add something to the mark stack during GC, it // will be a correctness issue so it's better if we crash. we'll // only check this once per GC anyway, so it won't be a performance // issue in any way. guarantee(_saved_index == _index, ! "saved index: %d index: %d", _saved_index, _index); _saved_index = -1; } CMRootRegions::CMRootRegions() : _young_list(NULL), _cm(NULL), _scan_in_progress(false),
*** 792,803 **** // We currently assume that the concurrent flag has been set to // false before we start remark. At this point we should also be // in a STW phase. assert(!concurrent_marking_in_progress(), "invariant"); assert(out_of_regions(), ! err_msg("only way to get here: _finger: " PTR_FORMAT ", _heap_end: " PTR_FORMAT, ! p2i(_finger), p2i(_heap_end))); } } void ConcurrentMark::set_non_marking_state() { // We set the global marking state to some default values when we're --- 792,803 ---- // We currently assume that the concurrent flag has been set to // false before we start remark. At this point we should also be // in a STW phase. assert(!concurrent_marking_in_progress(), "invariant"); assert(out_of_regions(), ! "only way to get here: _finger: " PTR_FORMAT ", _heap_end: " PTR_FORMAT, ! p2i(_finger), p2i(_heap_end)); } } void ConcurrentMark::set_non_marking_state() { // We set the global marking state to some default values when we're
*** 1413,1425 **** HeapWord* ntams = hr->next_top_at_mark_start(); HeapWord* start = hr->bottom(); assert(start <= hr->end() && start <= ntams && ntams <= hr->end(), ! err_msg("Preconditions not met - " "start: " PTR_FORMAT ", ntams: " PTR_FORMAT ", end: " PTR_FORMAT, ! p2i(start), p2i(ntams), p2i(hr->end()))); // Find the first marked object at or after "start". start = _bm->getNextMarkedWordAddress(start, ntams); size_t marked_bytes = 0; --- 1413,1425 ---- HeapWord* ntams = hr->next_top_at_mark_start(); HeapWord* start = hr->bottom(); assert(start <= hr->end() && start <= ntams && ntams <= hr->end(), ! "Preconditions not met - " "start: " PTR_FORMAT ", ntams: " PTR_FORMAT ", end: " PTR_FORMAT, ! p2i(start), p2i(ntams), p2i(hr->end())); // Find the first marked object at or after "start". start = _bm->getNextMarkedWordAddress(start, ntams); size_t marked_bytes = 0;
*** 1715,1729 **** // all the cards spanned by the object end_idx += 1; } assert(end_idx <= _card_bm->size(), ! err_msg("oob: end_idx= " SIZE_FORMAT ", bitmap size= " SIZE_FORMAT, ! end_idx, _card_bm->size())); assert(start_idx < _card_bm->size(), ! err_msg("oob: start_idx= " SIZE_FORMAT ", bitmap size= " SIZE_FORMAT, ! start_idx, _card_bm->size())); _cm->set_card_bitmap_range(_card_bm, start_idx, end_idx, true /* is_par */); } // Set the bit for the region if it contains live data --- 1715,1729 ---- // all the cards spanned by the object end_idx += 1; } assert(end_idx <= _card_bm->size(), ! "oob: end_idx= " SIZE_FORMAT ", bitmap size= " SIZE_FORMAT, ! end_idx, _card_bm->size()); assert(start_idx < _card_bm->size(), ! "oob: start_idx= " SIZE_FORMAT ", bitmap size= " SIZE_FORMAT, ! start_idx, _card_bm->size()); _cm->set_card_bitmap_range(_card_bm, start_idx, end_idx, true /* is_par */); } // Set the bit for the region if it contains live data
*** 2469,2479 **** if (entry < hr->next_top_at_mark_start()) { // Until we get here, we don't know whether entry refers to a valid // object; it could instead have been a stale reference. oop obj = static_cast<oop>(entry); assert(obj->is_oop(true /* ignore mark word */), ! err_msg("Invalid oop in SATB buffer: " PTR_FORMAT, p2i(obj))); _task->make_reference_grey(obj, hr); } } public: --- 2469,2479 ---- if (entry < hr->next_top_at_mark_start()) { // Until we get here, we don't know whether entry refers to a valid // object; it could instead have been a stale reference. oop obj = static_cast<oop>(entry); assert(obj->is_oop(true /* ignore mark word */), ! "Invalid oop in SATB buffer: " PTR_FORMAT, p2i(obj)); _task->make_reference_grey(obj, hr); } } public:
*** 2586,2598 **** } SATBMarkQueueSet& satb_mq_set = JavaThread::satb_mark_queue_set(); guarantee(has_overflown() || satb_mq_set.completed_buffers_num() == 0, ! err_msg("Invariant: has_overflown = %s, num buffers = %d", BOOL_TO_STR(has_overflown()), ! satb_mq_set.completed_buffers_num())); print_stats(); } void ConcurrentMark::clearRangePrevBitmap(MemRegion mr) { --- 2586,2598 ---- } SATBMarkQueueSet& satb_mq_set = JavaThread::satb_mark_queue_set(); guarantee(has_overflown() || satb_mq_set.completed_buffers_num() == 0, ! "Invariant: has_overflown = %s, num buffers = %d", BOOL_TO_STR(has_overflown()), ! satb_mq_set.completed_buffers_num()); print_stats(); } void ConcurrentMark::clearRangePrevBitmap(MemRegion mr) {
*** 2722,2736 **** _info(info) { } void operator()(oop obj) const { guarantee(obj->is_oop(), ! err_msg("Non-oop " PTR_FORMAT ", phase: %s, info: %d", ! p2i(obj), _phase, _info)); guarantee(!_g1h->obj_in_cs(obj), ! err_msg("obj: " PTR_FORMAT " in CSet, phase: %s, info: %d", ! p2i(obj), _phase, _info)); } }; void ConcurrentMark::verify_no_cset_oops() { assert(SafepointSynchronize::is_at_safepoint(), "should be at a safepoint"); --- 2722,2736 ---- _info(info) { } void operator()(oop obj) const { guarantee(obj->is_oop(), ! "Non-oop " PTR_FORMAT ", phase: %s, info: %d", ! p2i(obj), _phase, _info); guarantee(!_g1h->obj_in_cs(obj), ! "obj: " PTR_FORMAT " in CSet, phase: %s, info: %d", ! p2i(obj), _phase, _info); } }; void ConcurrentMark::verify_no_cset_oops() { assert(SafepointSynchronize::is_at_safepoint(), "should be at a safepoint");
*** 2759,2770 **** // not hold any more. // Since we always iterate over all regions, we might get a NULL HeapRegion // here. HeapRegion* global_hr = _g1h->heap_region_containing_raw(global_finger); guarantee(global_hr == NULL || global_finger == global_hr->bottom(), ! err_msg("global finger: " PTR_FORMAT " region: " HR_FORMAT, ! p2i(global_finger), HR_FORMAT_PARAMS(global_hr))); } // Verify the task fingers assert(parallel_marking_threads() <= _max_worker_id, "sanity"); for (uint i = 0; i < parallel_marking_threads(); ++i) { --- 2759,2770 ---- // not hold any more. // Since we always iterate over all regions, we might get a NULL HeapRegion // here. HeapRegion* global_hr = _g1h->heap_region_containing_raw(global_finger); guarantee(global_hr == NULL || global_finger == global_hr->bottom(), ! "global finger: " PTR_FORMAT " region: " HR_FORMAT, ! p2i(global_finger), HR_FORMAT_PARAMS(global_hr)); } // Verify the task fingers assert(parallel_marking_threads() <= _max_worker_id, "sanity"); for (uint i = 0; i < parallel_marking_threads(); ++i) {
*** 2773,2784 **** if (task_finger != NULL && task_finger < _heap_end) { // See above note on the global finger verification. HeapRegion* task_hr = _g1h->heap_region_containing_raw(task_finger); guarantee(task_hr == NULL || task_finger == task_hr->bottom() || !task_hr->in_collection_set(), ! err_msg("task finger: " PTR_FORMAT " region: " HR_FORMAT, ! p2i(task_finger), HR_FORMAT_PARAMS(task_hr))); } } } #endif // PRODUCT --- 2773,2784 ---- if (task_finger != NULL && task_finger < _heap_end) { // See above note on the global finger verification. HeapRegion* task_hr = _g1h->heap_region_containing_raw(task_finger); guarantee(task_hr == NULL || task_finger == task_hr->bottom() || !task_hr->in_collection_set(), ! "task finger: " PTR_FORMAT " region: " HR_FORMAT, ! p2i(task_finger), HR_FORMAT_PARAMS(task_hr)); } } } #endif // PRODUCT
*** 2814,2827 **** HeapWord* start = hr->bottom(); HeapWord* limit = hr->next_top_at_mark_start(); HeapWord* end = hr->end(); assert(start <= limit && limit <= hr->top() && hr->top() <= hr->end(), ! err_msg("Preconditions not met - " "start: " PTR_FORMAT ", limit: " PTR_FORMAT ", " "top: " PTR_FORMAT ", end: " PTR_FORMAT, ! p2i(start), p2i(limit), p2i(hr->top()), p2i(hr->end()))); assert(hr->next_marked_bytes() == 0, "Precondition"); if (start == limit) { // NTAMS of this region has not been set so nothing to do. --- 2814,2827 ---- HeapWord* start = hr->bottom(); HeapWord* limit = hr->next_top_at_mark_start(); HeapWord* end = hr->end(); assert(start <= limit && limit <= hr->top() && hr->top() <= hr->end(), ! "Preconditions not met - " "start: " PTR_FORMAT ", limit: " PTR_FORMAT ", " "top: " PTR_FORMAT ", end: " PTR_FORMAT, ! p2i(start), p2i(limit), p2i(hr->top()), p2i(hr->end())); assert(hr->next_marked_bytes() == 0, "Precondition"); if (start == limit) { // NTAMS of this region has not been set so nothing to do.
< prev index next >