< prev index next >

src/hotspot/share/gc/g1/g1CollectedHeap.hpp

G1BarrierSet_merge

9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or                                                             
10  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License                                                             
11  * version 2 for more details (a copy is included in the LICENSE file that                                                           
12  * accompanied this code).                                                                                                           
13  *                                                                                                                                   
14  * You should have received a copy of the GNU General Public License version                                                         
15  * 2 along with this work; if not, write to the Free Software Foundation,                                                            
16  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.                                                                     
17  *                                                                                                                                   
18  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA                                                           
19  * or visit www.oracle.com if you need additional information or have any                                                            
20  * questions.                                                                                                                        
21  *                                                                                                                                   
22  */                                                                                                                                  
23 
24 #ifndef SHARE_VM_GC_G1_G1COLLECTEDHEAP_HPP                                                                                           
25 #define SHARE_VM_GC_G1_G1COLLECTEDHEAP_HPP                                                                                           
26 
27 #include "gc/g1/evacuationInfo.hpp"                                                                                                  
28 #include "gc/g1/g1AllocationContext.hpp"                                                                                             
                                                                                                                                     
29 #include "gc/g1/g1BiasedArray.hpp"                                                                                                   
30 #include "gc/g1/g1CardTable.hpp"                                                                                                     
31 #include "gc/g1/g1CollectionSet.hpp"                                                                                                 
32 #include "gc/g1/g1CollectorState.hpp"                                                                                                
33 #include "gc/g1/g1ConcurrentMark.hpp"                                                                                                
34 #include "gc/g1/g1EdenRegions.hpp"                                                                                                   
35 #include "gc/g1/g1EvacFailure.hpp"                                                                                                   
36 #include "gc/g1/g1EvacStats.hpp"                                                                                                     
37 #include "gc/g1/g1HeapTransition.hpp"                                                                                                
38 #include "gc/g1/g1HeapVerifier.hpp"                                                                                                  
39 #include "gc/g1/g1HRPrinter.hpp"                                                                                                     
40 #include "gc/g1/g1InCSetState.hpp"                                                                                                   
41 #include "gc/g1/g1MonitoringSupport.hpp"                                                                                             
42 #include "gc/g1/g1SATBCardTableModRefBS.hpp"                                                                                         
43 #include "gc/g1/g1SurvivorRegions.hpp"                                                                                               
44 #include "gc/g1/g1YCTypes.hpp"                                                                                                       
45 #include "gc/g1/heapRegionManager.hpp"                                                                                               
46 #include "gc/g1/heapRegionSet.hpp"                                                                                                   
47 #include "gc/shared/barrierSet.hpp"                                                                                                  
48 #include "gc/shared/collectedHeap.hpp"                                                                                               
49 #include "gc/shared/gcHeapSummary.hpp"                                                                                               
50 #include "gc/shared/plab.hpp"                                                                                                        
51 #include "gc/shared/preservedMarks.hpp"                                                                                              
52 #include "gc/shared/softRefPolicy.hpp"                                                                                               
53 #include "memory/memRegion.hpp"                                                                                                      
54 #include "services/memoryManager.hpp"                                                                                                
55 #include "utilities/stack.hpp"                                                                                                       
56 
57 // A "G1CollectedHeap" is an implementation of a java heap for HotSpot.                                                              
58 // It uses the "Garbage First" heap organization and algorithm, which                                                                
59 // may combine concurrent marking with parallel, incremental compaction of                                                           
60 // heap subsets that will yield large amounts of garbage.                                                                            
61 

9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
11  * version 2 for more details (a copy is included in the LICENSE file that
12  * accompanied this code).
13  *
14  * You should have received a copy of the GNU General Public License version
15  * 2 along with this work; if not, write to the Free Software Foundation,
16  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17  *
18  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19  * or visit www.oracle.com if you need additional information or have any
20  * questions.
21  *
22  */
23 
24 #ifndef SHARE_VM_GC_G1_G1COLLECTEDHEAP_HPP
25 #define SHARE_VM_GC_G1_G1COLLECTEDHEAP_HPP
26 
27 #include "gc/g1/evacuationInfo.hpp"
28 #include "gc/g1/g1AllocationContext.hpp"
29 #include "gc/g1/g1BarrierSet.hpp"
30 #include "gc/g1/g1BiasedArray.hpp"
31 #include "gc/g1/g1CardTable.hpp"
32 #include "gc/g1/g1CollectionSet.hpp"
33 #include "gc/g1/g1CollectorState.hpp"
34 #include "gc/g1/g1ConcurrentMark.hpp"
35 #include "gc/g1/g1EdenRegions.hpp"
36 #include "gc/g1/g1EvacFailure.hpp"
37 #include "gc/g1/g1EvacStats.hpp"
38 #include "gc/g1/g1HeapTransition.hpp"
39 #include "gc/g1/g1HeapVerifier.hpp"
40 #include "gc/g1/g1HRPrinter.hpp"
41 #include "gc/g1/g1InCSetState.hpp"
42 #include "gc/g1/g1MonitoringSupport.hpp"

43 #include "gc/g1/g1SurvivorRegions.hpp"
44 #include "gc/g1/g1YCTypes.hpp"
45 #include "gc/g1/heapRegionManager.hpp"
46 #include "gc/g1/heapRegionSet.hpp"
47 #include "gc/shared/barrierSet.hpp"
48 #include "gc/shared/collectedHeap.hpp"
49 #include "gc/shared/gcHeapSummary.hpp"
50 #include "gc/shared/plab.hpp"
51 #include "gc/shared/preservedMarks.hpp"
52 #include "gc/shared/softRefPolicy.hpp"
53 #include "memory/memRegion.hpp"
54 #include "services/memoryManager.hpp"
55 #include "utilities/stack.hpp"
56 
57 // A "G1CollectedHeap" is an implementation of a java heap for HotSpot.
58 // It uses the "Garbage First" heap organization and algorithm, which
59 // may combine concurrent marking with parallel, incremental compaction of
60 // heap subsets that will yield large amounts of garbage.
61 

1155   // corresponding region is in the collection set or not.                                                                           
1156   G1InCSetStateFastTestBiasedMappedArray _in_cset_fast_test;                                                                         
1157 
1158  public:                                                                                                                             
1159 
1160   inline InCSetState in_cset_state(const oop obj);                                                                                   
1161 
1162   // Return "TRUE" iff the given object address is in the reserved                                                                   
1163   // region of g1.                                                                                                                   
1164   bool is_in_g1_reserved(const void* p) const {                                                                                      
1165     return _hrm.reserved().contains(p);                                                                                              
1166   }                                                                                                                                  
1167 
1168   // Returns a MemRegion that corresponds to the space that has been                                                                 
1169   // reserved for the heap                                                                                                           
1170   MemRegion g1_reserved() const {                                                                                                    
1171     return _hrm.reserved();                                                                                                          
1172   }                                                                                                                                  
1173 
1174   virtual bool is_in_closed_subset(const void* p) const;                                                                             
1175                                                                                                                                      
1176   G1SATBCardTableLoggingModRefBS* g1_barrier_set() {                                                                                 
1177     return barrier_set_cast<G1SATBCardTableLoggingModRefBS>(barrier_set());                                                          
1178   }                                                                                                                                  
1179 
1180   G1HotCardCache* g1_hot_card_cache() const { return _hot_card_cache; }                                                              
1181 
1182   G1CardTable* card_table() const {                                                                                                  
1183     return _card_table;                                                                                                              
1184   }                                                                                                                                  
1185 
1186   // Iteration functions.                                                                                                            
1187 
1188   // Iterate over all objects, calling "cl.do_object" on each.                                                                       
1189   virtual void object_iterate(ObjectClosure* cl);                                                                                    
1190 
1191   virtual void safe_object_iterate(ObjectClosure* cl) {                                                                              
1192     object_iterate(cl);                                                                                                              
1193   }                                                                                                                                  
1194 
1195   // Iterate over heap regions, in address order, terminating the                                                                    
1196   // iteration early if the "do_heap_region" method returns "true".                                                                  
1197   void heap_region_iterate(HeapRegionClosure* blk) const;                                                                            

1155   // corresponding region is in the collection set or not.
1156   G1InCSetStateFastTestBiasedMappedArray _in_cset_fast_test;
1157 
1158  public:
1159 
1160   inline InCSetState in_cset_state(const oop obj);
1161 
1162   // Return "TRUE" iff the given object address is in the reserved
1163   // region of g1.
1164   bool is_in_g1_reserved(const void* p) const {
1165     return _hrm.reserved().contains(p);
1166   }
1167 
1168   // Returns a MemRegion that corresponds to the space that has been
1169   // reserved for the heap
1170   MemRegion g1_reserved() const {
1171     return _hrm.reserved();
1172   }
1173 
1174   virtual bool is_in_closed_subset(const void* p) const;




1175 
1176   G1HotCardCache* g1_hot_card_cache() const { return _hot_card_cache; }
1177 
1178   G1CardTable* card_table() const {
1179     return _card_table;
1180   }
1181 
1182   // Iteration functions.
1183 
1184   // Iterate over all objects, calling "cl.do_object" on each.
1185   virtual void object_iterate(ObjectClosure* cl);
1186 
1187   virtual void safe_object_iterate(ObjectClosure* cl) {
1188     object_iterate(cl);
1189   }
1190 
1191   // Iterate over heap regions, in address order, terminating the
1192   // iteration early if the "do_heap_region" method returns "true".
1193   void heap_region_iterate(HeapRegionClosure* blk) const;
< prev index next >