778 void free_collection_set(HeapRegion* cs_head, EvacuationInfo& evacuation_info);
779
780 // Abandon the current collection set without recording policy
781 // statistics or updating free lists.
782 void abandon_collection_set(HeapRegion* cs_head);
783
784 // Applies "scan_non_heap_roots" to roots outside the heap,
785 // "scan_rs" to roots inside the heap (having done "set_region" to
786 // indicate the region in which the root resides),
787 // and does "scan_metadata" If "scan_rs" is
788 // NULL, then this step is skipped. The "worker_i"
789 // param is for use with parallel roots processing, and should be
790 // the "i" of the calling parallel worker thread's work(i) function.
791 // In the sequential case this param will be ignored.
792 void g1_process_roots(OopClosure* scan_non_heap_roots,
793 OopClosure* scan_non_heap_weak_roots,
794 G1ParPushHeapRSClosure* scan_rs,
795 CLDClosure* scan_strong_clds,
796 CLDClosure* scan_weak_clds,
797 CodeBlobClosure* scan_strong_code,
798 uint worker_i);
799
800 // The concurrent marker (and the thread it runs in.)
801 ConcurrentMark* _cm;
802 ConcurrentMarkThread* _cmThread;
803 bool _mark_in_progress;
804
805 // The concurrent refiner.
806 ConcurrentG1Refine* _cg1r;
807
808 // The parallel task queues
809 RefToScanQueueSet *_task_queues;
810
811 // True iff a evacuation has failed in the current collection.
812 bool _evacuation_failed;
813
814 EvacuationFailedInfo* _evacuation_failed_info_array;
815
816 // Failed evacuations cause some logical from-space objects to have
817 // forwarding pointers to themselves. Reset them.
818 void remove_self_forwarding_pointers();
966 ReferenceProcessor* _ref_processor_cm;
967
968 // Instance of the concurrent mark is_alive closure for embedding
969 // into the Concurrent Marking reference processor as the
970 // _is_alive_non_header field. Supplying a value for the
971 // _is_alive_non_header field is optional but doing so prevents
972 // unnecessary additions to the discovered lists during reference
973 // discovery.
974 G1CMIsAliveClosure _is_alive_closure_cm;
975
976 // Cache used by G1CollectedHeap::start_cset_region_for_worker().
977 HeapRegion** _worker_cset_start_region;
978
979 // Time stamp to validate the regions recorded in the cache
980 // used by G1CollectedHeap::start_cset_region_for_worker().
981 // The heap region entry for a given worker is valid iff
982 // the associated time stamp value matches the current value
983 // of G1CollectedHeap::_gc_time_stamp.
984 uint* _worker_cset_start_region_time_stamp;
985
986 enum G1H_process_roots_tasks {
987 G1H_PS_filter_satb_buffers,
988 G1H_PS_refProcessor_oops_do,
989 // Leave this one last.
990 G1H_PS_NumElements
991 };
992
993 SubTasksDone* _process_strong_tasks;
994
995 volatile bool _free_regions_coming;
996
997 public:
998
999 SubTasksDone* process_strong_tasks() { return _process_strong_tasks; }
1000
1001 void set_refine_cte_cl_concurrency(bool concurrent);
1002
1003 RefToScanQueue *task_queue(int i) const;
1004
1005 // A set of cards where updates happened during the GC
1006 DirtyCardQueueSet& dirty_card_queue_set() { return _dirty_card_queue_set; }
1007
1008 // A DirtyCardQueueSet that is used to hold cards that contain
1009 // references into the current collection set. This is used to
1010 // update the remembered sets of the regions in the collection
1011 // set in the event of an evacuation failure.
1012 DirtyCardQueueSet& into_cset_dirty_card_queue_set()
1013 { return _into_cset_dirty_card_queue_set; }
1014
1015 // Create a G1CollectedHeap with the specified policy.
1016 // Must call the initialize method afterwards.
1017 // May not return if something goes wrong.
|
778 void free_collection_set(HeapRegion* cs_head, EvacuationInfo& evacuation_info);
779
780 // Abandon the current collection set without recording policy
781 // statistics or updating free lists.
782 void abandon_collection_set(HeapRegion* cs_head);
783
784 // Applies "scan_non_heap_roots" to roots outside the heap,
785 // "scan_rs" to roots inside the heap (having done "set_region" to
786 // indicate the region in which the root resides),
787 // and does "scan_metadata" If "scan_rs" is
788 // NULL, then this step is skipped. The "worker_i"
789 // param is for use with parallel roots processing, and should be
790 // the "i" of the calling parallel worker thread's work(i) function.
791 // In the sequential case this param will be ignored.
792 void g1_process_roots(OopClosure* scan_non_heap_roots,
793 OopClosure* scan_non_heap_weak_roots,
794 G1ParPushHeapRSClosure* scan_rs,
795 CLDClosure* scan_strong_clds,
796 CLDClosure* scan_weak_clds,
797 CodeBlobClosure* scan_strong_code,
798 uint worker_i,
799 PhaseTimeData* phase_times);
800
801 // The concurrent marker (and the thread it runs in.)
802 ConcurrentMark* _cm;
803 ConcurrentMarkThread* _cmThread;
804 bool _mark_in_progress;
805
806 // The concurrent refiner.
807 ConcurrentG1Refine* _cg1r;
808
809 // The parallel task queues
810 RefToScanQueueSet *_task_queues;
811
812 // True iff a evacuation has failed in the current collection.
813 bool _evacuation_failed;
814
815 EvacuationFailedInfo* _evacuation_failed_info_array;
816
817 // Failed evacuations cause some logical from-space objects to have
818 // forwarding pointers to themselves. Reset them.
819 void remove_self_forwarding_pointers();
967 ReferenceProcessor* _ref_processor_cm;
968
969 // Instance of the concurrent mark is_alive closure for embedding
970 // into the Concurrent Marking reference processor as the
971 // _is_alive_non_header field. Supplying a value for the
972 // _is_alive_non_header field is optional but doing so prevents
973 // unnecessary additions to the discovered lists during reference
974 // discovery.
975 G1CMIsAliveClosure _is_alive_closure_cm;
976
977 // Cache used by G1CollectedHeap::start_cset_region_for_worker().
978 HeapRegion** _worker_cset_start_region;
979
980 // Time stamp to validate the regions recorded in the cache
981 // used by G1CollectedHeap::start_cset_region_for_worker().
982 // The heap region entry for a given worker is valid iff
983 // the associated time stamp value matches the current value
984 // of G1CollectedHeap::_gc_time_stamp.
985 uint* _worker_cset_start_region_time_stamp;
986
987 SubTasksDone* _process_strong_tasks;
988
989 volatile bool _free_regions_coming;
990
991
992 public:
993 enum G1H_process_roots_tasks {
994 G1H_PS_First,
995 G1H_PS_filter_satb_buffers = G1H_PS_First,
996 G1H_PS_refProcessor_oops_do,
997 G1H_PS_wait_strong_cld_nmethods,
998 G1H_PS_weak_clds_oops_do,
999 // Leave this one last.
1000 G1H_PS_NumElements
1001 };
1002
1003 // Returns the number of external root tasks.
1004 static uint num_ext_root_tasks() { return G1H_PS_NumElements + SharedHeap::SH_PS_NumElements; }
1005 // Returns a human readable description of the given external root task.
1006 static const char* ext_roots_task_string(uint i);
1007
1008 SubTasksDone* process_strong_tasks() { return _process_strong_tasks; }
1009
1010 void set_refine_cte_cl_concurrency(bool concurrent);
1011
1012 RefToScanQueue *task_queue(int i) const;
1013
1014 // A set of cards where updates happened during the GC
1015 DirtyCardQueueSet& dirty_card_queue_set() { return _dirty_card_queue_set; }
1016
1017 // A DirtyCardQueueSet that is used to hold cards that contain
1018 // references into the current collection set. This is used to
1019 // update the remembered sets of the regions in the collection
1020 // set in the event of an evacuation failure.
1021 DirtyCardQueueSet& into_cset_dirty_card_queue_set()
1022 { return _into_cset_dirty_card_queue_set; }
1023
1024 // Create a G1CollectedHeap with the specified policy.
1025 // Must call the initialize method afterwards.
1026 // May not return if something goes wrong.
|