229
230 DiscoveredList* discovered_refs() { return _discovered_refs; }
231
232 ReferencePolicy* setup_policy(bool always_clear) {
233 _current_soft_ref_policy = always_clear ?
234 _always_clear_soft_ref_policy : _default_soft_ref_policy;
235 _current_soft_ref_policy->setup(); // snapshot the policy threshold
236 return _current_soft_ref_policy;
237 }
238
239 // Process references with a certain reachability level.
240 void process_discovered_reflist(DiscoveredList refs_lists[],
241 ReferencePolicy* policy,
242 bool clear_referent,
243 BoolObjectClosure* is_alive,
244 OopClosure* keep_alive,
245 VoidClosure* complete_gc,
246 AbstractRefProcTaskExecutor* task_executor,
247 ReferenceProcessorPhaseTimes* phase_times);
248
249 // Work methods used by the method process_discovered_reflist
250 // Phase1: keep alive all those referents that are otherwise
251 // dead but which must be kept alive by policy (and their closure).
252 void process_phase1(DiscoveredList& refs_list,
253 ReferencePolicy* policy,
254 BoolObjectClosure* is_alive,
255 OopClosure* keep_alive,
256 VoidClosure* complete_gc);
257 // Phase2: remove all those references whose referents are
258 // reachable.
259 inline void process_phase2(DiscoveredList& refs_list,
260 BoolObjectClosure* is_alive,
261 OopClosure* keep_alive,
262 VoidClosure* complete_gc) {
263 if (discovery_is_atomic()) {
264 // complete_gc is ignored in this case for this phase
265 pp2_work(refs_list, is_alive, keep_alive);
266 } else {
267 assert(complete_gc != NULL, "Error");
268 pp2_work_concurrent_discovery(refs_list, is_alive,
|
229
230 DiscoveredList* discovered_refs() { return _discovered_refs; }
231
232 ReferencePolicy* setup_policy(bool always_clear) {
233 _current_soft_ref_policy = always_clear ?
234 _always_clear_soft_ref_policy : _default_soft_ref_policy;
235 _current_soft_ref_policy->setup(); // snapshot the policy threshold
236 return _current_soft_ref_policy;
237 }
238
239 // Process references with a certain reachability level.
240 void process_discovered_reflist(DiscoveredList refs_lists[],
241 ReferencePolicy* policy,
242 bool clear_referent,
243 BoolObjectClosure* is_alive,
244 OopClosure* keep_alive,
245 VoidClosure* complete_gc,
246 AbstractRefProcTaskExecutor* task_executor,
247 ReferenceProcessorPhaseTimes* phase_times);
248
249 size_t process_phaseHeapSampling(BoolObjectClosure* is_alive,
250 OopClosure* keep_alive,
251 VoidClosure* complete_gc);
252
253 // Work methods used by the method process_discovered_reflist
254 // Phase1: keep alive all those referents that are otherwise
255 // dead but which must be kept alive by policy (and their closure).
256 void process_phase1(DiscoveredList& refs_list,
257 ReferencePolicy* policy,
258 BoolObjectClosure* is_alive,
259 OopClosure* keep_alive,
260 VoidClosure* complete_gc);
261 // Phase2: remove all those references whose referents are
262 // reachable.
263 inline void process_phase2(DiscoveredList& refs_list,
264 BoolObjectClosure* is_alive,
265 OopClosure* keep_alive,
266 VoidClosure* complete_gc) {
267 if (discovery_is_atomic()) {
268 // complete_gc is ignored in this case for this phase
269 pp2_work(refs_list, is_alive, keep_alive);
270 } else {
271 assert(complete_gc != NULL, "Error");
272 pp2_work_concurrent_discovery(refs_list, is_alive,
|