RFR: 8354996: Reduce dynamic code generation for a single downcall [v3]

Jaikiran Pai jpai at openjdk.org
Wed Apr 30 11:56:55 UTC 2025


On Mon, 28 Apr 2025 14:36:33 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Perf numbers for simple main:
>> Linking of `Class::forName0` down from ~152 to ~83
>> 
>> For calling little color management system https://bugs.openjdk.org/browse/JDK-8313344:
>> JNI: ~45
>> baseline panama: ~164
>> patch: ~103
>> 
>> Also see #24705.
>
> Chen Liang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
> 
>  - Merge branch 'master' of https://github.com/openjdk/jdk into exp/ffm-lcms
>  - Use more simple function descriptor
>  - Simplify FFM linker warmup
>  - Merge branch 'master' of https://github.com/openjdk/jdk into exp/ffm-lcms
>  - Wip work trying to speed up FFM

For the changes in `HelloClasslist`, I think it would even need a change in the build file. With the changes in this PR, I'm now seeing the following (platform runtime) warnings when building the JDK:


WARNING: A restricted method in java.lang.foreign.Linker has been called
WARNING: java.lang.foreign.Linker::downcallHandle has been called by build.tools.classlist.HelloClasslist in an unnamed module (file:.../build/macosx-aarch64/support/classlist.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled

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

PR Comment: https://git.openjdk.org/jdk/pull/24742#issuecomment-2841733865


More information about the core-libs-dev mailing list