RFR: 8245309: Re-examine use of ThreadLocalCoders in sun.net.www.ParseUtil

Julia Boes jboes at openjdk.java.net
Tue Sep 15 14:09:21 UTC 2020


On Tue, 15 Sep 2020 09:31:16 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Replaced the use of ThreadLocalCoders with regular non-caching CharsetEncoder and added a benchmark to confirm that
>> there is no performance impact.
>
> test/micro/org/openjdk/bench/java/net/ThreadLocalParseUtil.java line 65:
> 
>> 63:
>> 64:     @Benchmark
>> 65:     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
> 
> Why `DONT_INLINE`, though? It is useful for looking at disassembly, but it penalizes the benchmark for the regular
> performance runs.

I used the ThreadLocalURI benchmark as a starting point, which includes this annotation. You are right, it's probably
not of use here.

-------------

PR: https://git.openjdk.java.net/jdk/pull/170


More information about the net-dev mailing list