RFR: JDK-8299229: [JVMCI] add support for UseZGC [v6]

Fei Yang fyang at openjdk.org
Wed May 3 03:47:19 UTC 2023


On Tue, 2 May 2023 17:50:11 GMT, Tom Rodriguez <never at openjdk.org> wrote:

>> This exposes the required ZGC values to JVMCI and adds support for nmethod entry barriers.  The ZGC support is straightforward but the nmethod entry barrier required some reworking to fit better into JVMCI usage.  I also removed the epoch based barrier since it was no longer used with simplified the assumptions on the JVMCI side.  There is also a minor loom related fix to support post call nops included.  I could move that into a separate PR if that would be preferred.
>
> Tom Rodriguez has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 14 commits:
> 
>  - Fix handling of extra data
>  - Merge branch 'master' into tkr-zgc
>  - Require nmethod entry barrier emission
>  - Merge branch 'master' into tkr-zgc
>  - Use reloc for guard location and read internal fields using HotSpot accessors
>  - Merge branch 'master' into tkr-zgc
>  - Remove access to extra data section from Java code
>  - Handle concurrent unloading
>  - Merge branch 'master' into tkr-zgc
>  - Add missing declaration
>  - ... and 4 more: https://git.openjdk.org/jdk/compare/f00a748b...ce19812e

src/hotspot/cpu/riscv/gc/shared/barrierSetNMethod_riscv.cpp line 85:

> 83:     if (nm->is_compiled_by_jvmci()) {
> 84:       _instruction_address = nm->code_begin() + nm->frame_complete_offset();
> 85:       _guard_addr = reinterpret_cast<int*>(nm->consts_begin() + nm->jvmci_nmethod_data()->nmethod_entry_patch_offset());

I see 'nm->consts_begin()' is used here to calculate '_guard_addr' for the JVMCI case on riscv. Do you have more details about the design? Thanks.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/11996#discussion_r1183214300


More information about the hotspot-dev mailing list