Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp @ 20197:ce8f6bb717c9
8042195: Introduce umbrella header orderAccess.inline.hpp.
Reviewed-by: dholmes, kvn, stefank, twisti
author | goetz |
---|---|
date | Tue, 29 Apr 2014 15:17:27 +0200 |
parents | 78bbf4d43a14 |
children | d7e2d5f2846b |
comparison
equal
deleted
inserted
replaced
20196:c8dd4f65cc76 | 20197:ce8f6bb717c9 |
---|---|
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. |
55 inline HeapRegion* | 56 inline HeapRegion* |
56 G1CollectedHeap::heap_region_containing_raw(const T addr) const { | 57 G1CollectedHeap::heap_region_containing_raw(const T addr) const { |
57 assert(_g1_reserved.contains((const void*) addr), "invariant"); | 58 assert(_g1_reserved.contains((const void*) addr), "invariant"); |
58 HeapRegion* res = _hrs.addr_to_region_unsafe((HeapWord*) addr); | 59 HeapRegion* res = _hrs.addr_to_region_unsafe((HeapWord*) addr); |
59 return res; | 60 return res; |
61 } | |
62 | |
63 inline void G1CollectedHeap::reset_gc_time_stamp() { | |
64 _gc_time_stamp = 0; | |
65 OrderAccess::fence(); | |
66 // Clear the cached CSet starting regions and time stamps. | |
67 // Their validity is dependent on the GC timestamp. | |
68 clear_cset_start_regions(); | |
69 } | |
70 | |
71 inline void G1CollectedHeap::increment_gc_time_stamp() { | |
72 ++_gc_time_stamp; | |
73 OrderAccess::fence(); | |
60 } | 74 } |
61 | 75 |
62 inline void G1CollectedHeap::old_set_remove(HeapRegion* hr) { | 76 inline void G1CollectedHeap::old_set_remove(HeapRegion* hr) { |
63 _old_set.remove(hr); | 77 _old_set.remove(hr); |
64 } | 78 } |