Mercurial > hg > graal-jvmci-8
comparison src/share/vm/memory/genCollectedHeap.cpp @ 453:c96030fff130
6684579: SoftReference processing can be made more efficient
Summary: For current soft-ref clearing policies, we can decide at marking time if a soft-reference will definitely not be cleared, postponing the decision of whether it will definitely be cleared to the final reference processing phase. This can be especially beneficial in the case of concurrent collectors where the marking is usually concurrent but reference processing is usually not.
Reviewed-by: jmasa
author | ysr |
---|---|
date | Thu, 20 Nov 2008 16:56:09 -0800 |
parents | 850fdf70db2b |
children | 27a80744a83b |
comparison
equal
deleted
inserted
replaced
452:00b023ae2d78 | 453:c96030fff130 |
---|---|
523 // atomic wrt other collectors in this configuration, we | 523 // atomic wrt other collectors in this configuration, we |
524 // are guaranteed to have empty discovered ref lists. | 524 // are guaranteed to have empty discovered ref lists. |
525 if (rp->discovery_is_atomic()) { | 525 if (rp->discovery_is_atomic()) { |
526 rp->verify_no_references_recorded(); | 526 rp->verify_no_references_recorded(); |
527 rp->enable_discovery(); | 527 rp->enable_discovery(); |
528 rp->snap_policy(clear_all_soft_refs); | |
528 } else { | 529 } else { |
529 // collect() will enable discovery as appropriate | 530 // collect() below will enable discovery as appropriate |
530 } | 531 } |
531 _gens[i]->collect(full, clear_all_soft_refs, size, is_tlab); | 532 _gens[i]->collect(full, clear_all_soft_refs, size, is_tlab); |
532 if (!rp->enqueuing_is_done()) { | 533 if (!rp->enqueuing_is_done()) { |
533 rp->enqueue_discovered_references(); | 534 rp->enqueue_discovered_references(); |
534 } else { | 535 } else { |