Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/g1/g1RemSet.cpp @ 14909:4ca6dc0799b6
Backout jdk9 merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 13:57:07 +0200 |
parents | 937cf56dede6 |
children | 52b4284cb496 |
comparison
equal
deleted
inserted
replaced
14908:8db6e76cb658 | 14909:4ca6dc0799b6 |
---|---|
21 * questions. | 21 * questions. |
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 #include "precompiled.hpp" | 25 #include "precompiled.hpp" |
26 #include "gc_implementation/g1/bufferingOopClosure.hpp" | |
26 #include "gc_implementation/g1/concurrentG1Refine.hpp" | 27 #include "gc_implementation/g1/concurrentG1Refine.hpp" |
27 #include "gc_implementation/g1/concurrentG1RefineThread.hpp" | 28 #include "gc_implementation/g1/concurrentG1RefineThread.hpp" |
28 #include "gc_implementation/g1/g1BlockOffsetTable.inline.hpp" | 29 #include "gc_implementation/g1/g1BlockOffsetTable.inline.hpp" |
29 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" | 30 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" |
30 #include "gc_implementation/g1/g1CollectorPolicy.hpp" | 31 #include "gc_implementation/g1/g1CollectorPolicy.hpp" |
192 // regions, or we successfully claimed the region. | 193 // regions, or we successfully claimed the region. |
193 | 194 |
194 HeapRegionRemSetIterator iter(hrrs); | 195 HeapRegionRemSetIterator iter(hrrs); |
195 size_t card_index; | 196 size_t card_index; |
196 | 197 |
197 // We claim cards in block so as to reduce the contention. The block size is determined by | 198 // We claim cards in block so as to recude the contention. The block size is determined by |
198 // the G1RSetScanBlockSize parameter. | 199 // the G1RSetScanBlockSize parameter. |
199 size_t jump_to_card = hrrs->iter_claimed_next(_block_size); | 200 size_t jump_to_card = hrrs->iter_claimed_next(_block_size); |
200 for (size_t current_card = 0; iter.has_next(card_index); current_card++) { | 201 for (size_t current_card = 0; iter.has_next(card_index); current_card++) { |
201 if (current_card >= jump_to_card + _block_size) { | 202 if (current_card >= jump_to_card + _block_size) { |
202 jump_to_card = hrrs->iter_claimed_next(_block_size); | 203 jump_to_card = hrrs->iter_claimed_next(_block_size); |
584 return false; | 585 return false; |
585 } | 586 } |
586 | 587 |
587 // While we are processing RSet buffers during the collection, we | 588 // While we are processing RSet buffers during the collection, we |
588 // actually don't want to scan any cards on the collection set, | 589 // actually don't want to scan any cards on the collection set, |
589 // since we don't want to update remembered sets with entries that | 590 // since we don't want to update remebered sets with entries that |
590 // point into the collection set, given that live objects from the | 591 // point into the collection set, given that live objects from the |
591 // collection set are about to move and such entries will be stale | 592 // collection set are about to move and such entries will be stale |
592 // very soon. This change also deals with a reliability issue which | 593 // very soon. This change also deals with a reliability issue which |
593 // involves scanning a card in the collection set and coming across | 594 // involves scanning a card in the collection set and coming across |
594 // an array that was being chunked and looking malformed. Note, | 595 // an array that was being chunked and looking malformed. Note, |