RFR: 8377597: [Leyden] Improve peak performance when AOT code is used [v2]
Vladimir Kozlov
kvn at openjdk.org
Thu Feb 12 18:35:42 UTC 2026
On Thu, 12 Feb 2026 17:47:12 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>>> Yes, and where we do have a counter contention problem. In mainline, it is constrained to T2/T3 code, which is more or less transient. Alas, doing the same in A4 would expose this problem to "optimal" code.
>>
>> But A4 is replaced with T4 which does not have this counter. So it slightly affects only AOT code which is used only during startup.
>
>> But A4 is replaced with T4 which does not have this counter. So it slightly affects only AOT code which is used only during startup.
>
> We differ on the "slightly", I think. We have seen 10x performance hits on unlucky T3 contentions. Are we sure we can afford that kind of slowdown for A4 code, especially when A4 -> T4 replacement can take tens of seconds? I am not so sure at all.
>
> But really I think it is not a fundamental design problem, it is an engineering problem: I believe this counter should be at very least probabilistic to manage contention, like in [JDK-8372701](https://bugs.openjdk.org/browse/JDK-8372701).
Thank you @shipilev
>All right, based on performance results I am seeing so far, I do not mind this going into premain. But I reserve the right to complain about how it works and/or suggest more followups, including maybe significantly reworking its heuristics :)
Yes, suggestions are welcome.
-------------
PR Comment: https://git.openjdk.org/leyden/pull/110#issuecomment-3892694682
More information about the leyden-dev
mailing list