Request for review (XS): 6662086 6u2+, 7b11+: CMS never clears referents when -XX:+ParallelRefProcEnabled
John Coomes
John.Coomes at sun.com
Fri May 2 11:33:23 UTC 2008
Y Srinivas Ramakrishna (Y.S.Ramakrishna at Sun.COM) wrote:
> Fixed: 6662086 6u2+, 7b11+: CMS never clears referents when -XX:+ParallelRefProcEnabled
>
> This fixes a regression introduced in 6u2, 7b11, because of which CMS would not
> correctly clear referents when +ParallelRefProcEnabled. This was because
> the CMSIsAliveClosure used during the processing was using an empty span.
> The symptom would typically manifest as a monotonically growing population
> of referents until a stop-world mark-compact collection would reclaim them.
>
> ...
>
Looks fine. One tiny nit relating to the patch hunk below:
> --- old/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Thu May 1 16:05:12 2008
> +++ new/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Thu May 1 16:05:11 2008
> @@ -5531,7 +5532,8 @@
> _mark_bit_map, work_queue(i));
> CMSParDrainMarkingStackClosure par_drain_stack(_collector, _span,
> _mark_bit_map, work_queue(i));
> - CMSIsAliveClosure is_alive_closure(_mark_bit_map);
> + assert(_collector->_span.equals(_span), "Inconsistency in _span");
> + CMSIsAliveClosure is_alive_closure(_span, _mark_bit_map);
> _task.work(i, is_alive_closure, par_keep_alive, par_drain_stack);
> if (_task.marks_oops_alive()) {
> do_work_steal(i, &par_drain_stack, &par_keep_alive,
The new assert appears after two other uses of _collector and _span,
one of which is visible above. Assuming that all uses have the same
requirement, might as well move the assert before the first use.
-John
More information about the hotspot-gc-dev
mailing list