Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/g1RemSet.cpp @ 4090:a88de71c4e3a
7097002: G1: remove a lot of unused / redundant code from the G1CollectorPolicy class
Summary: Major cleanup of the G1CollectorPolicy class. It removes a lot of unused fields and methods and also consolidates replicated information (mainly various ways of counting the number of CSet regions) into one copy.
Reviewed-by: johnc, brutisso
author | tonyp |
---|---|
date | Fri, 18 Nov 2011 12:52:27 -0500 |
parents | ed80554efa25 |
children | bca17e38de00 |
comparison
equal
deleted
inserted
replaced
4077:b1754f3fbbd8 | 4090:a88de71c4e3a |
---|---|
217 // Then thread t will start at region t * floor (n/p) | 217 // Then thread t will start at region t * floor (n/p) |
218 | 218 |
219 HeapRegion* G1RemSet::calculateStartRegion(int worker_i) { | 219 HeapRegion* G1RemSet::calculateStartRegion(int worker_i) { |
220 HeapRegion* result = _g1p->collection_set(); | 220 HeapRegion* result = _g1p->collection_set(); |
221 if (ParallelGCThreads > 0) { | 221 if (ParallelGCThreads > 0) { |
222 size_t cs_size = _g1p->collection_set_size(); | 222 size_t cs_size = _g1p->cset_region_length(); |
223 int n_workers = _g1->workers()->total_workers(); | 223 int n_workers = _g1->workers()->total_workers(); |
224 size_t cs_spans = cs_size / n_workers; | 224 size_t cs_spans = cs_size / n_workers; |
225 size_t ind = cs_spans * worker_i; | 225 size_t ind = cs_spans * worker_i; |
226 for (size_t i = 0; i < ind; i++) | 226 for (size_t i = 0; i < ind; i++) |
227 result = result->next_in_collection_set(); | 227 result = result->next_in_collection_set(); |