On Wed, 27 Nov 2024 05:20:16 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> After JEP 479 ([JDK-8339783](https://bugs.openjdk.org/browse/JDK-8339783) 
>> was integrated, the handling of certain symbol lookup code can be 
>> simplified. The old code needed to support 32-bit Windows, where names had a 
>> trailing `@<number>`. When this special case now is removed, some 
>> streamlining is possible. Specifically these arrays:
>> 
>> #define JNI_ONLOAD_SYMBOLS {"JNI_OnLoad"}
>> #define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"}
>> #define JVM_ONLOAD_SYMBOLS {"JVM_OnLoad"}
>> #define AGENT_ONLOAD_SYMBOLS {"Agent_OnLoad"}
>> #define AGENT_ONUNLOAD_SYMBOLS {"Agent_OnUnload"}
>> #define AGENT_ONATTACH_SYMBOLS {"Agent_OnAttach"}
>> 
>> are all singletons and so the actual strings can just be inlined directly 
>> into the code that uses them.
>> 
>> Testing:
>> - GHA
>> - Tiers 1-4 sanity
>> - 
>> Thanks
>
> David Holmes has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Update src/java.base/share/native/libjava/NativeLibraries.c
>   
>   Co-authored-by: Alex Menkov <69548902+alexmen...@users.noreply.github.com>

Changes requested by kbarrett (Reviewer).

src/java.base/share/native/libjava/NativeLibraries.c line 88:

> 86:     if (cname != NULL) {
> 87:       strcat(jniFunctionName, "_");
> 88:       strcat(jniFunctionName, cname);

Should be using 4-space indentation, rather than HotSpot's 2 space indentation.

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

PR Review: https://git.openjdk.org/jdk/pull/22380#pullrequestreview-2466185432
PR Review Comment: https://git.openjdk.org/jdk/pull/22380#discussion_r1861413410

Reply via email to