RFR: 8372701: Randomized profile counters [v2]

Aleksey Shipilev shade at openjdk.org
Mon Dec 15 16:16:21 UTC 2025


On Mon, 15 Dec 2025 15:51:54 GMT, Andrew Haley <aph at openjdk.org> wrote:

> > How cheap it is always to update type profile counters depends on how many threads are racily updating them.
> 
> Sorry, my brain fart. We only need to _read_ the classes before the random step, so there is no scaling problem.

Yes. And I hope after https://github.com/openjdk/jdk/pull/25305 you can really just specialize installation code a little: that code already knows whether it is about to install new receiver type in the table (so it can just write `1`), or it is an increment of known receiver (which can go RNG route). The poly counter would need some thinking about.

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

PR Comment: https://git.openjdk.org/jdk/pull/28541#issuecomment-3656471325


More information about the hotspot-dev mailing list