Hi Alen, If the same methods keep getting deoptimized again and again, this can be a JVM bug. I saw this happening several times:
1. During static initialization: https://pangin.pro/posts/computation-in-static-initializer 2. https://stackoverflow.com/a/66019887/3448419 If JVM runs with JDWP agent, deoptimization may also happen every time an exception is thrown. API like MutableCallSite.setTarget can also provoke deoptimization. So, there can be many reasons. Try to find the cause with -XX:+LogCompilation or with the help of async-profiler as shown in the above SO answer. Regards, Andrei понедельник, 19 декабря 2022 г. в 18:56:30 UTC, [email protected]: > Hello everyone. > > I am looking at a case where around 30% of CPU time is spent by the JVM in > deoptimizations (done the profile with async-profiler). > > I can locally reproduce the case. The log just explodes with > deoptimization messages. A few methods get deoptimized all the time. I > didn't stopwatch the deoptimization log count but it is in the order > 100s-1000s of them in a span of few seconds - consistently. > > Did JIT eliminate a branch by mistake? Then it figured it should be there? > > If there is a high number of method calls, could it trigger some dead code > elimination prematurely? > > Any ideas? > > Thank you > Alen > -- You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/mechanical-sympathy/9da388a3-17b9-4561-bcb1-91776e0bfc74n%40googlegroups.com.
