RFR: 8372701: Randomized profile counters [v2]

Aleksey Shipilev shade at openjdk.org
Thu Nov 27 17:44:50 UTC 2025


On Thu, 27 Nov 2025 17:29:33 GMT, Andrew Haley <aph at openjdk.org> wrote:

> Also, I believe there are some kinds of event that should never be missed, even when subsampling profile counters in this way. I'd like people to advise me which events these are

One other thing that comes into mind: the initial swing from `0` -> `1` for a type counter is important, since `0` means "never seen the type at all", and `>0` means "maybe the type is present, however rare". I would suspect subsampling a small count to `0` would cause performance anomalies. Especially if, say, this anomaly causes a deopt - reprofile - compile cycle. It would doubly hurt, if _reprofile_ would miss the type _again_. Probably hard to do with RNG, but maybe we should be doing the initial counter seed on installation without consulting RNG. I don't think current patch does it, but maybe I am looking at the wrong place. Would be fairly trivial to do after https://github.com/openjdk/jdk/pull/25305.

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

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


More information about the hotspot-dev mailing list