RFR: 8292059: Do not inline InstanceKlass::allocate_instance() [v3]
Claes Redestad
redestad at openjdk.org
Fri Mar 10 12:05:18 UTC 2023
On Thu, 9 Mar 2023 17:33:29 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
> That's really surprising. I also don't see how any of the proposed changes could affect the GC so much. This makes me suspicious of the performance claims.
>
> Could you redo the benchmarking and give us more information about:
>
> 1. What benchmarks were run
> 2. What was the benchmarks scores and GC metrics
> 3. What was the run-to-run variance in the scores and metrics
FWIW we had a discussion about this earlier and I'm as skeptical as you about the results listed in this PRs description. I also pointed to the microbenchmark - `./test/micro/org/openjdk/bench/vm/lambda/capture/Capture0.java` - which I used originally to motivate the move of `allocate_instance(oop, TRAPS)` to inline.hpp, ran the numbers and saw that there's no longer any discernible effect from moving it back to .cpp:
Benchmark Mode Cnt Score Error Units
Capture0.lambda_01 avgt 12 65,492 ± 1,675 ns/op # master
Capture0.lambda_01 avgt 12 65,022 ± 1,241 ns/op # pr/12782
This was before the `oop -> InstanceKlass*` change. @afshin-zafari then ran that experiment and saw a small win on that microbenchmark from doing parameter change. While the win is probably too small to matter I didn't find it objectionable since it seems reasonable to move oop conversions earlier.
-------------
PR: https://git.openjdk.org/jdk/pull/12782
More information about the hotspot-dev
mailing list