Skip to content

Commit f92526e

Browse files
author
Thomas Schatzl
committed
8231189: Rename worker_i parameters to worker_id
Reviewed-by: kbarrett, sjohanss
1 parent 03e769b commit f92526e

14 files changed

+66
-66
lines changed

src/hotspot/share/gc/g1/g1CollectedHeap.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class RedirtyLoggedCardTableEntryClosure : public G1CardTableEntryClosure {
132132
RedirtyLoggedCardTableEntryClosure(G1CollectedHeap* g1h) : G1CardTableEntryClosure(),
133133
_num_dirtied(0), _g1h(g1h), _g1_ct(g1h->card_table()) { }
134134

135-
void do_card_ptr(CardValue* card_ptr, uint worker_i) {
135+
void do_card_ptr(CardValue* card_ptr, uint worker_id) {
136136
HeapRegion* hr = region_for_card(card_ptr);
137137

138138
// Should only dirty cards in regions that won't be freed.
@@ -1938,8 +1938,8 @@ size_t G1CollectedHeap::unused_committed_regions_in_bytes() const {
19381938
return _hrm->total_free_bytes();
19391939
}
19401940

1941-
void G1CollectedHeap::iterate_hcc_closure(G1CardTableEntryClosure* cl, uint worker_i) {
1942-
_hot_card_cache->drain(cl, worker_i);
1941+
void G1CollectedHeap::iterate_hcc_closure(G1CardTableEntryClosure* cl, uint worker_id) {
1942+
_hot_card_cache->drain(cl, worker_id);
19431943
}
19441944

19451945
// Computes the sum of the storage used by the various regions.

src/hotspot/share/gc/g1/g1CollectedHeap.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ class G1CollectedHeap : public CollectedHeap {
991991
void scrub_rem_set();
992992

993993
// Apply the given closure on all cards in the Hot Card Cache, emptying it.
994-
void iterate_hcc_closure(G1CardTableEntryClosure* cl, uint worker_i);
994+
void iterate_hcc_closure(G1CardTableEntryClosure* cl, uint worker_id);
995995

996996
// The shared block offset table array.
997997
G1BlockOffsetTable* bot() const { return _bot; }

src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,19 +198,19 @@ inline size_t deactivation_level(const Thresholds& t) { return t.second; }
198198

199199
static Thresholds calc_thresholds(size_t green_zone,
200200
size_t yellow_zone,
201-
uint worker_i) {
201+
uint worker_id) {
202202
double yellow_size = yellow_zone - green_zone;
203203
double step = yellow_size / G1ConcurrentRefine::max_num_threads();
204-
if (worker_i == 0) {
204+
if (worker_id == 0) {
205205
// Potentially activate worker 0 more aggressively, to keep
206206
// available buffers near green_zone value. When yellow_size is
207207
// large we don't want to allow a full step to accumulate before
208208
// doing any processing, as that might lead to significantly more
209209
// than green_zone buffers to be processed during scanning.
210210
step = MIN2(step, ParallelGCThreads / 2.0);
211211
}
212-
size_t activate_offset = static_cast<size_t>(ceil(step * (worker_i + 1)));
213-
size_t deactivate_offset = static_cast<size_t>(floor(step * worker_i));
212+
size_t activate_offset = static_cast<size_t>(ceil(step * (worker_id + 1)));
213+
size_t deactivate_offset = static_cast<size_t>(floor(step * worker_id));
214214
return Thresholds(green_zone + activate_offset,
215215
green_zone + deactivate_offset);
216216
}

src/hotspot/share/gc/g1/g1DirtyCardQueue.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class G1DirtyCardQueueSet: public PtrQueueSet {
158158
// Stops processing a buffer if SuspendibleThreadSet::should_yield(),
159159
// returning the incompletely processed buffer to the completed buffer
160160
// list, for later processing of the remainder.
161-
bool refine_completed_buffer_concurrently(uint worker_i, size_t stop_at);
161+
bool refine_completed_buffer_concurrently(uint worker_id, size_t stop_at);
162162

163163
// If a full collection is happening, reset partial logs, and release
164164
// completed ones: the full collection will make them all irrelevant.

src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -272,37 +272,37 @@ void G1GCPhaseTimes::note_gc_end() {
272272
#undef ASSERT_PHASE_UNINITIALIZED
273273

274274
// record the time a phase took in seconds
275-
void G1GCPhaseTimes::record_time_secs(GCParPhases phase, uint worker_i, double secs) {
276-
_gc_par_phases[phase]->set(worker_i, secs);
275+
void G1GCPhaseTimes::record_time_secs(GCParPhases phase, uint worker_id, double secs) {
276+
_gc_par_phases[phase]->set(worker_id, secs);
277277
}
278278

279279
// add a number of seconds to a phase
280-
void G1GCPhaseTimes::add_time_secs(GCParPhases phase, uint worker_i, double secs) {
281-
_gc_par_phases[phase]->add(worker_i, secs);
280+
void G1GCPhaseTimes::add_time_secs(GCParPhases phase, uint worker_id, double secs) {
281+
_gc_par_phases[phase]->add(worker_id, secs);
282282
}
283283

284-
void G1GCPhaseTimes::record_or_add_time_secs(GCParPhases phase, uint worker_i, double secs) {
285-
if (_gc_par_phases[phase]->get(worker_i) == _gc_par_phases[phase]->uninitialized()) {
286-
record_time_secs(phase, worker_i, secs);
284+
void G1GCPhaseTimes::record_or_add_time_secs(GCParPhases phase, uint worker_id, double secs) {
285+
if (_gc_par_phases[phase]->get(worker_id) == _gc_par_phases[phase]->uninitialized()) {
286+
record_time_secs(phase, worker_id, secs);
287287
} else {
288-
add_time_secs(phase, worker_i, secs);
288+
add_time_secs(phase, worker_id, secs);
289289
}
290290
}
291291

292-
double G1GCPhaseTimes::get_time_secs(GCParPhases phase, uint worker_i) {
293-
return _gc_par_phases[phase]->get(worker_i);
292+
double G1GCPhaseTimes::get_time_secs(GCParPhases phase, uint worker_id) {
293+
return _gc_par_phases[phase]->get(worker_id);
294294
}
295295

296-
void G1GCPhaseTimes::record_thread_work_item(GCParPhases phase, uint worker_i, size_t count, uint index) {
297-
_gc_par_phases[phase]->set_thread_work_item(worker_i, count, index);
296+
void G1GCPhaseTimes::record_thread_work_item(GCParPhases phase, uint worker_id, size_t count, uint index) {
297+
_gc_par_phases[phase]->set_thread_work_item(worker_id, count, index);
298298
}
299299

300-
void G1GCPhaseTimes::record_or_add_thread_work_item(GCParPhases phase, uint worker_i, size_t count, uint index) {
301-
_gc_par_phases[phase]->set_or_add_thread_work_item(worker_i, count, index);
300+
void G1GCPhaseTimes::record_or_add_thread_work_item(GCParPhases phase, uint worker_id, size_t count, uint index) {
301+
_gc_par_phases[phase]->set_or_add_thread_work_item(worker_id, count, index);
302302
}
303303

304-
size_t G1GCPhaseTimes::get_thread_work_item(GCParPhases phase, uint worker_i, uint index) {
305-
return _gc_par_phases[phase]->get_thread_work_item(worker_i, index);
304+
size_t G1GCPhaseTimes::get_thread_work_item(GCParPhases phase, uint worker_id, uint index) {
305+
return _gc_par_phases[phase]->get_thread_work_item(worker_id, index);
306306
}
307307

308308
// return the average time for a phase in milliseconds

src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -250,20 +250,20 @@ class G1GCPhaseTimes : public CHeapObj<mtGC> {
250250
static const char* phase_name(GCParPhases phase);
251251

252252
// record the time a phase took in seconds
253-
void record_time_secs(GCParPhases phase, uint worker_i, double secs);
253+
void record_time_secs(GCParPhases phase, uint worker_id, double secs);
254254

255255
// add a number of seconds to a phase
256-
void add_time_secs(GCParPhases phase, uint worker_i, double secs);
256+
void add_time_secs(GCParPhases phase, uint worker_id, double secs);
257257

258-
void record_or_add_time_secs(GCParPhases phase, uint worker_i, double secs);
258+
void record_or_add_time_secs(GCParPhases phase, uint worker_id, double secs);
259259

260-
double get_time_secs(GCParPhases phase, uint worker_i);
260+
double get_time_secs(GCParPhases phase, uint worker_id);
261261

262-
void record_thread_work_item(GCParPhases phase, uint worker_i, size_t count, uint index = 0);
262+
void record_thread_work_item(GCParPhases phase, uint worker_id, size_t count, uint index = 0);
263263

264-
void record_or_add_thread_work_item(GCParPhases phase, uint worker_i, size_t count, uint index = 0);
264+
void record_or_add_thread_work_item(GCParPhases phase, uint worker_id, size_t count, uint index = 0);
265265

266-
size_t get_thread_work_item(GCParPhases phase, uint worker_i, uint index = 0);
266+
size_t get_thread_work_item(GCParPhases phase, uint worker_id, uint index = 0);
267267

268268
// return the average time for a phase in milliseconds
269269
double average_time_ms(GCParPhases phase);

src/hotspot/share/gc/g1/g1HotCardCache.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ CardTable::CardValue* G1HotCardCache::insert(CardValue* card_ptr) {
8484
return (previous_ptr == current_ptr) ? previous_ptr : card_ptr;
8585
}
8686

87-
void G1HotCardCache::drain(G1CardTableEntryClosure* cl, uint worker_i) {
87+
void G1HotCardCache::drain(G1CardTableEntryClosure* cl, uint worker_id) {
8888
assert(default_use_cache(), "Drain only necessary if we use the hot card cache.");
8989

9090
assert(_hot_cache != NULL, "Logic");
@@ -99,7 +99,7 @@ void G1HotCardCache::drain(G1CardTableEntryClosure* cl, uint worker_i) {
9999
for (size_t i = start_idx; i < end_idx; i++) {
100100
CardValue* card_ptr = _hot_cache[i];
101101
if (card_ptr != NULL) {
102-
cl->do_card_ptr(card_ptr, worker_i);
102+
cl->do_card_ptr(card_ptr, worker_id);
103103
} else {
104104
break;
105105
}

src/hotspot/share/gc/g1/g1HotCardCache.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class G1HotCardCache: public CHeapObj<mtGC> {
113113

114114
// Refine the cards that have delayed as a result of
115115
// being in the cache.
116-
void drain(G1CardTableEntryClosure* cl, uint worker_i);
116+
void drain(G1CardTableEntryClosure* cl, uint worker_id);
117117

118118
// Set up for parallel processing of the cards in the hot cache
119119
void reset_hot_cache_claimed_index() {

src/hotspot/share/gc/g1/g1OopClosures.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,12 @@ class G1RootRegionScanClosure : public MetadataVisitingOopIterateClosure {
209209

210210
class G1ConcurrentRefineOopClosure: public BasicOopIterateClosure {
211211
G1CollectedHeap* _g1h;
212-
uint _worker_i;
212+
uint _worker_id;
213213

214214
public:
215-
G1ConcurrentRefineOopClosure(G1CollectedHeap* g1h, uint worker_i) :
215+
G1ConcurrentRefineOopClosure(G1CollectedHeap* g1h, uint worker_id) :
216216
_g1h(g1h),
217-
_worker_i(worker_i) {
217+
_worker_id(worker_id) {
218218
}
219219

220220
virtual ReferenceIterationMode reference_iteration_mode() { return DO_FIELDS; }

src/hotspot/share/gc/g1/g1OopClosures.inline.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ inline void G1ConcurrentRefineOopClosure::do_oop_work(T* p) {
156156

157157
assert(to_rem_set != NULL, "Need per-region 'into' remsets.");
158158
if (to_rem_set->is_tracked()) {
159-
to_rem_set->add_reference(p, _worker_i);
159+
to_rem_set->add_reference(p, _worker_id);
160160
}
161161
}
162162

0 commit comments

Comments
 (0)