Thu, 18 Sep 2014 11:27:59 +0200
8053998: Hot card cache flush chunk size too coarse grained
Summary: Changed the chunk size to a smaller fixed number.
Reviewed-by: tschatzl, mgerdin
1.1 --- a/src/share/vm/gc_implementation/g1/g1HotCardCache.cpp Fri Dec 19 09:21:06 2014 +0100 1.2 +++ b/src/share/vm/gc_implementation/g1/g1HotCardCache.cpp Thu Sep 18 11:27:59 2014 +0200 1.3 @@ -43,9 +43,7 @@ 1.4 _hot_cache_idx = 0; 1.5 1.6 // For refining the cards in the hot cache in parallel 1.7 - uint n_workers = (ParallelGCThreads > 0 ? 1.8 - _g1h->workers()->total_workers() : 1); 1.9 - _hot_cache_par_chunk_size = MAX2(1, _hot_cache_size / (int)n_workers); 1.10 + _hot_cache_par_chunk_size = (int)(ParallelGCThreads > 0 ? ClaimChunkSize : _hot_cache_size); 1.11 _hot_cache_par_claimed_idx = 0; 1.12 1.13 _card_counts.initialize(card_counts_storage);
2.1 --- a/src/share/vm/gc_implementation/g1/g1HotCardCache.hpp Fri Dec 19 09:21:06 2014 +0100 2.2 +++ b/src/share/vm/gc_implementation/g1/g1HotCardCache.hpp Thu Sep 18 11:27:59 2014 +0200 2.3 @@ -70,6 +70,9 @@ 2.4 2.5 G1CardCounts _card_counts; 2.6 2.7 + // The number of cached cards a thread claims when flushing the cache 2.8 + static const int ClaimChunkSize = 32; 2.9 + 2.10 bool default_use_cache() const { 2.11 return (G1ConcRSLogCacheSize > 0); 2.12 }