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

2020-11-10 Thread Hui Shi
On Tue, 10 Nov 2020 18:36:22 GMT, Aleksey Shipilev 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. The pull request contains one >> new commi

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

2020-11-10 Thread Hui Shi
On Tue, 10 Nov 2020 18:28:11 GMT, Aleksey Shipilev 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. The pull request contains one >> new commi

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

2020-11-10 Thread Aleksey Shipilev
On Sun, 8 Nov 2020 05:07:07 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 concurren

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

2020-11-08 Thread Hui Shi
On Fri, 6 Nov 2020 08:58:13 GMT, Joel Borggrén-Franck wrote: > Are there any benchmarks to compare this accessor with the previous version > in the presumably common case where there is no or very little contention? > Edit to clarify: it is stated as "trivial" is this also measured somewhere?

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

2020-11-07 Thread Hui Shi
On Thu, 5 Nov 2020 14:59:56 GMT, Alan Bateman wrote: >> I do wonder if it makes sense to handle triple-state `int` here: "not yet >> generated", "generated", "in error"? So that we don't try to generate the >> accessor over and over again when it is in error? > > If we are changing NativeMethod

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

2020-11-07 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