RFR: 8343377: Performance regression in reflective invocation of native methods

Chen Liang liach at openjdk.org
Thu Nov 21 03:34:18 UTC 2024


On Tue, 19 Nov 2024 17:15:22 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Okay, in that case it's probably fine - I assume there's also no easy way to ensure in a test that all signature polymorphic methods are covered by these checks?
>
> These checks are 1-1 to the JVMS 2.9.3/JLS 15.12.3, where definitions of signature polymorphic methods reside.
> 
> Actually, since you've asked, I checked the usage of `PolymorphicSignature` - it's not used by javac at all! The only usages I can find is in JVMCI tests. And I don't find any test that verify the set of all `PolymorphicSignature` annotated methods is the set of all signature polymorphic methods. (A similar test exists for `CallerSensitive`).

Consulted hotspot and javac engineers offline and confirmed they aren't relying on this particular annotation. Since this annotation was added back when langtools (javac) and jdk were separate repos, it's now hard to track how this annotation was used originally; it could have been used by javac but was abandoned later. For now, `@PolymorphicSignature` is a decorative annotation used by some tests.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22169#discussion_r1851265537


More information about the core-libs-dev mailing list