Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp @ 23224:79b13c9a93e8
8075210: Refactor strong root processing in order to allow G1 to evolve separately from GenCollectedHeap
Summary: Create a G1RootProcessor and move SharedHeap root processing to GenCollectedHeap
Reviewed-by: brutisso, tschatzl, ehelin
author | mgerdin |
---|---|
date | Mon, 01 Dec 2014 15:24:56 +0100 |
parents | b554c7fa9478 |
children | ea47136e6ea4 |
comparison
equal
deleted
inserted
replaced
23223:8f8f1d578796 | 23224:79b13c9a93e8 |
---|---|
809 void free_collection_set(HeapRegion* cs_head, EvacuationInfo& evacuation_info); | 809 void free_collection_set(HeapRegion* cs_head, EvacuationInfo& evacuation_info); |
810 | 810 |
811 // Abandon the current collection set without recording policy | 811 // Abandon the current collection set without recording policy |
812 // statistics or updating free lists. | 812 // statistics or updating free lists. |
813 void abandon_collection_set(HeapRegion* cs_head); | 813 void abandon_collection_set(HeapRegion* cs_head); |
814 | |
815 // Applies "scan_non_heap_roots" to roots outside the heap, | |
816 // "scan_rs" to roots inside the heap (having done "set_region" to | |
817 // indicate the region in which the root resides), | |
818 // and does "scan_metadata" If "scan_rs" is | |
819 // NULL, then this step is skipped. The "worker_i" | |
820 // param is for use with parallel roots processing, and should be | |
821 // the "i" of the calling parallel worker thread's work(i) function. | |
822 // In the sequential case this param will be ignored. | |
823 void g1_process_roots(OopClosure* scan_non_heap_roots, | |
824 OopClosure* scan_non_heap_weak_roots, | |
825 G1ParPushHeapRSClosure* scan_rs, | |
826 CLDClosure* scan_strong_clds, | |
827 CLDClosure* scan_weak_clds, | |
828 CodeBlobClosure* scan_strong_code, | |
829 uint worker_i); | |
830 | 814 |
831 // The concurrent marker (and the thread it runs in.) | 815 // The concurrent marker (and the thread it runs in.) |
832 ConcurrentMark* _cm; | 816 ConcurrentMark* _cm; |
833 ConcurrentMarkThread* _cmThread; | 817 ConcurrentMarkThread* _cmThread; |
834 bool _mark_in_progress; | 818 bool _mark_in_progress; |
1012 // The heap region entry for a given worker is valid iff | 996 // The heap region entry for a given worker is valid iff |
1013 // the associated time stamp value matches the current value | 997 // the associated time stamp value matches the current value |
1014 // of G1CollectedHeap::_gc_time_stamp. | 998 // of G1CollectedHeap::_gc_time_stamp. |
1015 unsigned int* _worker_cset_start_region_time_stamp; | 999 unsigned int* _worker_cset_start_region_time_stamp; |
1016 | 1000 |
1017 enum G1H_process_roots_tasks { | |
1018 G1H_PS_filter_satb_buffers, | |
1019 G1H_PS_refProcessor_oops_do, | |
1020 // Leave this one last. | |
1021 G1H_PS_NumElements | |
1022 }; | |
1023 | |
1024 SubTasksDone* _process_strong_tasks; | |
1025 | |
1026 volatile bool _free_regions_coming; | 1001 volatile bool _free_regions_coming; |
1027 | 1002 |
1028 public: | 1003 public: |
1029 | |
1030 SubTasksDone* process_strong_tasks() { return _process_strong_tasks; } | |
1031 | 1004 |
1032 void set_refine_cte_cl_concurrency(bool concurrent); | 1005 void set_refine_cte_cl_concurrency(bool concurrent); |
1033 | 1006 |
1034 RefToScanQueue *task_queue(int i) const; | 1007 RefToScanQueue *task_queue(int i) const; |
1035 | 1008 |
1059 static size_t conservative_max_heap_alignment(); | 1032 static size_t conservative_max_heap_alignment(); |
1060 | 1033 |
1061 // Initialize weak reference processing. | 1034 // Initialize weak reference processing. |
1062 virtual void ref_processing_init(); | 1035 virtual void ref_processing_init(); |
1063 | 1036 |
1064 void set_par_threads(uint t) { | 1037 // Explicitly import set_par_threads into this scope |
1065 SharedHeap::set_par_threads(t); | 1038 using SharedHeap::set_par_threads; |
1066 // Done in SharedHeap but oddly there are | |
1067 // two _process_strong_tasks's in a G1CollectedHeap | |
1068 // so do it here too. | |
1069 _process_strong_tasks->set_n_threads(t); | |
1070 } | |
1071 | |
1072 // Set _n_par_threads according to a policy TBD. | 1039 // Set _n_par_threads according to a policy TBD. |
1073 void set_par_threads(); | 1040 void set_par_threads(); |
1074 | |
1075 void set_n_termination(int t) { | |
1076 _process_strong_tasks->set_n_threads(t); | |
1077 } | |
1078 | 1041 |
1079 virtual CollectedHeap::Name kind() const { | 1042 virtual CollectedHeap::Name kind() const { |
1080 return CollectedHeap::G1CollectedHeap; | 1043 return CollectedHeap::G1CollectedHeap; |
1081 } | 1044 } |
1082 | 1045 |