--- a/hotspot/src/share/vm/memory/cardTableModRefBS.hpp Fri May 06 09:45:18 2011 +0200
+++ b/hotspot/src/share/vm/memory/cardTableModRefBS.hpp Tue May 10 00:33:21 2011 -0700
@@ -173,18 +173,17 @@
// A variant of the above that will operate in a parallel mode if
// worker threads are available, and clear the dirty cards as it
// processes them.
- // ClearNoncleanCardWrapper cl must wrap the DirtyCardToOopClosure dcto_cl,
- // which may itself be modified by the method.
+ // XXX ??? MemRegionClosure above vs OopsInGenClosure below XXX
+ // XXX some new_dcto_cl's take OopClosure's, plus as above there are
+ // some MemRegionClosures. Clean this up everywhere. XXX
void non_clean_card_iterate_possibly_parallel(Space* sp, MemRegion mr,
- DirtyCardToOopClosure* dcto_cl,
- ClearNoncleanCardWrapper* cl);
+ OopsInGenClosure* cl, CardTableRS* ct);
private:
// Work method used to implement non_clean_card_iterate_possibly_parallel()
// above in the parallel case.
void non_clean_card_iterate_parallel_work(Space* sp, MemRegion mr,
- DirtyCardToOopClosure* dcto_cl,
- ClearNoncleanCardWrapper* cl,
+ OopsInGenClosure* cl, CardTableRS* ct,
int n_threads);
protected:
@@ -198,11 +197,6 @@
// *** Support for parallel card scanning.
- enum SomeConstantsForParallelism {
- StridesPerThread = 2,
- CardsPerStrideChunk = 256
- };
-
// This is an array, one element per covered region of the card table.
// Each entry is itself an array, with one element per chunk in the
// covered region. Each entry of these arrays is the lowest non-clean
@@ -235,7 +229,7 @@
// covers the given address.
uintptr_t addr_to_chunk_index(const void* addr) {
uintptr_t card = (uintptr_t) byte_for(addr);
- return card / CardsPerStrideChunk;
+ return card / ParGCCardsPerStrideChunk;
}
// Apply cl, which must either itself apply dcto_cl or be dcto_cl,
@@ -243,8 +237,8 @@
void process_stride(Space* sp,
MemRegion used,
jint stride, int n_strides,
- DirtyCardToOopClosure* dcto_cl,
- ClearNoncleanCardWrapper* cl,
+ OopsInGenClosure* cl,
+ CardTableRS* ct,
jbyte** lowest_non_clean,
uintptr_t lowest_non_clean_base_chunk_index,
size_t lowest_non_clean_chunk_size);
@@ -482,7 +476,7 @@
void verify_dirty_region(MemRegion mr) PRODUCT_RETURN;
static size_t par_chunk_heapword_alignment() {
- return CardsPerStrideChunk * card_size_in_words;
+ return ParGCCardsPerStrideChunk * card_size_in_words;
}
};