Skip to content

Commit 60ab135

Browse files
committed
8308097: Generational ZGC: Update constructor syntax
Reviewed-by: eosterlund, aboldtch
1 parent 599fa77 commit 60ab135

File tree

95 files changed

+605
-614
lines changed

Some content is hidden

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

95 files changed

+605
-614
lines changed

src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,8 @@ class ZAdjustAddress {
601601
}
602602

603603
public:
604-
ZAdjustAddress(MacroAssembler* masm, Address addr) :
605-
_masm(masm),
604+
ZAdjustAddress(MacroAssembler* masm, Address addr)
605+
: _masm(masm),
606606
_addr(addr),
607607
_pre_adjustment(addr.getMode() == Address::pre ? addr.offset() : 0),
608608
_post_adjustment(addr.getMode() == Address::post ? addr.offset() : 0) {
@@ -1132,8 +1132,8 @@ class ZSaveLiveRegisters {
11321132
}
11331133
}
11341134

1135-
ZSaveLiveRegisters(MacroAssembler* masm, ZBarrierStubC2* stub) :
1136-
_masm(masm),
1135+
ZSaveLiveRegisters(MacroAssembler* masm, ZBarrierStubC2* stub)
1136+
: _masm(masm),
11371137
_gp_regs(),
11381138
_fp_regs(),
11391139
_p_regs() {
@@ -1169,8 +1169,8 @@ class ZSetupArguments {
11691169
const Address _ref_addr;
11701170

11711171
public:
1172-
ZSetupArguments(MacroAssembler* masm, ZLoadBarrierStubC2* stub) :
1173-
_masm(masm),
1172+
ZSetupArguments(MacroAssembler* masm, ZLoadBarrierStubC2* stub)
1173+
: _masm(masm),
11741174
_ref(stub->ref()),
11751175
_ref_addr(stub->ref_addr()) {
11761176

src/hotspot/cpu/ppc/gc/z/zBarrierSetAssembler_ppc.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ class ZSaveLiveRegisters {
860860

861861
public:
862862
ZSaveLiveRegisters(MacroAssembler *masm, ZBarrierStubC2 *stub)
863-
: _masm(masm), _reg_mask(stub->live()), _result_reg(stub->result()) {
863+
: _masm(masm), _reg_mask(stub->live()), _result_reg(stub->result()) {
864864

865865
const int register_save_size = iterate_over_register_mask(ACTION_COUNT_ONLY) * BytesPerWord;
866866
_frame_size = align_up(register_save_size, frame::alignment_in_bytes)
@@ -972,8 +972,8 @@ class ZSetupArguments {
972972
const Address _ref_addr;
973973

974974
public:
975-
ZSetupArguments(MacroAssembler* masm, ZLoadBarrierStubC2* stub) :
976-
_masm(masm),
975+
ZSetupArguments(MacroAssembler* masm, ZLoadBarrierStubC2* stub)
976+
: _masm(masm),
977977
_ref(stub->ref()),
978978
_ref_addr(stub->ref_addr()) {
979979

src/hotspot/cpu/riscv/gc/z/zBarrierSetAssembler_riscv.cpp

+5-6
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,7 @@ void ZBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm,
420420
Register src,
421421
Register dst,
422422
Register count,
423-
RegSet saved_regs) {
424-
}
423+
RegSet saved_regs) {}
425424

426425
static void copy_load_barrier(MacroAssembler* masm,
427426
Register ref,
@@ -695,8 +694,8 @@ class ZSaveLiveRegisters {
695694
}
696695
}
697696

698-
ZSaveLiveRegisters(MacroAssembler* masm, ZBarrierStubC2* stub) :
699-
_masm(masm),
697+
ZSaveLiveRegisters(MacroAssembler* masm, ZBarrierStubC2* stub)
698+
: _masm(masm),
700699
_gp_regs(),
701700
_fp_regs(),
702701
_vp_regs() {
@@ -724,8 +723,8 @@ class ZSetupArguments {
724723
const Address _ref_addr;
725724

726725
public:
727-
ZSetupArguments(MacroAssembler* masm, ZLoadBarrierStubC2* stub) :
728-
_masm(masm),
726+
ZSetupArguments(MacroAssembler* masm, ZLoadBarrierStubC2* stub)
727+
: _masm(masm),
729728
_ref(stub->ref()),
730729
_ref_addr(stub->ref_addr()) {
731730

src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp

+5-6
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@
5959
ZBarrierSetAssembler::ZBarrierSetAssembler()
6060
: _load_bad_relocations(),
6161
_store_bad_relocations(),
62-
_store_good_relocations() {
63-
}
62+
_store_good_relocations() {}
6463

6564
enum class ZXMMSpillMode {
6665
none,
@@ -1354,8 +1353,8 @@ class ZSaveLiveRegisters {
13541353
}
13551354

13561355
public:
1357-
ZSaveLiveRegisters(MacroAssembler* masm, ZBarrierStubC2* stub) :
1358-
_masm(masm),
1356+
ZSaveLiveRegisters(MacroAssembler* masm, ZBarrierStubC2* stub)
1357+
: _masm(masm),
13591358
_gp_registers(),
13601359
_opmask_registers(),
13611360
_xmm_registers(),
@@ -1446,8 +1445,8 @@ class ZSetupArguments {
14461445
const Address _ref_addr;
14471446

14481447
public:
1449-
ZSetupArguments(MacroAssembler* masm, ZLoadBarrierStubC2* stub) :
1450-
_masm(masm),
1448+
ZSetupArguments(MacroAssembler* masm, ZLoadBarrierStubC2* stub)
1449+
: _masm(masm),
14511450
_ref(stub->ref()),
14521451
_ref_addr(stub->ref_addr()) {
14531452

src/hotspot/os/bsd/gc/z/zPhysicalMemoryBacking_bsd.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ static ZErrno mremap(uintptr_t from_addr, uintptr_t to_addr, size_t size) {
7474
return (res == KERN_SUCCESS) ? ZErrno(0) : ZErrno(EINVAL);
7575
}
7676

77-
ZPhysicalMemoryBacking::ZPhysicalMemoryBacking(size_t max_capacity) :
78-
_base(0),
77+
ZPhysicalMemoryBacking::ZPhysicalMemoryBacking(size_t max_capacity)
78+
: _base(0),
7979
_initialized(false) {
8080

8181
// Reserve address space for backing memory

src/hotspot/os/linux/gc/z/zPhysicalMemoryBacking_linux.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ static const char* z_preferred_hugetlbfs_mountpoints[] = {
118118
static int z_fallocate_hugetlbfs_attempts = 3;
119119
static bool z_fallocate_supported = true;
120120

121-
ZPhysicalMemoryBacking::ZPhysicalMemoryBacking(size_t max_capacity) :
122-
_fd(-1),
121+
ZPhysicalMemoryBacking::ZPhysicalMemoryBacking(size_t max_capacity)
122+
: _fd(-1),
123123
_filesystem(0),
124124
_block_size(0),
125125
_available(0),

src/hotspot/os/windows/gc/z/zPhysicalMemoryBacking_windows.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ class ZPhysicalMemoryBackingSmallPages : public ZPhysicalMemoryBackingImpl {
6969
}
7070

7171
public:
72-
ZPhysicalMemoryBackingSmallPages(size_t max_capacity) :
73-
ZPhysicalMemoryBackingImpl(),
72+
ZPhysicalMemoryBackingSmallPages(size_t max_capacity)
73+
: ZPhysicalMemoryBackingImpl(),
7474
_handles(max_capacity) {}
7575

7676
size_t commit(zoffset offset, size_t size) {
@@ -146,8 +146,8 @@ class ZPhysicalMemoryBackingLargePages : public ZPhysicalMemoryBackingImpl {
146146
}
147147

148148
public:
149-
ZPhysicalMemoryBackingLargePages(size_t max_capacity) :
150-
ZPhysicalMemoryBackingImpl(),
149+
ZPhysicalMemoryBackingLargePages(size_t max_capacity)
150+
: ZPhysicalMemoryBackingImpl(),
151151
_page_array(alloc_page_array(max_capacity)) {}
152152

153153
size_t commit(zoffset offset, size_t size) {
@@ -212,8 +212,8 @@ static ZPhysicalMemoryBackingImpl* select_impl(size_t max_capacity) {
212212
return new ZPhysicalMemoryBackingSmallPages(max_capacity);
213213
}
214214

215-
ZPhysicalMemoryBacking::ZPhysicalMemoryBacking(size_t max_capacity) :
216-
_impl(select_impl(max_capacity)) {}
215+
ZPhysicalMemoryBacking::ZPhysicalMemoryBacking(size_t max_capacity)
216+
: _impl(select_impl(max_capacity)) {}
217217

218218
bool ZPhysicalMemoryBacking::is_initialized() const {
219219
return true;

src/hotspot/share/gc/z/c1/zBarrierSetC1.cpp

+18-18
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
#include "gc/z/zThreadLocalData.hpp"
3535
#include "utilities/macros.hpp"
3636

37-
ZLoadBarrierStubC1::ZLoadBarrierStubC1(LIRAccess& access, LIR_Opr ref, address runtime_stub) :
38-
_decorators(access.decorators()),
37+
ZLoadBarrierStubC1::ZLoadBarrierStubC1(LIRAccess& access, LIR_Opr ref, address runtime_stub)
38+
: _decorators(access.decorators()),
3939
_ref_addr(access.resolved_addr()),
4040
_ref(ref),
4141
_tmp(LIR_OprFact::illegalOpr),
@@ -100,8 +100,8 @@ ZStoreBarrierStubC1::ZStoreBarrierStubC1(LIRAccess& access,
100100
LIR_Opr new_zpointer,
101101
LIR_Opr tmp,
102102
bool is_atomic,
103-
address runtime_stub) :
104-
_ref_addr(access.resolved_addr()),
103+
address runtime_stub)
104+
: _ref_addr(access.resolved_addr()),
105105
_new_zaddress(new_zaddress),
106106
_new_zpointer(new_zpointer),
107107
_tmp(tmp),
@@ -156,8 +156,8 @@ class LIR_OpZUncolor : public LIR_Op {
156156
LIR_Opr _opr;
157157

158158
public:
159-
LIR_OpZUncolor(LIR_Opr opr) :
160-
LIR_Op(),
159+
LIR_OpZUncolor(LIR_Opr opr)
160+
: LIR_Op(),
161161
_opr(opr) {}
162162

163163
virtual void visit(LIR_OpVisitState* state) {
@@ -188,8 +188,8 @@ class LIR_OpZLoadBarrier : public LIR_Op {
188188
const bool _on_non_strong;
189189

190190
public:
191-
LIR_OpZLoadBarrier(LIR_Opr opr, ZLoadBarrierStubC1* stub, bool on_non_strong) :
192-
LIR_Op(),
191+
LIR_OpZLoadBarrier(LIR_Opr opr, ZLoadBarrierStubC1* stub, bool on_non_strong)
192+
: LIR_Op(),
193193
_opr(opr),
194194
_stub(stub),
195195
_on_non_strong(on_non_strong) {
@@ -223,8 +223,8 @@ static bool barrier_needed(LIRAccess& access) {
223223
return ZBarrierSet::barrier_needed(access.decorators(), access.type());
224224
}
225225

226-
ZBarrierSetC1::ZBarrierSetC1() :
227-
_load_barrier_on_oop_field_preloaded_runtime_stub(nullptr),
226+
ZBarrierSetC1::ZBarrierSetC1()
227+
: _load_barrier_on_oop_field_preloaded_runtime_stub(nullptr),
228228
_load_barrier_on_weak_oop_field_preloaded_runtime_stub(nullptr),
229229
_store_barrier_on_oop_field_with_healing(nullptr),
230230
_store_barrier_on_oop_field_without_healing(nullptr) {}
@@ -255,8 +255,8 @@ class LIR_OpZColor : public LIR_Op {
255255
LIR_Opr _opr;
256256

257257
public:
258-
LIR_OpZColor(LIR_Opr opr) :
259-
LIR_Op(lir_none, opr, nullptr /* info */),
258+
LIR_OpZColor(LIR_Opr opr)
259+
: LIR_Op(lir_none, opr, nullptr /* info */),
260260
_opr(opr) {}
261261

262262
virtual void visit(LIR_OpVisitState* state) {
@@ -294,8 +294,8 @@ class LIR_OpZStoreBarrier : public LIR_Op {
294294
LIR_Opr new_zaddress,
295295
LIR_Opr new_zpointer,
296296
CodeStub* stub,
297-
CodeEmitInfo* info) :
298-
LIR_Op(lir_none, new_zpointer, nullptr /* info */),
297+
CodeEmitInfo* info)
298+
: LIR_Op(lir_none, new_zpointer, nullptr /* info */),
299299
_addr(addr),
300300
_new_zaddress(new_zaddress),
301301
_new_zpointer(new_zpointer),
@@ -498,8 +498,8 @@ class ZLoadBarrierRuntimeStubCodeGenClosure : public StubAssemblerCodeGenClosure
498498
const DecoratorSet _decorators;
499499

500500
public:
501-
ZLoadBarrierRuntimeStubCodeGenClosure(DecoratorSet decorators) :
502-
_decorators(decorators) {}
501+
ZLoadBarrierRuntimeStubCodeGenClosure(DecoratorSet decorators)
502+
: _decorators(decorators) {}
503503

504504
virtual OopMapSet* generate_code(StubAssembler* sasm) {
505505
ZBarrierSet::assembler()->generate_c1_load_barrier_runtime_stub(sasm, _decorators);
@@ -518,8 +518,8 @@ class ZStoreBarrierRuntimeStubCodeGenClosure : public StubAssemblerCodeGenClosur
518518
const bool _self_healing;
519519

520520
public:
521-
ZStoreBarrierRuntimeStubCodeGenClosure(bool self_healing) :
522-
_self_healing(self_healing) {}
521+
ZStoreBarrierRuntimeStubCodeGenClosure(bool self_healing)
522+
: _self_healing(self_healing) {}
523523

524524
virtual OopMapSet* generate_code(StubAssembler* sasm) {
525525
ZBarrierSet::assembler()->generate_c1_store_barrier_runtime_stub(sasm, _self_healing);

src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp

+13-14
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ class ZArenaHashtable : public ResourceObj {
6666
size_t _current_index;
6767

6868
public:
69-
Iterator(ZArenaHashtable* table) :
70-
_table(table),
69+
Iterator(ZArenaHashtable* table)
70+
: _table(table),
7171
_current_entry(table->_table[0]),
7272
_current_index(0) {
7373
if (_current_entry == nullptr) {
@@ -89,8 +89,8 @@ class ZArenaHashtable : public ResourceObj {
8989
}
9090
};
9191

92-
ZArenaHashtable(Arena* arena) :
93-
_arena(arena),
92+
ZArenaHashtable(Arena* arena)
93+
: _arena(arena),
9494
_table() {
9595
Copy::zero_to_bytes(&_table, sizeof(_table));
9696
}
@@ -127,8 +127,8 @@ class ZBarrierSetC2State : public ArenaObj {
127127
int _stubs_start_offset;
128128

129129
public:
130-
ZBarrierSetC2State(Arena* arena) :
131-
_stubs(new (arena) GrowableArray<ZBarrierStubC2*>(arena, 8, 0, nullptr)),
130+
ZBarrierSetC2State(Arena* arena)
131+
: _stubs(new (arena) GrowableArray<ZBarrierStubC2*>(arena, 8, 0, nullptr)),
132132
_live(arena),
133133
_trampoline_stubs_count(0),
134134
_stubs_start_offset(0) {}
@@ -200,8 +200,8 @@ int ZBarrierStubC2::stubs_start_offset() {
200200
return barrier_set_state()->stubs_start_offset();
201201
}
202202

203-
ZBarrierStubC2::ZBarrierStubC2(const MachNode* node) :
204-
_node(node),
203+
ZBarrierStubC2::ZBarrierStubC2(const MachNode* node)
204+
: _node(node),
205205
_entry(),
206206
_continuation() {}
207207

@@ -232,8 +232,8 @@ ZLoadBarrierStubC2* ZLoadBarrierStubC2::create(const MachNode* node, Address ref
232232
return stub;
233233
}
234234

235-
ZLoadBarrierStubC2::ZLoadBarrierStubC2(const MachNode* node, Address ref_addr, Register ref) :
236-
ZBarrierStubC2(node),
235+
ZLoadBarrierStubC2::ZLoadBarrierStubC2(const MachNode* node, Address ref_addr, Register ref)
236+
: ZBarrierStubC2(node),
237237
_ref_addr(ref_addr),
238238
_ref(ref) {
239239
assert_different_registers(ref, ref_addr.base());
@@ -281,14 +281,13 @@ ZStoreBarrierStubC2* ZStoreBarrierStubC2::create(const MachNode* node, Address r
281281
return stub;
282282
}
283283

284-
ZStoreBarrierStubC2::ZStoreBarrierStubC2(const MachNode* node, Address ref_addr, Register new_zaddress, Register new_zpointer, bool is_native, bool is_atomic) :
285-
ZBarrierStubC2(node),
284+
ZStoreBarrierStubC2::ZStoreBarrierStubC2(const MachNode* node, Address ref_addr, Register new_zaddress, Register new_zpointer, bool is_native, bool is_atomic)
285+
: ZBarrierStubC2(node),
286286
_ref_addr(ref_addr),
287287
_new_zaddress(new_zaddress),
288288
_new_zpointer(new_zpointer),
289289
_is_native(is_native),
290-
_is_atomic(is_atomic) {
291-
}
290+
_is_atomic(is_atomic) {}
292291

293292
Address ZStoreBarrierStubC2::ref_addr() const {
294293
return _ref_addr;

src/hotspot/share/gc/z/vmStructs_z.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
#include "gc/z/vmStructs_z.hpp"
2626
#include "gc/z/zAddress.hpp"
2727

28-
ZGlobalsForVMStructs::ZGlobalsForVMStructs() :
29-
_ZAddressOffsetMask(&ZAddressOffsetMask),
28+
ZGlobalsForVMStructs::ZGlobalsForVMStructs()
29+
: _ZAddressOffsetMask(&ZAddressOffsetMask),
3030
_ZPointerLoadGoodMask(&ZPointerLoadGoodMask),
3131
_ZPointerLoadBadMask(&ZPointerLoadBadMask),
3232
_ZPointerLoadShift(const_cast<size_t*>(&ZPointerLoadShift)),
@@ -35,8 +35,7 @@ ZGlobalsForVMStructs::ZGlobalsForVMStructs() :
3535
_ZPointerStoreGoodMask(&ZPointerStoreGoodMask),
3636
_ZPointerStoreBadMask(&ZPointerStoreBadMask),
3737
_ZObjectAlignmentSmallShift(&ZObjectAlignmentSmallShift),
38-
_ZObjectAlignmentSmall(&ZObjectAlignmentSmall) {
39-
}
38+
_ZObjectAlignmentSmall(&ZObjectAlignmentSmall) {}
4039

4140
ZGlobalsForVMStructs ZGlobalsForVMStructs::_instance;
4241
ZGlobalsForVMStructs* ZGlobalsForVMStructs::_instance_p = &ZGlobalsForVMStructs::_instance;

src/hotspot/share/gc/z/zAllocationFlags.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ class ZAllocationFlags {
5454
uint8_t _flags;
5555

5656
public:
57-
ZAllocationFlags() :
58-
_flags(0) {}
57+
ZAllocationFlags()
58+
: _flags(0) {}
5959

6060
void set_non_blocking() {
6161
_flags |= field_non_blocking::encode(true);

0 commit comments

Comments
 (0)