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

changeset 1230
215f81b4d9b3
parent 1229
315a5d70b295
child 1242
d44bdab1c03d
equal deleted inserted replaced
1229:315a5d70b295 1230:215f81b4d9b3
1050 } 1050 }
1051 1051
1052 1052
1053 } 1053 }
1054 1054
1055 // Determines how many threads can add records to an rset in parallel.
1056 // This can be done by either mutator threads together with the
1057 // concurrent refinement threads or GC threads.
1055 int HeapRegionRemSet::num_par_rem_sets() { 1058 int HeapRegionRemSet::num_par_rem_sets() {
1056 // We always have at least two, so that a mutator thread can claim an 1059 return (int)MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), ParallelGCThreads);
1057 // id and add to a rem set.
1058 return (int) MAX2(ParallelGCThreads, (size_t)2);
1059 } 1060 }
1060 1061
1061 HeapRegionRemSet::HeapRegionRemSet(G1BlockOffsetSharedArray* bosa, 1062 HeapRegionRemSet::HeapRegionRemSet(G1BlockOffsetSharedArray* bosa,
1062 HeapRegion* hr) 1063 HeapRegion* hr)
1063 : _bosa(bosa), _other_regions(hr), 1064 : _bosa(bosa), _other_regions(hr),

mercurial