After JEP 479 is implemented (or more precisely, JDK-8339783 is 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.
#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.
- relates to
-
JDK-8339783 Implement JEP 479: Remove the Windows 32-bit x86 Port
-
- Resolved
-
-
JDK-8345012 os::build_agent_function_name potentially wastes a byte when allocating the buffer
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/1a07d542
-
Review(master) openjdk/jdk/22380