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), |