RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v50]
Thomas Stuefe
stuefe at openjdk.org
Wed Nov 6 09:13:47 UTC 2024
On Tue, 5 Nov 2024 16:43:35 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
>> @egahlin / @mgronlun could you please review the JFR parts of this PR? One change is for getting the right prototype header, the other is for avoiding an endless loop/assert in a corner case.
>
>> @rkennke can you include this small update for s390x as well:
>>
>> ```diff
>> diff --git a/src/hotspot/cpu/s390/c1_MacroAssembler_s390.cpp b/src/hotspot/cpu/s390/c1_MacroAssembler_s390.cpp
>> index 0f7e5c9f457..476e3d5daa4 100644
>> --- a/src/hotspot/cpu/s390/c1_MacroAssembler_s390.cpp
>> +++ b/src/hotspot/cpu/s390/c1_MacroAssembler_s390.cpp
>> @@ -174,8 +174,11 @@ void C1_MacroAssembler::try_allocate(
>> void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register len, Register Rzero, Register t1) {
>> assert_different_registers(obj, klass, len, t1, Rzero);
>> if (UseCompactObjectHeaders) {
>> - z_lg(t1, Address(klass, in_bytes(Klass::prototype_header_offset())));
>> - z_stg(t1, Address(obj, oopDesc::mark_offset_in_bytes()));
>> + z_mvc(
>> + Address(obj, oopDesc::mark_offset_in_bytes()), /* move to */
>> + Address(klass, in_bytes(Klass::prototype_header_offset())), /* move from */
>> + sizeof(markWord) /* how much to move */
>> + );
>> } else {
>> load_const_optimized(t1, (intx)markWord::prototype().value());
>> z_stg(t1, Address(obj, oopDesc::mark_offset_in_bytes()));
>> diff --git a/src/hotspot/cpu/s390/c2_MacroAssembler_s390.cpp b/src/hotspot/cpu/s390/c2_MacroAssembler_s390.cpp
>> index 378d5e4cfe1..c5713161bf9 100644
>> --- a/src/hotspot/cpu/s390/c2_MacroAssembler_s390.cpp
>> +++ b/src/hotspot/cpu/s390/c2_MacroAssembler_s390.cpp
>> @@ -46,7 +46,7 @@ void C2_MacroAssembler::load_narrow_klass_compact_c2(Register dst, Address src)
>> // The incoming address is pointing into obj-start + klass_offset_in_bytes. We need to extract
>> // obj-start, so that we can load from the object's mark-word instead.
>> z_lg(dst, src.plus_disp(-oopDesc::klass_offset_in_bytes()));
>> - z_srlg(dst, dst, markWord::klass_shift); // TODO: could be z_sra
>> + z_srlg(dst, dst, markWord::klass_shift);
>> }
>>
>> //------------------------------------------------------
>> diff --git a/src/hotspot/cpu/s390/templateTable_s390.cpp b/src/hotspot/cpu/s390/templateTable_s390.cpp
>> index 3cb1aba810d..5b8f7a20478 100644
>> --- a/src/hotspot/cpu/s390/templateTable_s390.cpp
>> +++ b/src/hotspot/cpu/s390/templateTable_s390.cpp
>> @@ -3980,8 +3980,11 @@ void TemplateTable::_new() {
>> // Initialize object header only.
>> __ bind(initialize_header);
>> if (UseCompactObjectHeaders) {
>> - __ z_lg(tmp, Address(iklass, in_bytes(Klass::prototype_header_offset())));
>> - __ z_stg(tmp, Address(RallocatedObject, oo...
Merge is good. @rkennke patch for the new test errors due to removal of non-generational ZGC:
https://gist.github.com/tstuefe/321b769d3b281198b767b68e18bb7271
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20677#issuecomment-2459069232
More information about the build-dev
mailing list