< prev index next >

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

Print this page
rev 12937 : imported patch 8071280-specialize-heapregion-oops-on-card-seq-iterate
rev 12939 : imported patch 8162928-micro-optimizations-in-remembered-set-scan
rev 12943 : imported patch 8177044-remove-scan-top

*** 825,835 **** // G1OffsetTableContigSpace code; copied from space.cpp. Hope this can go // away eventually. void G1ContiguousSpace::clear(bool mangle_space) { set_top(bottom()); - _scan_top = bottom(); CompactibleSpace::clear(mangle_space); reset_bot(); } #ifndef PRODUCT --- 825,834 ----
*** 857,902 **** HeapWord* end) { _bot_part.alloc_block(start, end); return _bot_part.threshold(); } - HeapWord* G1ContiguousSpace::scan_top() const { - G1CollectedHeap* g1h = G1CollectedHeap::heap(); - HeapWord* local_top = top(); - OrderAccess::loadload(); - const unsigned local_time_stamp = _gc_time_stamp; - assert(local_time_stamp <= g1h->get_gc_time_stamp(), "invariant"); - if (local_time_stamp < g1h->get_gc_time_stamp()) { - return local_top; - } else { - return _scan_top; - } - } - void G1ContiguousSpace::record_timestamp() { G1CollectedHeap* g1h = G1CollectedHeap::heap(); uint curr_gc_time_stamp = g1h->get_gc_time_stamp(); if (_gc_time_stamp < curr_gc_time_stamp) { - // Setting the time stamp here tells concurrent readers to look at - // scan_top to know the maximum allowed address to look at. - - // scan_top should be bottom for all regions except for the - // retained old alloc region which should have scan_top == top - HeapWord* st = _scan_top; - guarantee(st == _bottom || st == _top, "invariant"); - _gc_time_stamp = curr_gc_time_stamp; } } - void G1ContiguousSpace::record_retained_region() { - // scan_top is the maximum address where it's safe for the next gc to - // scan this region. - _scan_top = top(); - } - void G1ContiguousSpace::safe_object_iterate(ObjectClosure* blk) { object_iterate(blk); } void G1ContiguousSpace::object_iterate(ObjectClosure* blk) { --- 856,874 ----
*** 917,926 **** } void G1ContiguousSpace::initialize(MemRegion mr, bool clear_space, bool mangle_space) { CompactibleSpace::initialize(mr, clear_space, mangle_space); _top = bottom(); - _scan_top = bottom(); set_saved_mark_word(NULL); reset_bot(); } --- 889,897 ----
< prev index next >