1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp Mon Jul 21 09:40:19 2014 +0200 1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp Mon Jul 21 09:41:04 2014 +0200 1.3 @@ -29,7 +29,6 @@ 1.4 #include "gc_implementation/g1/g1CollectedHeap.hpp" 1.5 #include "gc_implementation/g1/g1AllocRegion.inline.hpp" 1.6 #include "gc_implementation/g1/g1CollectorPolicy.hpp" 1.7 -#include "gc_implementation/g1/g1RemSet.inline.hpp" 1.8 #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" 1.9 #include "gc_implementation/g1/heapRegionSet.inline.hpp" 1.10 #include "gc_implementation/g1/heapRegionSeq.inline.hpp" 1.11 @@ -291,89 +290,4 @@ 1.12 else return is_obj_ill(obj, hr); 1.13 } 1.14 1.15 -template <class T> inline void G1ParScanThreadState::immediate_rs_update(HeapRegion* from, T* p, int tid) { 1.16 - if (!from->is_survivor()) { 1.17 - _g1_rem->par_write_ref(from, p, tid); 1.18 - } 1.19 -} 1.20 - 1.21 -template <class T> void G1ParScanThreadState::update_rs(HeapRegion* from, T* p, int tid) { 1.22 - if (G1DeferredRSUpdate) { 1.23 - deferred_rs_update(from, p, tid); 1.24 - } else { 1.25 - immediate_rs_update(from, p, tid); 1.26 - } 1.27 -} 1.28 - 1.29 - 1.30 -inline void G1ParScanThreadState::do_oop_partial_array(oop* p) { 1.31 - assert(has_partial_array_mask(p), "invariant"); 1.32 - oop from_obj = clear_partial_array_mask(p); 1.33 - 1.34 - assert(Universe::heap()->is_in_reserved(from_obj), "must be in heap."); 1.35 - assert(from_obj->is_objArray(), "must be obj array"); 1.36 - objArrayOop from_obj_array = objArrayOop(from_obj); 1.37 - // The from-space object contains the real length. 1.38 - int length = from_obj_array->length(); 1.39 - 1.40 - assert(from_obj->is_forwarded(), "must be forwarded"); 1.41 - oop to_obj = from_obj->forwardee(); 1.42 - assert(from_obj != to_obj, "should not be chunking self-forwarded objects"); 1.43 - objArrayOop to_obj_array = objArrayOop(to_obj); 1.44 - // We keep track of the next start index in the length field of the 1.45 - // to-space object. 1.46 - int next_index = to_obj_array->length(); 1.47 - assert(0 <= next_index && next_index < length, 1.48 - err_msg("invariant, next index: %d, length: %d", next_index, length)); 1.49 - 1.50 - int start = next_index; 1.51 - int end = length; 1.52 - int remainder = end - start; 1.53 - // We'll try not to push a range that's smaller than ParGCArrayScanChunk. 1.54 - if (remainder > 2 * ParGCArrayScanChunk) { 1.55 - end = start + ParGCArrayScanChunk; 1.56 - to_obj_array->set_length(end); 1.57 - // Push the remainder before we process the range in case another 1.58 - // worker has run out of things to do and can steal it. 1.59 - oop* from_obj_p = set_partial_array_mask(from_obj); 1.60 - push_on_queue(from_obj_p); 1.61 - } else { 1.62 - assert(length == end, "sanity"); 1.63 - // We'll process the final range for this object. Restore the length 1.64 - // so that the heap remains parsable in case of evacuation failure. 1.65 - to_obj_array->set_length(end); 1.66 - } 1.67 - _scanner.set_region(_g1h->heap_region_containing_raw(to_obj)); 1.68 - // Process indexes [start,end). It will also process the header 1.69 - // along with the first chunk (i.e., the chunk with start == 0). 1.70 - // Note that at this point the length field of to_obj_array is not 1.71 - // correct given that we are using it to keep track of the next 1.72 - // start index. oop_iterate_range() (thankfully!) ignores the length 1.73 - // field and only relies on the start / end parameters. It does 1.74 - // however return the size of the object which will be incorrect. So 1.75 - // we have to ignore it even if we wanted to use it. 1.76 - to_obj_array->oop_iterate_range(&_scanner, start, end); 1.77 -} 1.78 - 1.79 -template <class T> inline void G1ParScanThreadState::deal_with_reference(T* ref_to_scan) { 1.80 - if (!has_partial_array_mask(ref_to_scan)) { 1.81 - // Note: we can use "raw" versions of "region_containing" because 1.82 - // "obj_to_scan" is definitely in the heap, and is not in a 1.83 - // humongous region. 1.84 - HeapRegion* r = _g1h->heap_region_containing_raw(ref_to_scan); 1.85 - do_oop_evac(ref_to_scan, r); 1.86 - } else { 1.87 - do_oop_partial_array((oop*)ref_to_scan); 1.88 - } 1.89 -} 1.90 - 1.91 -inline void G1ParScanThreadState::deal_with_reference(StarTask ref) { 1.92 - assert(verify_task(ref), "sanity"); 1.93 - if (ref.is_narrow()) { 1.94 - deal_with_reference((narrowOop*)ref); 1.95 - } else { 1.96 - deal_with_reference((oop*)ref); 1.97 - } 1.98 -} 1.99 - 1.100 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1COLLECTEDHEAP_INLINE_HPP