equal
deleted
inserted
replaced
130 ClassLoaderDataGraph::clear_claimed_marks(); |
130 ClassLoaderDataGraph::clear_claimed_marks(); |
131 |
131 |
132 MarkingCodeBlobClosure follow_code_closure(&GenMarkSweep::follow_root_closure, !CodeBlobToOopClosure::FixRelocations); |
132 MarkingCodeBlobClosure follow_code_closure(&GenMarkSweep::follow_root_closure, !CodeBlobToOopClosure::FixRelocations); |
133 { |
133 { |
134 G1RootProcessor root_processor(g1h, 1); |
134 G1RootProcessor root_processor(g1h, 1); |
135 root_processor.process_strong_roots(&GenMarkSweep::follow_root_closure, |
135 if (ClassUnloading) { |
136 &GenMarkSweep::follow_cld_closure, |
136 root_processor.process_strong_roots(&GenMarkSweep::follow_root_closure, |
137 &follow_code_closure); |
137 &GenMarkSweep::follow_cld_closure, |
|
138 &follow_code_closure); |
|
139 } else { |
|
140 root_processor.process_all_roots_no_string_table( |
|
141 &GenMarkSweep::follow_root_closure, |
|
142 &GenMarkSweep::follow_cld_closure, |
|
143 &follow_code_closure); |
|
144 } |
138 } |
145 } |
139 |
146 |
140 { |
147 { |
141 GCTraceTime(Debug, gc, phases) trace("Reference Processing", gc_timer()); |
148 GCTraceTime(Debug, gc, phases) trace("Reference Processing", gc_timer()); |
142 |
149 |
155 } |
162 } |
156 |
163 |
157 // This is the point where the entire marking should have completed. |
164 // This is the point where the entire marking should have completed. |
158 assert(GenMarkSweep::_marking_stack.is_empty(), "Marking should have completed"); |
165 assert(GenMarkSweep::_marking_stack.is_empty(), "Marking should have completed"); |
159 |
166 |
160 { |
167 if (ClassUnloading) { |
161 GCTraceTime(Debug, gc, phases) trace("Class Unloading", gc_timer()); |
168 GCTraceTime(Debug, gc, phases) trace("Class Unloading", gc_timer()); |
162 |
169 |
163 // Unload classes and purge the SystemDictionary. |
170 // Unload classes and purge the SystemDictionary. |
164 bool purged_class = SystemDictionary::do_unloading(&GenMarkSweep::is_alive); |
171 bool purged_class = SystemDictionary::do_unloading(&GenMarkSweep::is_alive); |
165 |
172 |