Skip to content

Commit 985b9ce

Browse files
LizBingKim Barrett
authored andcommitted
8330694: Rename 'HeapRegion' to 'G1HeapRegion'
Reviewed-by: cjplummer, kbarrett, tschatzl
1 parent 05f13e7 commit 985b9ce

File tree

123 files changed

+999
-1002
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+999
-1002
lines changed

src/hotspot/cpu/aarch64/gc/g1/g1BarrierSetAssembler_aarch64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
207207
// Does store cross heap regions?
208208

209209
__ eor(tmp1, store_addr, new_val);
210-
__ lsr(tmp1, tmp1, HeapRegion::LogOfHRGrainBytes);
210+
__ lsr(tmp1, tmp1, G1HeapRegion::LogOfHRGrainBytes);
211211
__ cbz(tmp1, done);
212212

213213
// crosses regions, storing null?

src/hotspot/cpu/arm/gc/g1/g1BarrierSetAssembler_arm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
207207
// Does store cross heap regions?
208208

209209
__ eor(tmp1, store_addr, new_val);
210-
__ movs(tmp1, AsmOperand(tmp1, lsr, HeapRegion::LogOfHRGrainBytes));
210+
__ movs(tmp1, AsmOperand(tmp1, lsr, G1HeapRegion::LogOfHRGrainBytes));
211211
__ b(done, eq);
212212

213213
// crosses regions, storing null?

src/hotspot/cpu/ppc/gc/g1/g1BarrierSetAssembler_ppc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm, Decorato
243243

244244
// Does store cross heap regions?
245245
__ xorr(tmp1, store_addr, new_val);
246-
__ srdi_(tmp1, tmp1, HeapRegion::LogOfHRGrainBytes);
246+
__ srdi_(tmp1, tmp1, G1HeapRegion::LogOfHRGrainBytes);
247247
__ beq(CCR0, filtered);
248248

249249
// Crosses regions, storing null?

src/hotspot/cpu/riscv/gc/g1/g1BarrierSetAssembler_riscv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
194194
// Does store cross heap regions?
195195

196196
__ xorr(tmp1, store_addr, new_val);
197-
__ srli(tmp1, tmp1, HeapRegion::LogOfHRGrainBytes);
197+
__ srli(tmp1, tmp1, G1HeapRegion::LogOfHRGrainBytes);
198198
__ beqz(tmp1, done);
199199

200200
// crosses regions, storing null?

src/hotspot/cpu/s390/gc/g1/g1BarrierSetAssembler_s390.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm, Decorato
282282
__ z_lgr(Rtmp1, Rstore_addr);
283283
__ z_xgr(Rtmp1, Rnew_val);
284284
}
285-
__ z_srag(Rtmp1, Rtmp1, HeapRegion::LogOfHRGrainBytes);
285+
__ z_srag(Rtmp1, Rtmp1, G1HeapRegion::LogOfHRGrainBytes);
286286
__ z_bre(filtered);
287287

288288
// Crosses regions, storing null?

src/hotspot/cpu/x86/gc/g1/g1BarrierSetAssembler_x86.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
286286

287287
__ movptr(tmp, store_addr);
288288
__ xorptr(tmp, new_val);
289-
__ shrptr(tmp, HeapRegion::LogOfHRGrainBytes);
289+
__ shrptr(tmp, G1HeapRegion::LogOfHRGrainBytes);
290290
__ jcc(Assembler::equal, done);
291291

292292
// crosses regions, storing null?

src/hotspot/share/cds/archiveHeapWriter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ void ArchiveHeapWriter::init() {
8989
_source_objs = new GrowableArrayCHeap<oop, mtClassShared>(10000);
9090

9191
guarantee(UseG1GC, "implementation limitation");
92-
guarantee(MIN_GC_REGION_ALIGNMENT <= /*G1*/HeapRegion::min_region_size_in_words() * HeapWordSize, "must be");
92+
guarantee(MIN_GC_REGION_ALIGNMENT <= G1HeapRegion::min_region_size_in_words() * HeapWordSize, "must be");
9393
}
9494
}
9595

@@ -439,7 +439,7 @@ void ArchiveHeapWriter::set_requested_address(ArchiveHeapInfo* info) {
439439

440440

441441
if (UseCompressedOops) {
442-
_requested_bottom = align_down(heap_end - heap_region_byte_size, HeapRegion::GrainBytes);
442+
_requested_bottom = align_down(heap_end - heap_region_byte_size, G1HeapRegion::GrainBytes);
443443
} else {
444444
// We always write the objects as if the heap started at this address. This
445445
// makes the contents of the archive heap deterministic.
@@ -449,7 +449,7 @@ void ArchiveHeapWriter::set_requested_address(ArchiveHeapInfo* info) {
449449
_requested_bottom = (address)NOCOOPS_REQUESTED_BASE;
450450
}
451451

452-
assert(is_aligned(_requested_bottom, HeapRegion::GrainBytes), "sanity");
452+
assert(is_aligned(_requested_bottom, G1HeapRegion::GrainBytes), "sanity");
453453

454454
_requested_top = _requested_bottom + _buffer_used;
455455

src/hotspot/share/cds/filemap.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2064,8 +2064,8 @@ bool FileMapInfo::can_use_heap_region() {
20642064
archive_narrow_klass_shift);
20652065
log_info(cds)(" narrow_oop_mode = %d, narrow_oop_base = " PTR_FORMAT ", narrow_oop_shift = %d",
20662066
narrow_oop_mode(), p2i(narrow_oop_base()), narrow_oop_shift());
2067-
log_info(cds)("The current max heap size = " SIZE_FORMAT "M, HeapRegion::GrainBytes = " SIZE_FORMAT,
2068-
MaxHeapSize/M, HeapRegion::GrainBytes);
2067+
log_info(cds)("The current max heap size = " SIZE_FORMAT "M, G1HeapRegion::GrainBytes = " SIZE_FORMAT,
2068+
MaxHeapSize/M, G1HeapRegion::GrainBytes);
20692069
log_info(cds)(" narrow_klass_base = " PTR_FORMAT ", narrow_klass_shift = %d",
20702070
p2i(CompressedKlassPointers::base()), CompressedKlassPointers::shift());
20712071
log_info(cds)(" narrow_oop_mode = %d, narrow_oop_base = " PTR_FORMAT ", narrow_oop_shift = %d",
@@ -2130,7 +2130,7 @@ bool FileMapInfo::map_heap_region() {
21302130
#ifdef ASSERT
21312131
// The "old" regions must be parsable -- we cannot have any unused space
21322132
// at the start of the lowest G1 region that contains archived objects.
2133-
assert(is_aligned(_mapped_heap_memregion.start(), HeapRegion::GrainBytes), "must be");
2133+
assert(is_aligned(_mapped_heap_memregion.start(), G1HeapRegion::GrainBytes), "must be");
21342134

21352135
// Make sure we map at the very top of the heap - see comments in
21362136
// init_heap_region_relocation().
@@ -2140,7 +2140,7 @@ bool FileMapInfo::map_heap_region() {
21402140
address heap_end = (address)heap_range.end();
21412141
address mapped_heap_region_end = (address)_mapped_heap_memregion.end();
21422142
assert(heap_end >= mapped_heap_region_end, "must be");
2143-
assert(heap_end - mapped_heap_region_end < (intx)(HeapRegion::GrainBytes),
2143+
assert(heap_end - mapped_heap_region_end < (intx)(G1HeapRegion::GrainBytes),
21442144
"must be at the top of the heap to avoid fragmentation");
21452145
#endif
21462146

src/hotspot/share/gc/g1/c1/g1BarrierSetC1.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,13 @@ void G1BarrierSetC1::post_barrier(LIRAccess& access, LIR_Opr addr, LIR_Opr new_v
158158
__ logical_xor(xor_res, new_val, xor_res);
159159
__ move(xor_res, xor_shift_res);
160160
__ unsigned_shift_right(xor_shift_res,
161-
LIR_OprFact::intConst(checked_cast<jint>(HeapRegion::LogOfHRGrainBytes)),
161+
LIR_OprFact::intConst(checked_cast<jint>(G1HeapRegion::LogOfHRGrainBytes)),
162162
xor_shift_res,
163163
LIR_Opr::illegalOpr());
164164
} else {
165165
__ logical_xor(addr, new_val, xor_res);
166166
__ unsigned_shift_right(xor_res,
167-
LIR_OprFact::intConst(checked_cast<jint>(HeapRegion::LogOfHRGrainBytes)),
167+
LIR_OprFact::intConst(checked_cast<jint>(G1HeapRegion::LogOfHRGrainBytes)),
168168
xor_shift_res,
169169
LIR_Opr::illegalOpr());
170170
}

src/hotspot/share/gc/g1/c2/g1BarrierSetC2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,8 @@ void G1BarrierSetC2::post_barrier(GraphKit* kit,
453453

454454
// Should be able to do an unsigned compare of region_size instead of
455455
// and extra shift. Do we have an unsigned compare??
456-
// Node* region_size = __ ConI(1 << HeapRegion::LogOfHRGrainBytes);
457-
Node* xor_res = __ URShiftX ( __ XorX( cast, __ CastPX(__ ctrl(), val)), __ ConI(checked_cast<jint>(HeapRegion::LogOfHRGrainBytes)));
456+
// Node* region_size = __ ConI(1 << G1HeapRegion::LogOfHRGrainBytes);
457+
Node* xor_res = __ URShiftX ( __ XorX( cast, __ CastPX(__ ctrl(), val)), __ ConI(checked_cast<jint>(G1HeapRegion::LogOfHRGrainBytes)));
458458

459459
// if (xor_res == 0) same region so skip
460460
__ if_then(xor_res, BoolTest::ne, zeroX, likely); {

0 commit comments

Comments
 (0)