Re: RFR: 8255883: Avoid multiple GeneratedMethodAccessor for same NativeMethod… [v5]

2020-11-12 Thread Hui Shi
On Thu, 12 Nov 2020 12:23:36 GMT, Alan Bateman wrote: >> @AlanBateman >> >>> What is the reason for using an int? I remember there was a suggestion for >>> three states but two states seems okay so curious why it was changed from >>> boolean to int. >> >> shipilev suggested not to use sub-wo

Re: RFR: 8255883: Avoid multiple GeneratedMethodAccessor for same NativeMethod… [v5]

2020-11-12 Thread Alan Bateman
On Thu, 12 Nov 2020 04:23:37 GMT, Hui Shi wrote: >> src/java.base/share/classes/jdk/internal/reflect/NativeConstructorAccessorImpl.java >> line 44: >> >>> 42: private DelegatingConstructorAccessorImpl parent; >>> 43: private int numInvocations; >>> 44: private int generated; >> >>

Re: RFR: 8255883: Avoid multiple GeneratedMethodAccessor for same NativeMethod… [v5]

2020-11-11 Thread Hui Shi
On Wed, 11 Nov 2020 19:12:08 GMT, Alan Bateman wrote: >> Hui Shi has refreshed the contents of this pull request, and previous >> commits have been removed. The incremental views will show differences >> compared to the previous content of the PR. > > src/java.base/share/classes/jdk/internal/re

Re: RFR: 8255883: Avoid multiple GeneratedMethodAccessor for same NativeMethod… [v5]

2020-11-11 Thread Alan Bateman
On Wed, 11 Nov 2020 05:38:08 GMT, Hui Shi wrote: >> …AccessorImpl object >> >> We met real problem when using protobuf with option optimized for code size, >> detail in JBS https://bugs.openjdk.java.net/browse/JDK-8255883 >> >> Optimize solution is adding a new boolean field to detect concurre

Re: RFR: 8255883: Avoid multiple GeneratedMethodAccessor for same NativeMethod… [v5]

2020-11-11 Thread Aleksey Shipilev
On Wed, 11 Nov 2020 05:38:08 GMT, Hui Shi wrote: >> …AccessorImpl object >> >> We met real problem when using protobuf with option optimized for code size, >> detail in JBS https://bugs.openjdk.java.net/browse/JDK-8255883 >> >> Optimize solution is adding a new boolean field to detect concurre

Re: RFR: 8255883: Avoid multiple GeneratedMethodAccessor for same NativeMethod… [v5]

2020-11-10 Thread Hui Shi
> …AccessorImpl object > > We met real problem when using protobuf with option optimized for code size, > detail in JBS https://bugs.openjdk.java.net/browse/JDK-8255883 > > Optimize solution is adding a new boolean field to detect concurrent method > accessor generation in same NativeMethodAcce