Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp @ 143:b5489bb705c9
6662086: 6u4+, 7b11+: CMS never clears referents when -XX:+ParallelRefProcEnabled
Summary: Construct the relevant CMSIsAliveClosure used by CMS during parallel reference processing with the correct span. It had incorrectly been constructed with an empty span, a regression introduced in 6417901.
Reviewed-by: jcoomes
author | ysr |
---|---|
date | Tue, 06 May 2008 15:37:36 -0700 |
parents | ba764ed4b6f2 |
children | d1605aabd0a1 37f87013dfd8 |
comparison
equal
deleted
inserted
replaced
142:8bd1e4487c18 | 143:b5489bb705c9 |
---|---|
433 // ReferenceProcessor class. | 433 // ReferenceProcessor class. |
434 // For objects in the CMS generation, this closure checks | 434 // For objects in the CMS generation, this closure checks |
435 // if the object is "live" (reachable). Used in weak | 435 // if the object is "live" (reachable). Used in weak |
436 // reference processing. | 436 // reference processing. |
437 class CMSIsAliveClosure: public BoolObjectClosure { | 437 class CMSIsAliveClosure: public BoolObjectClosure { |
438 MemRegion _span; | 438 const MemRegion _span; |
439 const CMSBitMap* _bit_map; | 439 const CMSBitMap* _bit_map; |
440 | 440 |
441 friend class CMSCollector; | 441 friend class CMSCollector; |
442 protected: | 442 public: |
443 void set_span(MemRegion span) { _span = span; } | |
444 public: | |
445 CMSIsAliveClosure(CMSBitMap* bit_map): | |
446 _bit_map(bit_map) { } | |
447 | |
448 CMSIsAliveClosure(MemRegion span, | 443 CMSIsAliveClosure(MemRegion span, |
449 CMSBitMap* bit_map): | 444 CMSBitMap* bit_map): |
450 _span(span), | 445 _span(span), |
451 _bit_map(bit_map) { } | 446 _bit_map(bit_map) { |
447 assert(!span.is_empty(), "Empty span could spell trouble"); | |
448 } | |
449 | |
452 void do_object(oop obj) { | 450 void do_object(oop obj) { |
453 assert(false, "not to be invoked"); | 451 assert(false, "not to be invoked"); |
454 } | 452 } |
453 | |
455 bool do_object_b(oop obj); | 454 bool do_object_b(oop obj); |
456 }; | 455 }; |
457 | 456 |
458 | 457 |
459 // Implements AbstractRefProcTaskExecutor for CMS. | 458 // Implements AbstractRefProcTaskExecutor for CMS. |
598 NOT_PRODUCT(size_t _num_par_pushes;) | 597 NOT_PRODUCT(size_t _num_par_pushes;) |
599 | 598 |
600 // ("Weak") Reference processing support | 599 // ("Weak") Reference processing support |
601 ReferenceProcessor* _ref_processor; | 600 ReferenceProcessor* _ref_processor; |
602 CMSIsAliveClosure _is_alive_closure; | 601 CMSIsAliveClosure _is_alive_closure; |
603 // keep this textually after _markBitMap; c'tor dependency | 602 // keep this textually after _markBitMap and _span; c'tor dependency |
604 | 603 |
605 ConcurrentMarkSweepThread* _cmsThread; // the thread doing the work | 604 ConcurrentMarkSweepThread* _cmsThread; // the thread doing the work |
606 ModUnionClosure _modUnionClosure; | 605 ModUnionClosure _modUnionClosure; |
607 ModUnionClosurePar _modUnionClosurePar; | 606 ModUnionClosurePar _modUnionClosurePar; |
608 | 607 |