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

Tom Rodriguez never at openjdk.org
Thu May 4 19:48:44 UTC 2023


On Thu, 4 May 2023 18:09:15 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> Tom Rodriguez has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits:
>> 
>>  - Merge branch 'master' into tkr-zgc
>>  - Fix mdo iteration and riscv code
>>  - 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
>>  - ... and 6 more: https://git.openjdk.org/jdk/compare/fc76687c...a0dae2be
>
> src/hotspot/share/gc/shared/barrierSetNMethod.hpp line 33:
> 
>> 31: #if INCLUDE_JVMCI
>> 32: #include "utilities/formatBuffer.hpp"
>> 33: #endif
> 
> Given that this doesn't include any JVMCI files I think we can skip the INCLUDE_JVMCI guard (and sort in the added include). Or maybe better, forward declare FormatBuffer?

I couldn't see how to easily forward declare the template so I just sorted the include into the existing ones.

> src/hotspot/share/jvmci/jvmciCodeInstaller.cpp line 783:
> 
>> 781:           }
>> 782:         }
>> 783:       }
> 
> We have this typedef:
> 
> typedef FormatBuffer<> err_msg;
> 
> 
> So, it looks weird to have code that mixes FormatBuffer<> and err_msg.

I converted all bare usages of FormatBuffer<> to err_msg which seems to be the general usage.

> src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp line 36:
> 
>> 34: #include "gc/shared/barrierSetNMethod.hpp"
>> 35: #include "gc/z/zThreadLocalData.hpp"
>> 36: #include "gc/z/zBarrierSetRuntime.hpp"
> 
> Should this be guarded with an INCLUDE_ZGC check? This also needs to be sorted.

Guarded the includes and the code which uses them.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/11996#discussion_r1185444510
PR Review Comment: https://git.openjdk.org/jdk/pull/11996#discussion_r1185444061
PR Review Comment: https://git.openjdk.org/jdk/pull/11996#discussion_r1185444897


More information about the hotspot-dev mailing list