RFR: 8294278: ForkJoinPool.getAndAddPoolIds should use Unsafe.staticFieldBase

2022-11-29 Thread Alan Bateman
Two (since 19) usages of Unsafe.getAndAddInt to update a static field provide the Class object as the base instead of the base object returned by Unsafe.staticFieldBase. This doesn't change anything on the HotSpot VM. - Commit messages: - Initial commit Changes: https://git.openjd

Re: RFR: 8294278: ForkJoinPool.getAndAddPoolIds should use Unsafe.staticFieldBase

2022-11-29 Thread Chris Hegarty
On Fri, 25 Nov 2022 14:53:57 GMT, Alan Bateman wrote: > Two (since 19) usages of Unsafe.getAndAddInt to update a static field provide > the Class object as the base instead of the base object returned by > Unsafe.staticFieldBase. This doesn't change anything on the HotSpot VM. LGTM --

Re: RFR: 8294278: ForkJoinPool.getAndAddPoolIds should use Unsafe.staticFieldBase

2022-11-29 Thread Bernhard Urban-Forster
On Fri, 25 Nov 2022 14:53:57 GMT, Alan Bateman wrote: > Two (since 19) usages of Unsafe.getAndAddInt to update a static field provide > the Class object as the base instead of the base object returned by > Unsafe.staticFieldBase. This doesn't change anything on the HotSpot VM. LGTM, thank you!

Re: RFR: 8294278: ForkJoinPool.getAndAddPoolIds should use Unsafe.staticFieldBase

2022-11-29 Thread Alan Bateman
On Tue, 29 Nov 2022 16:26:54 GMT, Bernhard Urban-Forster wrote: >> Two (since 19) usages of Unsafe.getAndAddInt to update a static field >> provide the Class object as the base instead of the base object returned by >> Unsafe.staticFieldBase. This doesn't change anything on the HotSpot VM. > >

Re: RFR: 8294278: ForkJoinPool.getAndAddPoolIds should use Unsafe.staticFieldBase

2022-11-29 Thread Martin Buchholz
On Fri, 25 Nov 2022 14:53:57 GMT, Alan Bateman wrote: > Two (since 19) usages of Unsafe.getAndAddInt to update a static field provide > the Class object as the base instead of the base object returned by > Unsafe.staticFieldBase. This doesn't change anything on the HotSpot VM. The introduction

Re: RFR: 8294278: ForkJoinPool.getAndAddPoolIds should use Unsafe.staticFieldBase

2022-12-01 Thread Alan Bateman
On Wed, 30 Nov 2022 02:19:15 GMT, Martin Buchholz wrote: > The introduction of POOLIDS_BASE strengthens the case for renaming POOLIDS to > POOLIDS_OFFSET for clarity - I would do that. I checked with Doug and he suggests we leave it as is. - PR: https://git.openjdk.org/jdk/pull/11