src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp

changeset 6992
2c6ef90f030a
parent 6971
7426d8d76305
child 7005
e0954897238a
child 7018
a22acf6d7598
equal deleted inserted replaced
6991:882004b9e7e1 6992:2c6ef90f030a
208 }; 208 };
209 209
210 class RefineCardTableEntryClosure; 210 class RefineCardTableEntryClosure;
211 211
212 class G1CollectedHeap : public SharedHeap { 212 class G1CollectedHeap : public SharedHeap {
213 friend class VM_CollectForMetadataAllocation;
213 friend class VM_G1CollectForAllocation; 214 friend class VM_G1CollectForAllocation;
214 friend class VM_G1CollectFull; 215 friend class VM_G1CollectFull;
215 friend class VM_G1IncCollectionPause; 216 friend class VM_G1IncCollectionPause;
216 friend class VMStructs; 217 friend class VMStructs;
217 friend class MutatorAllocRegion; 218 friend class MutatorAllocRegion;
218 friend class SurvivorGCAllocRegion; 219 friend class SurvivorGCAllocRegion;
219 friend class OldGCAllocRegion; 220 friend class OldGCAllocRegion;
220 221
221 // Closures used in implementation. 222 // Closures used in implementation.
222 template <G1Barrier barrier, bool do_mark_object> 223 template <G1Barrier barrier, G1Mark do_mark_object>
223 friend class G1ParCopyClosure; 224 friend class G1ParCopyClosure;
224 friend class G1IsAliveClosure; 225 friend class G1IsAliveClosure;
225 friend class G1EvacuateFollowersClosure; 226 friend class G1EvacuateFollowersClosure;
226 friend class G1ParScanThreadState; 227 friend class G1ParScanThreadState;
227 friend class G1ParScanClosureSuper; 228 friend class G1ParScanClosureSuper;
343 // It releases the mutator alloc region. 344 // It releases the mutator alloc region.
344 void release_mutator_alloc_region(); 345 void release_mutator_alloc_region();
345 346
346 // It initializes the GC alloc regions at the start of a GC. 347 // It initializes the GC alloc regions at the start of a GC.
347 void init_gc_alloc_regions(EvacuationInfo& evacuation_info); 348 void init_gc_alloc_regions(EvacuationInfo& evacuation_info);
349
350 // Setup the retained old gc alloc region as the currrent old gc alloc region.
351 void use_retained_old_gc_alloc_region(EvacuationInfo& evacuation_info);
348 352
349 // It releases the GC alloc regions at the end of a GC. 353 // It releases the GC alloc regions at the end of a GC.
350 void release_gc_alloc_regions(uint no_of_gc_workers, EvacuationInfo& evacuation_info); 354 void release_gc_alloc_regions(uint no_of_gc_workers, EvacuationInfo& evacuation_info);
351 355
352 // It does any cleanup that needs to be done on the GC alloc regions 356 // It does any cleanup that needs to be done on the GC alloc regions
825 // and does "scan_metadata" If "scan_rs" is 829 // and does "scan_metadata" If "scan_rs" is
826 // NULL, then this step is skipped. The "worker_i" 830 // NULL, then this step is skipped. The "worker_i"
827 // param is for use with parallel roots processing, and should be 831 // param is for use with parallel roots processing, and should be
828 // the "i" of the calling parallel worker thread's work(i) function. 832 // the "i" of the calling parallel worker thread's work(i) function.
829 // In the sequential case this param will be ignored. 833 // In the sequential case this param will be ignored.
830 void g1_process_strong_roots(bool is_scavenging, 834 void g1_process_roots(OopClosure* scan_non_heap_roots,
831 ScanningOption so, 835 OopClosure* scan_non_heap_weak_roots,
832 OopClosure* scan_non_heap_roots, 836 OopsInHeapRegionClosure* scan_rs,
833 OopsInHeapRegionClosure* scan_rs, 837 CLDClosure* scan_strong_clds,
834 G1KlassScanClosure* scan_klasses, 838 CLDClosure* scan_weak_clds,
835 uint worker_i); 839 CodeBlobClosure* scan_strong_code,
840 uint worker_i);
836 841
837 // Notifies all the necessary spaces that the committed space has 842 // Notifies all the necessary spaces that the committed space has
838 // been updated (either expanded or shrunk). It should be called 843 // been updated (either expanded or shrunk). It should be called
839 // after _g1_storage is updated. 844 // after _g1_storage is updated.
840 void update_committed_space(HeapWord* old_end, HeapWord* new_end); 845 void update_committed_space(HeapWord* old_end, HeapWord* new_end);
1023 // The heap region entry for a given worker is valid iff 1028 // The heap region entry for a given worker is valid iff
1024 // the associated time stamp value matches the current value 1029 // the associated time stamp value matches the current value
1025 // of G1CollectedHeap::_gc_time_stamp. 1030 // of G1CollectedHeap::_gc_time_stamp.
1026 unsigned int* _worker_cset_start_region_time_stamp; 1031 unsigned int* _worker_cset_start_region_time_stamp;
1027 1032
1028 enum G1H_process_strong_roots_tasks { 1033 enum G1H_process_roots_tasks {
1029 G1H_PS_filter_satb_buffers, 1034 G1H_PS_filter_satb_buffers,
1030 G1H_PS_refProcessor_oops_do, 1035 G1H_PS_refProcessor_oops_do,
1031 // Leave this one last. 1036 // Leave this one last.
1032 G1H_PS_NumElements 1037 G1H_PS_NumElements
1033 }; 1038 };
1594 void migrate_strong_code_roots(); 1599 void migrate_strong_code_roots();
1595 1600
1596 // Free up superfluous code root memory. 1601 // Free up superfluous code root memory.
1597 void purge_code_root_memory(); 1602 void purge_code_root_memory();
1598 1603
1599 // During an initial mark pause, mark all the code roots that
1600 // point into regions *not* in the collection set.
1601 void mark_strong_code_roots(uint worker_id);
1602
1603 // Rebuild the stong code root lists for each region 1604 // Rebuild the stong code root lists for each region
1604 // after a full GC 1605 // after a full GC
1605 void rebuild_strong_code_roots(); 1606 void rebuild_strong_code_roots();
1606 1607
1607 // Delete entries for dead interned string and clean up unreferenced symbols 1608 // Delete entries for dead interned string and clean up unreferenced symbols
1608 // in symbol table, possibly in parallel. 1609 // in symbol table, possibly in parallel.
1609 void unlink_string_and_symbol_table(BoolObjectClosure* is_alive, bool unlink_strings = true, bool unlink_symbols = true); 1610 void unlink_string_and_symbol_table(BoolObjectClosure* is_alive, bool unlink_strings = true, bool unlink_symbols = true);
1611
1612 // Parallel phase of unloading/cleaning after G1 concurrent mark.
1613 void parallel_cleaning(BoolObjectClosure* is_alive, bool process_strings, bool process_symbols, bool class_unloading_occurred);
1610 1614
1611 // Redirty logged cards in the refinement queue. 1615 // Redirty logged cards in the refinement queue.
1612 void redirty_logged_cards(); 1616 void redirty_logged_cards();
1613 // Verification 1617 // Verification
1614 1618

mercurial