Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp @ 22909:38d6febe66af
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 | 8e9ede9dd2cd |
children | c04f46b4abe4 |
comparison
equal
deleted
inserted
replaced
22908:c3fcc09c9239 | 22909:38d6febe66af |
---|---|
793 void free_collection_set(HeapRegion* cs_head, EvacuationInfo& evacuation_info); | 793 void free_collection_set(HeapRegion* cs_head, EvacuationInfo& evacuation_info); |
794 | 794 |
795 // Abandon the current collection set without recording policy | 795 // Abandon the current collection set without recording policy |
796 // statistics or updating free lists. | 796 // statistics or updating free lists. |
797 void abandon_collection_set(HeapRegion* cs_head); | 797 void abandon_collection_set(HeapRegion* cs_head); |
798 | |
799 // Applies "scan_non_heap_roots" to roots outside the heap, | |
800 // "scan_rs" to roots inside the heap (having done "set_region" to | |
801 // indicate the region in which the root resides), | |
802 // and does "scan_metadata" If "scan_rs" is | |
803 // NULL, then this step is skipped. The "worker_i" | |
804 // param is for use with parallel roots processing, and should be | |
805 // the "i" of the calling parallel worker thread's work(i) function. | |
806 // In the sequential case this param will be ignored. | |
807 void g1_process_roots(OopClosure* scan_non_heap_roots, | |
808 OopClosure* scan_non_heap_weak_roots, | |
809 G1ParPushHeapRSClosure* scan_rs, | |
810 CLDClosure* scan_strong_clds, | |
811 CLDClosure* scan_weak_clds, | |
812 CodeBlobClosure* scan_strong_code, | |
813 uint worker_i); | |
814 | 798 |
815 // The concurrent marker (and the thread it runs in.) | 799 // The concurrent marker (and the thread it runs in.) |
816 ConcurrentMark* _cm; | 800 ConcurrentMark* _cm; |
817 ConcurrentMarkThread* _cmThread; | 801 ConcurrentMarkThread* _cmThread; |
818 bool _mark_in_progress; | 802 bool _mark_in_progress; |
996 // The heap region entry for a given worker is valid iff | 980 // The heap region entry for a given worker is valid iff |
997 // the associated time stamp value matches the current value | 981 // the associated time stamp value matches the current value |
998 // of G1CollectedHeap::_gc_time_stamp. | 982 // of G1CollectedHeap::_gc_time_stamp. |
999 unsigned int* _worker_cset_start_region_time_stamp; | 983 unsigned int* _worker_cset_start_region_time_stamp; |
1000 | 984 |
1001 enum G1H_process_roots_tasks { | |
1002 G1H_PS_filter_satb_buffers, | |
1003 G1H_PS_refProcessor_oops_do, | |
1004 // Leave this one last. | |
1005 G1H_PS_NumElements | |
1006 }; | |
1007 | |
1008 SubTasksDone* _process_strong_tasks; | |
1009 | |
1010 volatile bool _free_regions_coming; | 985 volatile bool _free_regions_coming; |
1011 | 986 |
1012 public: | 987 public: |
1013 | |
1014 SubTasksDone* process_strong_tasks() { return _process_strong_tasks; } | |
1015 | 988 |
1016 void set_refine_cte_cl_concurrency(bool concurrent); | 989 void set_refine_cte_cl_concurrency(bool concurrent); |
1017 | 990 |
1018 RefToScanQueue *task_queue(int i) const; | 991 RefToScanQueue *task_queue(int i) const; |
1019 | 992 |
1043 static size_t conservative_max_heap_alignment(); | 1016 static size_t conservative_max_heap_alignment(); |
1044 | 1017 |
1045 // Initialize weak reference processing. | 1018 // Initialize weak reference processing. |
1046 virtual void ref_processing_init(); | 1019 virtual void ref_processing_init(); |
1047 | 1020 |
1048 void set_par_threads(uint t) { | 1021 // Explicitly import set_par_threads into this scope |
1049 SharedHeap::set_par_threads(t); | 1022 using SharedHeap::set_par_threads; |
1050 // Done in SharedHeap but oddly there are | |
1051 // two _process_strong_tasks's in a G1CollectedHeap | |
1052 // so do it here too. | |
1053 _process_strong_tasks->set_n_threads(t); | |
1054 } | |
1055 | |
1056 // Set _n_par_threads according to a policy TBD. | 1023 // Set _n_par_threads according to a policy TBD. |
1057 void set_par_threads(); | 1024 void set_par_threads(); |
1058 | |
1059 void set_n_termination(int t) { | |
1060 _process_strong_tasks->set_n_threads(t); | |
1061 } | |
1062 | 1025 |
1063 virtual CollectedHeap::Name kind() const { | 1026 virtual CollectedHeap::Name kind() const { |
1064 return CollectedHeap::G1CollectedHeap; | 1027 return CollectedHeap::G1CollectedHeap; |
1065 } | 1028 } |
1066 | 1029 |