Skip to content

Commit ef20c42

Browse files
author
duke
committedNov 10, 2021
Automatic merge of jdk:master into master
2 parents e9bda7d + e91e9d8 commit ef20c42

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed
 

‎src/hotspot/share/gc/g1/g1EvacFailure.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class RemoveSelfForwardPtrHRClosure: public HeapRegionClosure {
165165
during_concurrent_start,
166166
_worker_id);
167167
// Iterates evac failure objs which are recorded during evacuation.
168-
hr->iterate_evac_failure_objs(&rspc);
168+
hr->process_and_drop_evac_failure_objs(&rspc);
169169
// Need to zap the remainder area of the processed region.
170170
rspc.zap_remainder();
171171

‎src/hotspot/share/gc/g1/g1EvacFailureObjectsSet.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class G1EvacFailureObjectsIterationHelper {
8989
QuickSort::sort(_offset_array, _array_length, order_oop, true);
9090
}
9191

92-
void iterate_internal(ObjectClosure* closure) {
92+
void iterate(ObjectClosure* closure) {
9393
for (uint i = 0; i < _array_length; i++) {
9494
oop cur = _objects_set->from_offset(_offset_array[i]);
9595
closure->do_object(cur);
@@ -103,13 +103,13 @@ class G1EvacFailureObjectsIterationHelper {
103103
_offset_array(nullptr),
104104
_array_length(0) { }
105105

106-
void iterate(ObjectClosure* closure) {
106+
void process_and_drop(ObjectClosure* closure) {
107107
uint num = _segments->num_allocated_nodes();
108108
_offset_array = NEW_C_HEAP_ARRAY(OffsetInRegion, num, mtGC);
109109

110110
join_and_sort();
111111
assert(_array_length == num, "must be %u, %u", _array_length, num);
112-
iterate_internal(closure);
112+
iterate(closure);
113113

114114
FREE_C_HEAP_ARRAY(OffsetInRegion, _offset_array);
115115
}
@@ -121,11 +121,11 @@ class G1EvacFailureObjectsIterationHelper {
121121
}
122122
};
123123

124-
void G1EvacFailureObjectsSet::iterate(ObjectClosure* closure) {
124+
void G1EvacFailureObjectsSet::process_and_drop(ObjectClosure* closure) {
125125
assert_at_safepoint();
126126

127127
G1EvacFailureObjectsIterationHelper helper(this);
128-
helper.iterate(closure);
128+
helper.process_and_drop(closure);
129129

130130
_offsets.drop_all();
131131
}

‎src/hotspot/share/gc/g1/g1EvacFailureObjectsSet.hpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,10 @@ class G1EvacFailureObjectsSet {
7272
// Record an object that failed evacuation.
7373
void record(oop obj);
7474

75-
// Apply the given ObjectClosure to all objects that failed evacuation. Objects
76-
// are passed in increasing address order.
77-
void iterate(ObjectClosure* closure);
75+
// Apply the given ObjectClosure to all objects that failed evacuation and
76+
// empties the list after processing.
77+
// Objects are passed in increasing address order.
78+
void process_and_drop(ObjectClosure* closure);
7879
};
7980

8081

‎src/hotspot/share/gc/g1/heapRegion.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ void HeapRegion::handle_evacuation_failure() {
106106
_next_marked_bytes = 0;
107107
}
108108

109-
void HeapRegion::iterate_evac_failure_objs(ObjectClosure* closure) {
110-
_evac_failure_objs.iterate(closure);
109+
void HeapRegion::process_and_drop_evac_failure_objs(ObjectClosure* closure) {
110+
_evac_failure_objs.process_and_drop(closure);
111111
}
112112

113113
void HeapRegion::unlink_from_list() {

‎src/hotspot/share/gc/g1/heapRegion.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ class HeapRegion : public CHeapObj<mtGC> {
571571
void record_evac_failure_obj(oop obj);
572572
// Applies the given closure to all previously recorded objects
573573
// that failed evacuation in ascending address order.
574-
void iterate_evac_failure_objs(ObjectClosure* closure);
574+
void process_and_drop_evac_failure_objs(ObjectClosure* closure);
575575

576576
// Iterate over the objects overlapping the given memory region, applying cl
577577
// to all references in the region. This is a helper for

0 commit comments

Comments
 (0)
Please sign in to comment.