index

src/share/vm/gc_implementation/g1/g1HotCardCache.cpp

Print this page
rev 7184 : 6979279
rev 7185 : [mq]: rev1

@@ -41,10 +41,11 @@
 
     _n_hot = 0;
     _hot_cache_idx = 0;
 
     // For refining the cards in the hot cache in parallel
+    _hot_cache_par_chunk_size = ClaimChunkSize;
     _hot_cache_par_claimed_idx = 0;
 
     _card_counts.initialize(card_counts_storage);
   }
 }

@@ -96,11 +97,11 @@
   assert(_hot_cache != NULL, "Logic");
   assert(!use_cache(), "cache should be disabled");
   int start_idx;
 
   while ((start_idx = _hot_cache_par_claimed_idx) < _n_hot) { // read once
-    int end_idx = start_idx + ClaimChunkSize;
+    int end_idx = start_idx + _hot_cache_par_chunk_size;
 
     if (start_idx ==
         Atomic::cmpxchg(end_idx, &_hot_cache_par_claimed_idx, start_idx)) {
       // The current worker has successfully claimed the chunk [start_idx..end_idx)
       end_idx = MIN2(end_idx, _n_hot);
index