RFR: 8372701: Randomized profile counters [v5]
Andrew Haley
aph at openjdk.org
Thu Dec 18 22:12:10 UTC 2025
On Thu, 18 Dec 2025 15:31:43 GMT, Oli Gillespie <ogillespie at openjdk.org> wrote:
> I tested the jython benchmark on my x86 host and while I didn't see the reported >10% regression, I did see some differences. Profiling hinted at String operations, and playing with jdk String benchmarks I found that enabling randomized profile counters seems to make the performance of `micro:org.openjdk.bench.java.lang.StringIndexOfChar.latin1_SSE4_String` bi-modal on my setup. See results at https://gist.github.com/olivergillespie/33324b5e95e1d8fc64dbcbff1884dade. I don't know how or if that connects to the other curious results, but sharing just in case it's helpful. Can provide any details/perfasm etc. if needed.
Brilliant, that's just the kind of report I need.
I think I know the root cause of some of the problems. For some reason, even when C2 detects a natural loop, slightly unbalanced profile counters for the forward and backwards branches mean that some loop optimizations aren't being done. And that might well mess up auto-vectorizaton, for example.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28541#issuecomment-3672458557
More information about the hotspot-dev
mailing list