< prev index next >

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

Print this page
rev 47825 : 8189733: Cleanup Full GC setup and tear down
Reviewed-by:


 109 public:
 110   G1STWIsAliveClosure(G1CollectedHeap* g1) : _g1(g1) {}
 111   bool do_object_b(oop p);
 112 };
 113 
 114 class G1RegionMappingChangedListener : public G1MappingChangedListener {
 115  private:
 116   void reset_from_card_cache(uint start_idx, size_t num_regions);
 117  public:
 118   virtual void on_commit(uint start_idx, size_t num_regions, bool zero_filled);
 119 };
 120 
 121 class G1CollectedHeap : public CollectedHeap {
 122   friend class G1FreeCollectionSetTask;
 123   friend class VM_CollectForMetadataAllocation;
 124   friend class VM_G1CollectForAllocation;
 125   friend class VM_G1CollectFull;
 126   friend class VM_G1IncCollectionPause;
 127   friend class VMStructs;
 128   friend class MutatorAllocRegion;

 129   friend class G1GCAllocRegion;
 130   friend class G1HeapVerifier;
 131 
 132   // Closures used in implementation.
 133   friend class G1ParScanThreadState;
 134   friend class G1ParScanThreadStateSet;
 135   friend class G1ParTask;
 136   friend class G1PLABAllocator;
 137   friend class G1PrepareCompactClosure;
 138 
 139   // Other related classes.
 140   friend class HeapRegionClaimer;
 141 
 142   // Testing classes.
 143   friend class G1CheckCSetFastTableClosure;
 144 
 145 private:
 146   G1YoungRemSetSamplingThread* _young_gen_sampling_thread;
 147 
 148   WorkGang* _workers;


 500   // - it returns false if it is unable to do the collection due to the
 501   //   GC locker being active, true otherwise.
 502   bool do_full_collection(bool explicit_gc,
 503                           bool clear_all_soft_refs);
 504 
 505   // Callback from VM_G1CollectFull operation, or collect_as_vm_thread.
 506   virtual void do_full_collection(bool clear_all_soft_refs);
 507 
 508   // Resize the heap if necessary after a full collection.
 509   void resize_if_necessary_after_full_collection();
 510 
 511   // Callback from VM_G1CollectForAllocation operation.
 512   // This function does everything necessary/possible to satisfy a
 513   // failed allocation request (including collection, expansion, etc.)
 514   HeapWord* satisfy_failed_allocation(size_t word_size,
 515                                       AllocationContext_t context,
 516                                       bool* succeeded);
 517 private:
 518   // Internal helpers used during full GC to split it up to
 519   // increase readability.
 520   void do_full_collection_inner(G1FullGCScope* scope);
 521   void abort_concurrent_cycle();
 522   void verify_before_full_collection(bool explicit_gc);
 523   void prepare_heap_for_full_collection();
 524   void prepare_heap_for_mutators();
 525   void abort_refinement();
 526   void verify_after_full_collection();
 527   void print_heap_after_full_collection(G1HeapTransition* heap_transition);
 528 
 529   // Helper method for satisfy_failed_allocation()
 530   HeapWord* satisfy_failed_allocation_helper(size_t word_size,
 531                                              AllocationContext_t context,
 532                                              bool do_gc,
 533                                              bool clear_all_soft_refs,
 534                                              bool expect_null_mutator_alloc_region,
 535                                              bool* gc_succeeded);
 536 
 537 protected:
 538   // Attempting to expand the heap sufficiently
 539   // to support an allocation of the given "word_size".  If
 540   // successful, perform the allocation and return the address of the




 109 public:
 110   G1STWIsAliveClosure(G1CollectedHeap* g1) : _g1(g1) {}
 111   bool do_object_b(oop p);
 112 };
 113 
 114 class G1RegionMappingChangedListener : public G1MappingChangedListener {
 115  private:
 116   void reset_from_card_cache(uint start_idx, size_t num_regions);
 117  public:
 118   virtual void on_commit(uint start_idx, size_t num_regions, bool zero_filled);
 119 };
 120 
 121 class G1CollectedHeap : public CollectedHeap {
 122   friend class G1FreeCollectionSetTask;
 123   friend class VM_CollectForMetadataAllocation;
 124   friend class VM_G1CollectForAllocation;
 125   friend class VM_G1CollectFull;
 126   friend class VM_G1IncCollectionPause;
 127   friend class VMStructs;
 128   friend class MutatorAllocRegion;
 129   friend class G1FullCollector;
 130   friend class G1GCAllocRegion;
 131   friend class G1HeapVerifier;
 132 
 133   // Closures used in implementation.
 134   friend class G1ParScanThreadState;
 135   friend class G1ParScanThreadStateSet;
 136   friend class G1ParTask;
 137   friend class G1PLABAllocator;
 138   friend class G1PrepareCompactClosure;
 139 
 140   // Other related classes.
 141   friend class HeapRegionClaimer;
 142 
 143   // Testing classes.
 144   friend class G1CheckCSetFastTableClosure;
 145 
 146 private:
 147   G1YoungRemSetSamplingThread* _young_gen_sampling_thread;
 148 
 149   WorkGang* _workers;


 501   // - it returns false if it is unable to do the collection due to the
 502   //   GC locker being active, true otherwise.
 503   bool do_full_collection(bool explicit_gc,
 504                           bool clear_all_soft_refs);
 505 
 506   // Callback from VM_G1CollectFull operation, or collect_as_vm_thread.
 507   virtual void do_full_collection(bool clear_all_soft_refs);
 508 
 509   // Resize the heap if necessary after a full collection.
 510   void resize_if_necessary_after_full_collection();
 511 
 512   // Callback from VM_G1CollectForAllocation operation.
 513   // This function does everything necessary/possible to satisfy a
 514   // failed allocation request (including collection, expansion, etc.)
 515   HeapWord* satisfy_failed_allocation(size_t word_size,
 516                                       AllocationContext_t context,
 517                                       bool* succeeded);
 518 private:
 519   // Internal helpers used during full GC to split it up to
 520   // increase readability.

 521   void abort_concurrent_cycle();
 522   void verify_before_full_collection(bool explicit_gc);
 523   void prepare_heap_for_full_collection();
 524   void prepare_heap_for_mutators();
 525   void abort_refinement();
 526   void verify_after_full_collection();
 527   void print_heap_after_full_collection(G1HeapTransition* heap_transition);
 528 
 529   // Helper method for satisfy_failed_allocation()
 530   HeapWord* satisfy_failed_allocation_helper(size_t word_size,
 531                                              AllocationContext_t context,
 532                                              bool do_gc,
 533                                              bool clear_all_soft_refs,
 534                                              bool expect_null_mutator_alloc_region,
 535                                              bool* gc_succeeded);
 536 
 537 protected:
 538   // Attempting to expand the heap sufficiently
 539   // to support an allocation of the given "word_size".  If
 540   // successful, perform the allocation and return the address of the


< prev index next >