Re: RFR: 8284579: Improve VarHandle checks for interpreter [v2]

2022-04-11 Thread Paul Sandoz
On Mon, 11 Apr 2022 10:03:58 GMT, Claes Redestad wrote: >>> How would the performance change if the `isDirect` and >>> `checkExactAccessMode` merger was reverted? >> >> Add around 15-20ns/op for these micros. > > Restructuring so that we only check `direct` once sounds reasonable at face >

Re: RFR: 8284579: Improve VarHandle checks for interpreter [v2]

2022-04-11 Thread ExE Boss
On Mon, 11 Apr 2022 09:53:31 GMT, Claes Redestad wrote: >> src/java.base/share/classes/java/lang/invoke/VarHandle.java line 2075: >> >>> 2073: >>> 2074: @DontInline >>> 2075: final void >>> throwWrongMethodTypeException(VarHandle.AccessDescriptor ad) { >> >> This can actually be 

Re: RFR: 8284579: Improve VarHandle checks for interpreter [v2]

2022-04-11 Thread Claes Redestad
On Mon, 11 Apr 2022 09:57:42 GMT, Claes Redestad wrote: >> src/java.base/share/classes/java/lang/invoke/VarHandles.java line 719: >> >>> 717: // >>> MethodHandle.linkToStatic(); >>> 718: //} else { >>> 719: //MethodHandle mh =

Re: RFR: 8284579: Improve VarHandle checks for interpreter [v2]

2022-04-11 Thread Claes Redestad
On Mon, 11 Apr 2022 09:34:17 GMT, ExE Boss wrote: >> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Simplified as suggested by @ExE-Boss > > src/java.base/share/classes/java/lang/invoke/VarHandles.java line 719: > >>

Re: RFR: 8284579: Improve VarHandle checks for interpreter [v2]

2022-04-11 Thread Claes Redestad
On Mon, 11 Apr 2022 09:26:12 GMT, ExE Boss wrote: >> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Simplified as suggested by @ExE-Boss > > src/java.base/share/classes/java/lang/invoke/VarHandle.java line 2075: > >>

Re: RFR: 8284579: Improve VarHandle checks for interpreter [v2]

2022-04-11 Thread ExE Boss
On Fri, 8 Apr 2022 12:20:32 GMT, Claes Redestad wrote: >> A few additional enhancements aiming to improve VH performance in the >> interpreter: >> >> - Flatten `TypeAndInvokers`: adds a pointer to `VarHandle` (a small increase >> 40->48) but removes an object and an indirection on any

Re: RFR: 8284579: Improve VarHandle checks for interpreter [v2]

2022-04-10 Thread David Holmes
On Fri, 8 Apr 2022 12:20:32 GMT, Claes Redestad wrote: >> A few additional enhancements aiming to improve VH performance in the >> interpreter: >> >> - Flatten `TypeAndInvokers`: adds a pointer to `VarHandle` (a small increase >> 40->48) but removes an object and an indirection on any

Re: RFR: 8284579: Improve VarHandle checks for interpreter [v2]

2022-04-08 Thread Claes Redestad
On Fri, 8 Apr 2022 12:20:32 GMT, Claes Redestad wrote: >> A few additional enhancements aiming to improve VH performance in the >> interpreter: >> >> - Flatten `TypeAndInvokers`: adds a pointer to `VarHandle` (a small increase >> 40->48) but removes an object and an indirection on any

Re: RFR: 8284579: Improve VarHandle checks for interpreter [v2]

2022-04-08 Thread Mandy Chung
On Fri, 8 Apr 2022 12:20:32 GMT, Claes Redestad wrote: >> A few additional enhancements aiming to improve VH performance in the >> interpreter: >> >> - Flatten `TypeAndInvokers`: adds a pointer to `VarHandle` (a small increase >> 40->48) but removes an object and an indirection on any

Re: RFR: 8284579: Improve VarHandle checks for interpreter [v2]

2022-04-08 Thread Claes Redestad
On Fri, 8 Apr 2022 15:05:54 GMT, Maurizio Cimadamore wrote: > TestAdaptVarHandles Thanks for reviewing, Maurizio. I ran the micros you suggested and I detect no change whatsoever at peak performance. With `-Xint` there are some small improvements in line with the results above.

Re: RFR: 8284579: Improve VarHandle checks for interpreter [v2]

2022-04-08 Thread Maurizio Cimadamore
On Fri, 8 Apr 2022 12:20:32 GMT, Claes Redestad wrote: >> A few additional enhancements aiming to improve VH performance in the >> interpreter: >> >> - Flatten `TypeAndInvokers`: adds a pointer to `VarHandle` (a small increase >> 40->48) but removes an object and an indirection on any

Re: RFR: 8284579: Improve VarHandle checks for interpreter [v2]

2022-04-08 Thread Claes Redestad
On Fri, 8 Apr 2022 12:12:06 GMT, ExE Boss wrote: >> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Simplified as suggested by @ExE-Boss > > src/java.base/share/classes/java/lang/invoke/IndirectVarHandle.java line 104: >

Re: RFR: 8284579: Improve VarHandle checks for interpreter [v2]

2022-04-08 Thread ExE Boss
On Fri, 8 Apr 2022 12:16:17 GMT, Claes Redestad wrote: >> A few additional enhancements aiming to improve VH performance in the >> interpreter: >> >> - Flatten `TypeAndInvokers`: adds a pointer to `VarHandle` (a small increase >> 40->48) but removes an object and an indirection on any

Re: RFR: 8284579: Improve VarHandle checks for interpreter [v2]

2022-04-08 Thread Claes Redestad
> A few additional enhancements aiming to improve VH performance in the > interpreter: > > - Flatten `TypeAndInvokers`: adds a pointer to `VarHandle` (a small increase > 40->48) but removes an object and an indirection on any instance actually > used - and might avoid allocating the