hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp
changeset 24351 61b33cc6d3cf
parent 24106 dae9277bdf2a
child 24424 2658d7834c6e
equal deleted inserted replaced
24350:8d8c1012dacd 24351:61b33cc6d3cf
    31 #include "gc_implementation/g1/g1CollectorPolicy.hpp"
    31 #include "gc_implementation/g1/g1CollectorPolicy.hpp"
    32 #include "gc_implementation/g1/g1RemSet.inline.hpp"
    32 #include "gc_implementation/g1/g1RemSet.inline.hpp"
    33 #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
    33 #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
    34 #include "gc_implementation/g1/heapRegionSet.inline.hpp"
    34 #include "gc_implementation/g1/heapRegionSet.inline.hpp"
    35 #include "gc_implementation/g1/heapRegionSeq.inline.hpp"
    35 #include "gc_implementation/g1/heapRegionSeq.inline.hpp"
       
    36 #include "runtime/orderAccess.inline.hpp"
    36 #include "utilities/taskqueue.hpp"
    37 #include "utilities/taskqueue.hpp"
    37 
    38 
    38 // Inline functions for G1CollectedHeap
    39 // Inline functions for G1CollectedHeap
    39 
    40 
    40 // Return the region with the given index. It assumes the index is valid.
    41 // Return the region with the given index. It assumes the index is valid.
    56   HeapRegion* hr = heap_region_containing_raw(addr);
    57   HeapRegion* hr = heap_region_containing_raw(addr);
    57   if (hr->continuesHumongous()) {
    58   if (hr->continuesHumongous()) {
    58     return hr->humongous_start_region();
    59     return hr->humongous_start_region();
    59   }
    60   }
    60   return hr;
    61   return hr;
       
    62 }
       
    63 
       
    64 inline void G1CollectedHeap::reset_gc_time_stamp() {
       
    65   _gc_time_stamp = 0;
       
    66   OrderAccess::fence();
       
    67   // Clear the cached CSet starting regions and time stamps.
       
    68   // Their validity is dependent on the GC timestamp.
       
    69   clear_cset_start_regions();
       
    70 }
       
    71 
       
    72 inline void G1CollectedHeap::increment_gc_time_stamp() {
       
    73   ++_gc_time_stamp;
       
    74   OrderAccess::fence();
    61 }
    75 }
    62 
    76 
    63 inline void G1CollectedHeap::old_set_remove(HeapRegion* hr) {
    77 inline void G1CollectedHeap::old_set_remove(HeapRegion* hr) {
    64   _old_set.remove(hr);
    78   _old_set.remove(hr);
    65 }
    79 }