During the code reviews for the changes for 7112743, the observation was made that the routine G1CollectedHeap::start_cset_region_for_worker() calculates a suitable starting heap region (for iterating over the collection set by the worker threads in parallel) by walking a prefix of the collection set. This can penalize some worker threads and delay them from from starting "real work" as they have to walk a longer prefix. It was suggested that attempt to reduce the overhead in some way. A possibility, rather than re-calculate the starting region in the collection for each worker, would be to calculate the starting heap region for each worker once (during RSet scanning) and cache that value for subsequent re-use during the complete_marking_in_collection_set() routine or any other subsequent parallel iteration over the collection set.
|