Re: RFR: 8343377: Performance regression in reflective invocation of native methods [v3]

2024-12-02 Thread Chen Liang
On Mon, 2 Dec 2024 19:45:15 GMT, Chen Liang wrote: >> When core reflection was migrated to be implemented by Method Handles, >> somehow, the method handles are not used for native methods, which are >> generally linkable by method handles. This causes significant performance >> regressions wh

Re: RFR: 8343377: Performance regression in reflective invocation of native methods [v3]

2024-12-02 Thread Mandy Chung
On Mon, 2 Dec 2024 19:45:15 GMT, Chen Liang wrote: >> When core reflection was migrated to be implemented by Method Handles, >> somehow, the method handles are not used for native methods, which are >> generally linkable by method handles. This causes significant performance >> regressions wh

Re: RFR: 8343377: Performance regression in reflective invocation of native methods [v2]

2024-12-02 Thread Chen Liang
On Mon, 2 Dec 2024 19:25:46 GMT, Mandy Chung wrote: >> 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 four additional >> commits sin

Re: RFR: 8343377: Performance regression in reflective invocation of native methods [v3]

2024-12-02 Thread Chen Liang
> When core reflection was migrated to be implemented by Method Handles, > somehow, the method handles are not used for native methods, which are > generally linkable by method handles. This causes significant performance > regressions when reflecting native methods, even if their overrides may

Re: RFR: 8343377: Performance regression in reflective invocation of native methods [v2]

2024-12-02 Thread Mandy Chung
On Wed, 27 Nov 2024 01:04:06 GMT, Chen Liang wrote: >> When core reflection was migrated to be implemented by Method Handles, >> somehow, the method handles are not used for native methods, which are >> generally linkable by method handles. This causes significant performance >> regressions w

Re: RFR: 8343377: Performance regression in reflective invocation of native methods [v2]

2024-11-26 Thread Chen Liang
> When core reflection was migrated to be implemented by Method Handles, > somehow, the method handles are not used for native methods, which are > generally linkable by method handles. This causes significant performance > regressions when reflecting native methods, even if their overrides may

Re: RFR: 8343377: Performance regression in reflective invocation of native methods [v2]

2024-11-26 Thread Chen Liang
On Tue, 26 Nov 2024 20:41:05 GMT, Mandy Chung wrote: >> 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 four additional >> commits si

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

2024-11-26 Thread Chen Liang
On Fri, 15 Nov 2024 22:17:10 GMT, Chen Liang wrote: > When core reflection was migrated to be implemented by Method Handles, > somehow, the method handles are not used for native methods, which are > generally linkable by method handles. This causes significant performance > regressions when

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

2024-11-26 Thread Mandy Chung
On Fri, 15 Nov 2024 22:17:10 GMT, Chen Liang wrote: > When core reflection was migrated to be implemented by Method Handles, > somehow, the method handles are not used for native methods, which are > generally linkable by method handles. This causes significant performance > regressions when

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

2024-11-26 Thread Mandy Chung
On Fri, 15 Nov 2024 22:17:10 GMT, Chen Liang wrote: > When core reflection was migrated to be implemented by Method Handles, > somehow, the method handles are not used for native methods, which are > generally linkable by method handles. This causes significant performance > regressions when

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

2024-11-21 Thread monk
On Thu, 21 Nov 2024 03:28:29 GMT, Chen Liang wrote: >> When core reflection was migrated to be implemented by Method Handles, >> somehow, the method handles are not used for native methods, which are >> generally linkable by method handles. This causes significant performance >> regressions w

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

2024-11-20 Thread Chen Liang
On Tue, 19 Nov 2024 17:15:22 GMT, Chen Liang 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 definition

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

2024-11-20 Thread Chen Liang
On Fri, 15 Nov 2024 22:17:10 GMT, Chen Liang wrote: > When core reflection was migrated to be implemented by Method Handles, > somehow, the method handles are not used for native methods, which are > generally linkable by method handles. This causes significant performance > regressions when

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

2024-11-20 Thread monk
On Tue, 19 Nov 2024 14:16:47 GMT, Chen Liang wrote: >> When core reflection was migrated to be implemented by Method Handles, >> somehow, the method handles are not used for native methods, which are >> generally linkable by method handles. This causes significant performance >> regressions w

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

2024-11-20 Thread Viktor Klang
On Tue, 19 Nov 2024 14:23:58 GMT, Francesco Nigro wrote: >> When core reflection was migrated to be implemented by Method Handles, >> somehow, the method handles are not used for native methods, which are >> generally linkable by method handles. This causes significant performance >> regressi

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

2024-11-20 Thread Chen Liang
On Tue, 19 Nov 2024 16:35:44 GMT, Chen Liang wrote: >> src/java.base/share/classes/jdk/internal/reflect/MethodHandleAccessorFactory.java >> line 430: >> >>> 428: // Single parameter of declared type Object[] >>> 429: Class[] parameters = >>> reflectionFactory.getExecutableShare

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

2024-11-19 Thread Hannes Greule
On Tue, 19 Nov 2024 16:42:47 GMT, Chen Liang wrote: >> I think the main problem with annotation is that annotation creation needs >> to use `java.lang.reflect.Proxy`, which is unavailable until module system >> is initialized. Extra allocations are costs too, while checks here only >> reuse ex

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

2024-11-19 Thread Chen Liang
On Tue, 19 Nov 2024 16:45:47 GMT, Hannes Greule wrote: >> In fact, another solution I have contemplated is to update >> `JavaLangInvokeAccess` implementations. 4 methods in it, >> `unreflectConstructor`, `unreflectField`, `findVirtual`, and `findStatic`, >> are exclusively used by core reflect

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

2024-11-19 Thread Chen Liang
On Tue, 19 Nov 2024 16:08:20 GMT, Hannes Greule wrote: >> When core reflection was migrated to be implemented by Method Handles, >> somehow, the method handles are not used for native methods, which are >> generally linkable by method handles. This causes significant performance >> regression

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

2024-11-19 Thread Hannes Greule
On Fri, 15 Nov 2024 22:17:10 GMT, Chen Liang wrote: > When core reflection was migrated to be implemented by Method Handles, > somehow, the method handles are not used for native methods, which are > generally linkable by method handles. This causes significant performance > regressions when

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

2024-11-19 Thread Viktor Klang
On Fri, 15 Nov 2024 22:17:10 GMT, Chen Liang wrote: > When core reflection was migrated to be implemented by Method Handles, > somehow, the method handles are not used for native methods, which are > generally linkable by method handles. This causes significant performance > regressions when

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

2024-11-19 Thread Francesco Nigro
On Fri, 15 Nov 2024 22:17:10 GMT, Chen Liang wrote: > When core reflection was migrated to be implemented by Method Handles, > somehow, the method handles are not used for native methods, which are > generally linkable by method handles. This causes significant performance > regressions when

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

2024-11-19 Thread Chen Liang
On Fri, 15 Nov 2024 22:17:10 GMT, Chen Liang wrote: > When core reflection was migrated to be implemented by Method Handles, > somehow, the method handles are not used for native methods, which are > generally linkable by method handles. This causes significant performance > regressions when

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

2024-11-15 Thread Chen Liang
When core reflection was migrated to be implemented by Method Handles, somehow, the method handles are not used for native methods, which are generally linkable by method handles. This causes significant performance regressions when reflecting native methods, even if their overrides may be non-