src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hs-gc-chunked-growablearray Sdiff src/share/vm/gc_implementation/g1

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

Print this page




  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1COLLECTEDHEAP_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_G1_G1COLLECTEDHEAP_HPP
  27 
  28 #include "gc_implementation/g1/concurrentMark.hpp"
  29 #include "gc_implementation/g1/g1AllocRegion.hpp"
  30 #include "gc_implementation/g1/g1HRPrinter.hpp"
  31 #include "gc_implementation/g1/g1RemSet.hpp"
  32 #include "gc_implementation/g1/g1MonitoringSupport.hpp"
  33 #include "gc_implementation/g1/heapRegionSeq.hpp"
  34 #include "gc_implementation/g1/heapRegionSets.hpp"
  35 #include "gc_implementation/shared/hSpaceCounters.hpp"
  36 #include "gc_implementation/shared/parGCAllocBuffer.hpp"
  37 #include "memory/barrierSet.hpp"
  38 #include "memory/memRegion.hpp"
  39 #include "memory/sharedHeap.hpp"

  40 
  41 // A "G1CollectedHeap" is an implementation of a java heap for HotSpot.
  42 // It uses the "Garbage First" heap organization and algorithm, which
  43 // may combine concurrent marking with parallel, incremental compaction of
  44 // heap subsets that will yield large amounts of garbage.
  45 
  46 class HeapRegion;
  47 class HRRSCleanupTask;
  48 class GenerationSpec;
  49 class OopsInHeapRegionClosure;
  50 class G1KlassScanClosure;
  51 class G1ScanHeapEvacClosure;
  52 class ObjectClosure;
  53 class SpaceClosure;
  54 class CompactibleSpaceClosure;
  55 class Space;
  56 class G1CollectorPolicy;
  57 class GenRemSet;
  58 class G1RemSet;
  59 class HeapRegionRemSetIterator;


 860   ConcurrentMarkThread* _cmThread;
 861   bool _mark_in_progress;
 862 
 863   // The concurrent refiner.
 864   ConcurrentG1Refine* _cg1r;
 865 
 866   // The parallel task queues
 867   RefToScanQueueSet *_task_queues;
 868 
 869   // True iff a evacuation has failed in the current collection.
 870   bool _evacuation_failed;
 871 
 872   // Set the attribute indicating whether evacuation has failed in the
 873   // current collection.
 874   void set_evacuation_failed(bool b) { _evacuation_failed = b; }
 875 
 876   // Failed evacuations cause some logical from-space objects to have
 877   // forwarding pointers to themselves.  Reset them.
 878   void remove_self_forwarding_pointers();
 879 
 880   // When one is non-null, so is the other.  Together, they each pair is
 881   // an object with a preserved mark, and its mark value.
 882   GrowableArray<oop>*     _objs_with_preserved_marks;
 883   GrowableArray<markOop>* _preserved_marks_of_objs;
 884 
 885   // Preserve the mark of "obj", if necessary, in preparation for its mark
 886   // word being overwritten with a self-forwarding-pointer.
 887   void preserve_mark_if_necessary(oop obj, markOop m);
 888 
 889   // The stack of evac-failure objects left to be scanned.
 890   GrowableArray<oop>*    _evac_failure_scan_stack;
 891   // The closure to apply to evac-failure objects.
 892 
 893   OopsInHeapRegionClosure* _evac_failure_closure;
 894   // Set the field above.
 895   void
 896   set_evac_failure_closure(OopsInHeapRegionClosure* evac_failure_closure) {
 897     _evac_failure_closure = evac_failure_closure;
 898   }
 899 
 900   // Push "obj" on the scan stack.
 901   void push_on_evac_failure_scan_stack(oop obj);
 902   // Process scan stack entries until the stack is empty.
 903   void drain_evac_failure_scan_stack();




  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1COLLECTEDHEAP_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_G1_G1COLLECTEDHEAP_HPP
  27 
  28 #include "gc_implementation/g1/concurrentMark.hpp"
  29 #include "gc_implementation/g1/g1AllocRegion.hpp"
  30 #include "gc_implementation/g1/g1HRPrinter.hpp"
  31 #include "gc_implementation/g1/g1RemSet.hpp"
  32 #include "gc_implementation/g1/g1MonitoringSupport.hpp"
  33 #include "gc_implementation/g1/heapRegionSeq.hpp"
  34 #include "gc_implementation/g1/heapRegionSets.hpp"
  35 #include "gc_implementation/shared/hSpaceCounters.hpp"
  36 #include "gc_implementation/shared/parGCAllocBuffer.hpp"
  37 #include "memory/barrierSet.hpp"
  38 #include "memory/memRegion.hpp"
  39 #include "memory/sharedHeap.hpp"
  40 #include "utilities/stack.hpp"
  41 
  42 // A "G1CollectedHeap" is an implementation of a java heap for HotSpot.
  43 // It uses the "Garbage First" heap organization and algorithm, which
  44 // may combine concurrent marking with parallel, incremental compaction of
  45 // heap subsets that will yield large amounts of garbage.
  46 
  47 class HeapRegion;
  48 class HRRSCleanupTask;
  49 class GenerationSpec;
  50 class OopsInHeapRegionClosure;
  51 class G1KlassScanClosure;
  52 class G1ScanHeapEvacClosure;
  53 class ObjectClosure;
  54 class SpaceClosure;
  55 class CompactibleSpaceClosure;
  56 class Space;
  57 class G1CollectorPolicy;
  58 class GenRemSet;
  59 class G1RemSet;
  60 class HeapRegionRemSetIterator;


 861   ConcurrentMarkThread* _cmThread;
 862   bool _mark_in_progress;
 863 
 864   // The concurrent refiner.
 865   ConcurrentG1Refine* _cg1r;
 866 
 867   // The parallel task queues
 868   RefToScanQueueSet *_task_queues;
 869 
 870   // True iff a evacuation has failed in the current collection.
 871   bool _evacuation_failed;
 872 
 873   // Set the attribute indicating whether evacuation has failed in the
 874   // current collection.
 875   void set_evacuation_failed(bool b) { _evacuation_failed = b; }
 876 
 877   // Failed evacuations cause some logical from-space objects to have
 878   // forwarding pointers to themselves.  Reset them.
 879   void remove_self_forwarding_pointers();
 880 
 881   // Together, these store an object with a preserved mark, and its mark value.
 882   Stack<oop, mtGC>     _objs_with_preserved_marks;
 883   Stack<markOop, mtGC> _preserved_marks_of_objs;

 884 
 885   // Preserve the mark of "obj", if necessary, in preparation for its mark
 886   // word being overwritten with a self-forwarding-pointer.
 887   void preserve_mark_if_necessary(oop obj, markOop m);
 888 
 889   // The stack of evac-failure objects left to be scanned.
 890   GrowableArray<oop>*    _evac_failure_scan_stack;
 891   // The closure to apply to evac-failure objects.
 892 
 893   OopsInHeapRegionClosure* _evac_failure_closure;
 894   // Set the field above.
 895   void
 896   set_evac_failure_closure(OopsInHeapRegionClosure* evac_failure_closure) {
 897     _evac_failure_closure = evac_failure_closure;
 898   }
 899 
 900   // Push "obj" on the scan stack.
 901   void push_on_evac_failure_scan_stack(oop obj);
 902   // Process scan stack entries until the stack is empty.
 903   void drain_evac_failure_scan_stack();


src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File