Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp @ 12343:d55c004e1d4d
8025305: Cleanup CardTableModRefBS usage in G1
Summary: Move some G1 specific code from CardTableModRefBS to G1SATBCardTableModRefBS.
Reviewed-by: brutisso, tschatzl, ehelin
author | mgerdin |
---|---|
date | Tue, 24 Sep 2013 14:46:29 +0200 |
parents | 40136aa2cdb1 |
children | 798522662fcd |
comparison
equal
deleted
inserted
replaced
12342:ccef6e165e8b | 12343:d55c004e1d4d |
---|---|
29 #include "gc_implementation/g1/evacuationInfo.hpp" | 29 #include "gc_implementation/g1/evacuationInfo.hpp" |
30 #include "gc_implementation/g1/g1AllocRegion.hpp" | 30 #include "gc_implementation/g1/g1AllocRegion.hpp" |
31 #include "gc_implementation/g1/g1HRPrinter.hpp" | 31 #include "gc_implementation/g1/g1HRPrinter.hpp" |
32 #include "gc_implementation/g1/g1MonitoringSupport.hpp" | 32 #include "gc_implementation/g1/g1MonitoringSupport.hpp" |
33 #include "gc_implementation/g1/g1RemSet.hpp" | 33 #include "gc_implementation/g1/g1RemSet.hpp" |
34 #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" | |
34 #include "gc_implementation/g1/g1YCTypes.hpp" | 35 #include "gc_implementation/g1/g1YCTypes.hpp" |
35 #include "gc_implementation/g1/heapRegionSeq.hpp" | 36 #include "gc_implementation/g1/heapRegionSeq.hpp" |
36 #include "gc_implementation/g1/heapRegionSets.hpp" | 37 #include "gc_implementation/g1/heapRegionSets.hpp" |
37 #include "gc_implementation/shared/hSpaceCounters.hpp" | 38 #include "gc_implementation/shared/hSpaceCounters.hpp" |
38 #include "gc_implementation/shared/parGCAllocBuffer.hpp" | 39 #include "gc_implementation/shared/parGCAllocBuffer.hpp" |
789 // Actually do the work of evacuating the collection set. | 790 // Actually do the work of evacuating the collection set. |
790 void evacuate_collection_set(EvacuationInfo& evacuation_info); | 791 void evacuate_collection_set(EvacuationInfo& evacuation_info); |
791 | 792 |
792 // The g1 remembered set of the heap. | 793 // The g1 remembered set of the heap. |
793 G1RemSet* _g1_rem_set; | 794 G1RemSet* _g1_rem_set; |
794 // And it's mod ref barrier set, used to track updates for the above. | |
795 ModRefBarrierSet* _mr_bs; | |
796 | 795 |
797 // A set of cards that cover the objects for which the Rsets should be updated | 796 // A set of cards that cover the objects for which the Rsets should be updated |
798 // concurrently after the collection. | 797 // concurrently after the collection. |
799 DirtyCardQueueSet _dirty_card_queue_set; | 798 DirtyCardQueueSet _dirty_card_queue_set; |
800 | 799 |
1125 // Adaptive size policy. No such thing for g1. | 1124 // Adaptive size policy. No such thing for g1. |
1126 virtual AdaptiveSizePolicy* size_policy() { return NULL; } | 1125 virtual AdaptiveSizePolicy* size_policy() { return NULL; } |
1127 | 1126 |
1128 // The rem set and barrier set. | 1127 // The rem set and barrier set. |
1129 G1RemSet* g1_rem_set() const { return _g1_rem_set; } | 1128 G1RemSet* g1_rem_set() const { return _g1_rem_set; } |
1130 ModRefBarrierSet* mr_bs() const { return _mr_bs; } | |
1131 | 1129 |
1132 unsigned get_gc_time_stamp() { | 1130 unsigned get_gc_time_stamp() { |
1133 return _gc_time_stamp; | 1131 return _gc_time_stamp; |
1134 } | 1132 } |
1135 | 1133 |
1343 MemRegion g1_committed() { | 1341 MemRegion g1_committed() { |
1344 return _g1_committed; | 1342 return _g1_committed; |
1345 } | 1343 } |
1346 | 1344 |
1347 virtual bool is_in_closed_subset(const void* p) const; | 1345 virtual bool is_in_closed_subset(const void* p) const; |
1346 | |
1347 G1SATBCardTableModRefBS* g1_barrier_set() { | |
1348 return (G1SATBCardTableModRefBS*) barrier_set(); | |
1349 } | |
1348 | 1350 |
1349 // This resets the card table to all zeros. It is used after | 1351 // This resets the card table to all zeros. It is used after |
1350 // a collection pause which used the card table to claim cards. | 1352 // a collection pause which used the card table to claim cards. |
1351 void cleanUpCardTable(); | 1353 void cleanUpCardTable(); |
1352 | 1354 |
1873 class G1ParScanThreadState : public StackObj { | 1875 class G1ParScanThreadState : public StackObj { |
1874 protected: | 1876 protected: |
1875 G1CollectedHeap* _g1h; | 1877 G1CollectedHeap* _g1h; |
1876 RefToScanQueue* _refs; | 1878 RefToScanQueue* _refs; |
1877 DirtyCardQueue _dcq; | 1879 DirtyCardQueue _dcq; |
1878 CardTableModRefBS* _ct_bs; | 1880 G1SATBCardTableModRefBS* _ct_bs; |
1879 G1RemSet* _g1_rem; | 1881 G1RemSet* _g1_rem; |
1880 | 1882 |
1881 G1ParGCAllocBufferContainer _surviving_alloc_buffer; | 1883 G1ParGCAllocBufferContainer _surviving_alloc_buffer; |
1882 G1ParGCAllocBufferContainer _tenured_alloc_buffer; | 1884 G1ParGCAllocBufferContainer _tenured_alloc_buffer; |
1883 G1ParGCAllocBufferContainer* _alloc_buffers[GCAllocPurposeCount]; | 1885 G1ParGCAllocBufferContainer* _alloc_buffers[GCAllocPurposeCount]; |
1912 void add_to_alloc_buffer_waste(size_t waste) { _alloc_buffer_waste += waste; } | 1914 void add_to_alloc_buffer_waste(size_t waste) { _alloc_buffer_waste += waste; } |
1913 | 1915 |
1914 void add_to_undo_waste(size_t waste) { _undo_waste += waste; } | 1916 void add_to_undo_waste(size_t waste) { _undo_waste += waste; } |
1915 | 1917 |
1916 DirtyCardQueue& dirty_card_queue() { return _dcq; } | 1918 DirtyCardQueue& dirty_card_queue() { return _dcq; } |
1917 CardTableModRefBS* ctbs() { return _ct_bs; } | 1919 G1SATBCardTableModRefBS* ctbs() { return _ct_bs; } |
1918 | 1920 |
1919 template <class T> void immediate_rs_update(HeapRegion* from, T* p, int tid) { | 1921 template <class T> void immediate_rs_update(HeapRegion* from, T* p, int tid) { |
1920 if (!from->is_survivor()) { | 1922 if (!from->is_survivor()) { |
1921 _g1_rem->par_write_ref(from, p, tid); | 1923 _g1_rem->par_write_ref(from, p, tid); |
1922 } | 1924 } |