RFR: 8366681: [leyden] Precompile more C1 code [v3]
Aleksey Shipilev
shade at openjdk.org
Wed Sep 17 10:53:28 UTC 2025
On Thu, 4 Sep 2025 19:20:41 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
> Interesting idea.
It is very profitable on all workloads I tried, so I would like to get this in.
> * There are already AP4 versions present in the AOT cache. Why can't they be used instead of A2 until T3 arrives?
Maybe? I suspect that switching to A2 gives us a natural way to hook up to "normal" tiered policy: it has counters inside, and will notify tiered policy when it is time to progress it to T3 and T4. I am not sure how would switching to AP4 work to trigger T3 and T4 compiles in this case.
Plus, what if AP4 still, despite our best efforts, traps? Would it construct the loop like AP4 --trap--> A2 --upgrade--> A4 --trap--> AP4 --trap--> ...? That is also not clear to me.
All I am saying that storing A1/A2 code keeps the model simple enough to reason, while having substantial performance benefits.
> * There were some rare discrepancies in compilation behavior between training and production runs which lead to AOT-cache mismatches and trigger unnecessary JIT-compilations. While proposed change alleviates the symptoms, It's beneficial to fix the root cause.
That is true. However, at this point, I think we should try and make the best of the training done, even if that training not 100% accurate. For that, IMO, it is better to have a faster recovery path, e.g. by carrying A1 and A2 code.
-------------
PR Comment: https://git.openjdk.org/leyden/pull/93#issuecomment-3302426491
More information about the leyden-dev
mailing list