<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
That’s a great question - restating my understanding of it: “Is it useful to hardcode specific JIT options that compile early, force methods to be compiled, etc while training?”</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
We’ve always said that training should match production as closely as possible.  The more closely they match (ie: training in production using canary deployments) the better as the training produces training data that exactly matches what the JVM is doing during
 startup and warmup (and will likely continue to do in future deployments).</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
If we tweak the JIT settings from the side for training, we may distort the training run in ways that are less useful and result in us missing training data (like profiles) that would be useful if we need to deopt+recompile in the production run.</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
That’s my long way of saying if you wouldn’t deploy those options on your production runs, you probably don’t want them on your training runs either.</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
—Dan</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="mail-editor-reference-message-container">
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"></div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="text-align: left; padding: 3pt 0in 0in; border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor; font-family: Aptos; font-size: 12pt; color: black;">
<b>From: </b>leyden-dev <leyden-dev-retn@openjdk.org> on behalf of María Arias de Reyna Dominguez <mariasde@redhat.com><br>
<b>Date: </b>Monday, December 15, 2025 at 4:36 AM<br>
<b>To: </b>leyden-dev <leyden-dev@openjdk.org><br>
<b>Subject: </b>Does it make sense to tweak compilation for training?<br>
<br>
</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing">Hi!<br>
<br>
</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing">While searching for good documentation to link to when explaining Leyden, I found this (rather old) page:
<a href="https://www.ibm.com/docs/en/sdk-java-technology/8?topic=options-xjit-xnojit" data-outlook-id="4db2dea1-27f1-4ed1-993c-c1603b464c25">
https://www.ibm.com/docs/en/sdk-java-technology/8?topic=options-xjit-xnojit</a> with compilation options I didn't know existed.</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"><br>
</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing">And I was wondering: does it make sense to force some things during training run to make sure we get the best training? I'm thinking for example on forcing a high level of compilation on
 some methods, so we arrive to production with more things optimized. Or excluding some "testing framework" methods from compilation.</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"><br>
</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing">Or is it better not to touch anything and let Java run normally because this may become too unpredictable?</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"><br>
</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing">Or... should I play with this and see what happens because we don't really know? :)</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"><br>
</div>
<div dir="ltr" class="gmail_signature">Kind regards,<br>
María Arias de Reyna Domínguez<br>
Senior Software Engineer<br>
She / Her / Hers<br>
<a href="mailto:ariasdereyna@redhat.com" target="_blank" data-outlook-id="256d0b5d-2083-414c-9eb3-b44eddb354a3">ariasdereyna@redhat.com</a></div>
</div>
</body>
</html>