dragonwell-project / dragonwell21

GNU General Public License v2.0
61 stars 18 forks source link

[Backport] 8316126: [Lilliput/JDK21] Cherry-pick: 8305895: Implementation: JEP 450: Compact Object Headers (Experimental) #74

Closed linade closed 1 month ago

linade commented 2 months ago

Backport the following changes:

8316126: [Lilliput/JDK21] Cherry-pick: 8305895: Implementation: JEP 450: Compact Object Headers (Experimental) 8317954: [Lilliput/JDK21] Make C2 LoadNKlassCompactHeader more robust 8316687: [Lilliput/JDK21] Various cleanups 8319724: [Lilliput] ParallelGC: Forwarded objects found during heap inspection 8316424: [Lilliput/JDK21] ZGC/CDS-related test fixes

These make this pr equivalent to the upstream lilliput pr 13961 https://bugs.openjdk.org/browse/JDK-8305895 Differences are explained below:

src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp
src/hotspot/cpu/x86/c1_MacroAssembler_x86.cpp

Differences caused by the way we port 8139457: Relax alignment of array elements Here we choose to do the modification in initialize_header, so as to stay consistent across major platforms (x86/aarch64/riscv).


src/hotspot/cpu/aarch64/vtableStubs_aarch64.cpp

Lilliput21 missed the change to increase itable stuff size (https://github.com/openjdk/jdk/pull/13961/commits/467ccb8d475d07167034492493ac49158eefcb97). Added back.


src/hotspot/share/cds/archiveBuilder.cpp
src/hotspot/share/cds/archiveBuilder.hpp
src/hotspot/share/cds/archiveHeapWriter.hpp
src/hotspot/share/cds/filemap.cpp
src/hotspot/share/cds/metaspaceShared.cpp

Differences in these file are caused by various CDS related changes (8311035, https://github.com/openjdk/jdk/pull/13961/commits/a76bc68a5f9e31354a337685e14e72d5bfc3f8e3, https://github.com/openjdk/jdk/pull/13961/commits/467ccb8d475d07167034492493ac49158eefcb97) We don't need them because we don't have 8311035 in 21.


src/hotspot/share/gc/parallel/mutableSpace.cpp
src/hotspot/share/gc/parallel/mutableSpace.hpp

This is caued by missing 8319376 (ParallelGC: Forwarded objects found during heap inspection) in 21. 8319376 will be ported to 21.0.4 later. But to ensure correctness we still have to apply the fix (and resolve conflict when merging 21.0.4).


src/hotspot/share/jvmci/jvmciCompilerToVM.cpp

It's logically equivalent to pr 13961. No need to change.


All other differences are trivial.

CLAassistant commented 2 months ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.

:x: rkennke
:x: linade
You have signed the CLA already but the status is still pending? Let us recheck it.

linade commented 1 month ago

jtreg passed: https://tone.aliyun-inc.com/ws/xesljfzh/test_result/340051 https://tone.aliyun-inc.com/ws/xesljfzh/test_result/339981 (1 irrelevant failure)