Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp @ 994:753cf9794df9
6885169: merge of 4957990 and 6863023 causes conflict on do_nmethods
Summary: After mechanically merging changes, some by-hand adjustments are needed.
Reviewed-by: ysr
author | jrose |
---|---|
date | Wed, 23 Sep 2009 23:57:44 -0700 |
parents | 54b3b351d6f9 |
children | 0e2d7ae2bc67 |
comparison
equal
deleted
inserted
replaced
993:54b3b351d6f9 | 994:753cf9794df9 |
---|---|
2850 ResourceMark rm; | 2850 ResourceMark rm; |
2851 HandleMark hm; | 2851 HandleMark hm; |
2852 GenCollectedHeap* gch = GenCollectedHeap::heap(); | 2852 GenCollectedHeap* gch = GenCollectedHeap::heap(); |
2853 | 2853 |
2854 // Mark from roots one level into CMS | 2854 // Mark from roots one level into CMS |
2855 MarkRefsIntoClosure notOlder(_span, verification_mark_bm(), true /* nmethods */); | 2855 MarkRefsIntoClosure notOlder(_span, verification_mark_bm()); |
2856 gch->rem_set()->prepare_for_younger_refs_iterate(false); // Not parallel. | 2856 gch->rem_set()->prepare_for_younger_refs_iterate(false); // Not parallel. |
2857 | 2857 |
2858 gch->gen_process_strong_roots(_cmsGen->level(), | 2858 gch->gen_process_strong_roots(_cmsGen->level(), |
2859 true, // younger gens are roots | 2859 true, // younger gens are roots |
2860 true, // activate StrongRootsScope | 2860 true, // activate StrongRootsScope |
2902 HandleMark hm; | 2902 HandleMark hm; |
2903 GenCollectedHeap* gch = GenCollectedHeap::heap(); | 2903 GenCollectedHeap* gch = GenCollectedHeap::heap(); |
2904 | 2904 |
2905 // Mark from roots one level into CMS | 2905 // Mark from roots one level into CMS |
2906 MarkRefsIntoVerifyClosure notOlder(_span, verification_mark_bm(), | 2906 MarkRefsIntoVerifyClosure notOlder(_span, verification_mark_bm(), |
2907 markBitMap(), true /* nmethods */); | 2907 markBitMap()); |
2908 gch->rem_set()->prepare_for_younger_refs_iterate(false); // Not parallel. | 2908 gch->rem_set()->prepare_for_younger_refs_iterate(false); // Not parallel. |
2909 gch->gen_process_strong_roots(_cmsGen->level(), | 2909 gch->gen_process_strong_roots(_cmsGen->level(), |
2910 true, // younger gens are roots | 2910 true, // younger gens are roots |
2911 true, // activate StrongRootsScope | 2911 true, // activate StrongRootsScope |
2912 true, // collecting perm gen | 2912 true, // collecting perm gen |
3488 HandleMark hm; | 3488 HandleMark hm; |
3489 | 3489 |
3490 FalseClosure falseClosure; | 3490 FalseClosure falseClosure; |
3491 // In the case of a synchronous collection, we will elide the | 3491 // In the case of a synchronous collection, we will elide the |
3492 // remark step, so it's important to catch all the nmethod oops | 3492 // remark step, so it's important to catch all the nmethod oops |
3493 // in this step; hence the last argument to the constrcutor below. | 3493 // in this step. |
3494 MarkRefsIntoClosure notOlder(_span, &_markBitMap, !asynch /* nmethods */); | 3494 // The final 'true' flag to gen_process_strong_roots will ensure this. |
3495 // If 'async' is true, we can relax the nmethod tracing. | |
3496 MarkRefsIntoClosure notOlder(_span, &_markBitMap); | |
3495 GenCollectedHeap* gch = GenCollectedHeap::heap(); | 3497 GenCollectedHeap* gch = GenCollectedHeap::heap(); |
3496 | 3498 |
3497 verify_work_stacks_empty(); | 3499 verify_work_stacks_empty(); |
3498 verify_overflow_empty(); | 3500 verify_overflow_empty(); |
3499 | 3501 |
6439 // assumes that we do not need to re-mark dirty cards; if the CMS | 6441 // assumes that we do not need to re-mark dirty cards; if the CMS |
6440 // generation on which this is used is not an oldest (modulo perm gen) | 6442 // generation on which this is used is not an oldest (modulo perm gen) |
6441 // generation then this will lose younger_gen cards! | 6443 // generation then this will lose younger_gen cards! |
6442 | 6444 |
6443 MarkRefsIntoClosure::MarkRefsIntoClosure( | 6445 MarkRefsIntoClosure::MarkRefsIntoClosure( |
6444 MemRegion span, CMSBitMap* bitMap, bool should_do_nmethods): | 6446 MemRegion span, CMSBitMap* bitMap): |
6445 _span(span), | 6447 _span(span), |
6446 _bitMap(bitMap), | 6448 _bitMap(bitMap) |
6447 _should_do_nmethods(should_do_nmethods) | |
6448 { | 6449 { |
6449 assert(_ref_processor == NULL, "deliberately left NULL"); | 6450 assert(_ref_processor == NULL, "deliberately left NULL"); |
6450 assert(_bitMap->covers(_span), "_bitMap/_span mismatch"); | 6451 assert(_bitMap->covers(_span), "_bitMap/_span mismatch"); |
6451 } | 6452 } |
6452 | 6453 |
6463 void MarkRefsIntoClosure::do_oop(oop* p) { MarkRefsIntoClosure::do_oop_work(p); } | 6464 void MarkRefsIntoClosure::do_oop(oop* p) { MarkRefsIntoClosure::do_oop_work(p); } |
6464 void MarkRefsIntoClosure::do_oop(narrowOop* p) { MarkRefsIntoClosure::do_oop_work(p); } | 6465 void MarkRefsIntoClosure::do_oop(narrowOop* p) { MarkRefsIntoClosure::do_oop_work(p); } |
6465 | 6466 |
6466 // A variant of the above, used for CMS marking verification. | 6467 // A variant of the above, used for CMS marking verification. |
6467 MarkRefsIntoVerifyClosure::MarkRefsIntoVerifyClosure( | 6468 MarkRefsIntoVerifyClosure::MarkRefsIntoVerifyClosure( |
6468 MemRegion span, CMSBitMap* verification_bm, CMSBitMap* cms_bm, | 6469 MemRegion span, CMSBitMap* verification_bm, CMSBitMap* cms_bm): |
6469 bool should_do_nmethods): | |
6470 _span(span), | 6470 _span(span), |
6471 _verification_bm(verification_bm), | 6471 _verification_bm(verification_bm), |
6472 _cms_bm(cms_bm), | 6472 _cms_bm(cms_bm) |
6473 _should_do_nmethods(should_do_nmethods) { | 6473 { |
6474 assert(_ref_processor == NULL, "deliberately left NULL"); | 6474 assert(_ref_processor == NULL, "deliberately left NULL"); |
6475 assert(_verification_bm->covers(_span), "_verification_bm/_span mismatch"); | 6475 assert(_verification_bm->covers(_span), "_verification_bm/_span mismatch"); |
6476 } | 6476 } |
6477 | 6477 |
6478 void MarkRefsIntoVerifyClosure::do_oop(oop obj) { | 6478 void MarkRefsIntoVerifyClosure::do_oop(oop obj) { |