Mercurial > hg > graal-jvmci-8
comparison src/share/vm/memory/cardTableRS.cpp @ 6:73e96e5c30df
6624765: Guarantee failure "Unexpected dirty card found"
Summary: In verification take into account partial coverage of a region by a card and expansion of the card table.
Reviewed-by: ysr, apetrusenko
author | jmasa |
---|---|
date | Fri, 15 Feb 2008 07:01:10 -0800 |
parents | a61af66fc99e |
children | ba764ed4b6f2 |
comparison
equal
deleted
inserted
replaced
5:f21b879b4c72 | 6:73e96e5c30df |
---|---|
554 VerifyCTSpaceClosure perm_space_blk(this, pg_boundary); | 554 VerifyCTSpaceClosure perm_space_blk(this, pg_boundary); |
555 SharedHeap::heap()->perm_gen()->space_iterate(&perm_space_blk, true); | 555 SharedHeap::heap()->perm_gen()->space_iterate(&perm_space_blk, true); |
556 } | 556 } |
557 | 557 |
558 | 558 |
559 void CardTableRS::verify_empty(MemRegion mr) { | 559 void CardTableRS::verify_aligned_region_empty(MemRegion mr) { |
560 if (!mr.is_empty()) { | 560 if (!mr.is_empty()) { |
561 jbyte* cur_entry = byte_for(mr.start()); | 561 jbyte* cur_entry = byte_for(mr.start()); |
562 jbyte* limit = byte_after(mr.last()); | 562 jbyte* limit = byte_after(mr.last()); |
563 // The region mr may not start on a card boundary so | |
564 // the first card may reflect a write to the space | |
565 // just prior to mr. | |
566 if (!is_aligned(mr.start())) { | |
567 cur_entry++; | |
568 } | |
563 for (;cur_entry < limit; cur_entry++) { | 569 for (;cur_entry < limit; cur_entry++) { |
564 guarantee(*cur_entry == CardTableModRefBS::clean_card, | 570 guarantee(*cur_entry == CardTableModRefBS::clean_card, |
565 "Unexpected dirty card found"); | 571 "Unexpected dirty card found"); |
566 } | 572 } |
567 } | 573 } |