1 /* |
1 /* |
2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
69 }; |
70 }; |
70 |
71 |
71 void worker_has_discovered_all_strong_classes(); |
72 void worker_has_discovered_all_strong_classes(); |
72 void wait_until_all_strong_classes_discovered(); |
73 void wait_until_all_strong_classes_discovered(); |
73 |
74 |
|
75 void process_all_roots(OopClosure* oops, |
|
76 CLDClosure* clds, |
|
77 CodeBlobClosure* blobs, |
|
78 bool process_string_table); |
|
79 |
74 void process_java_roots(OopClosure* scan_non_heap_roots, |
80 void process_java_roots(OopClosure* scan_non_heap_roots, |
75 CLDClosure* thread_stack_clds, |
81 CLDClosure* thread_stack_clds, |
76 CLDClosure* scan_strong_clds, |
82 CLDClosure* scan_strong_clds, |
77 CLDClosure* scan_weak_clds, |
83 CLDClosure* scan_weak_clds, |
78 CodeBlobClosure* scan_strong_code, |
84 CodeBlobClosure* scan_strong_code, |
81 |
87 |
82 void process_vm_roots(OopClosure* scan_non_heap_roots, |
88 void process_vm_roots(OopClosure* scan_non_heap_roots, |
83 OopClosure* scan_non_heap_weak_roots, |
89 OopClosure* scan_non_heap_weak_roots, |
84 G1GCPhaseTimes* phase_times, |
90 G1GCPhaseTimes* phase_times, |
85 uint worker_i); |
91 uint worker_i); |
|
92 |
|
93 void process_string_table_roots(OopClosure* scan_non_heap_weak_roots, |
|
94 G1GCPhaseTimes* phase_times, |
|
95 uint worker_i); |
|
96 |
|
97 void process_code_cache_roots(CodeBlobClosure* code_closure, |
|
98 G1GCPhaseTimes* phase_times, |
|
99 uint worker_i); |
86 |
100 |
87 public: |
101 public: |
88 G1RootProcessor(G1CollectedHeap* g1h); |
102 G1RootProcessor(G1CollectedHeap* g1h); |
89 |
103 |
90 // Apply closures to the strongly and weakly reachable roots in the system |
104 // Apply closures to the strongly and weakly reachable roots in the system |
112 // (having done "set_region" to indicate the region in which the root resides), |
126 // (having done "set_region" to indicate the region in which the root resides), |
113 void scan_remembered_sets(G1ParPushHeapRSClosure* scan_rs, |
127 void scan_remembered_sets(G1ParPushHeapRSClosure* scan_rs, |
114 OopClosure* scan_non_heap_weak_roots, |
128 OopClosure* scan_non_heap_weak_roots, |
115 uint worker_i); |
129 uint worker_i); |
116 |
130 |
|
131 // Apply oops, clds and blobs to strongly and weakly reachable roots in the system, |
|
132 // the only thing different from process_all_roots is that we skip the string table |
|
133 // to avoid keeping every string live when doing class unloading. |
|
134 void process_all_roots_no_string_table(OopClosure* oops, |
|
135 CLDClosure* clds, |
|
136 CodeBlobClosure* blobs); |
|
137 |
117 // Inform the root processor about the number of worker threads |
138 // Inform the root processor about the number of worker threads |
118 void set_num_workers(int active_workers); |
139 void set_num_workers(int active_workers); |
119 }; |
140 }; |
120 |
141 |
121 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_ROOTPROCESSOR_HPP |
142 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_ROOTPROCESSOR_HPP |