-
Hello. I have been told that in some cases, Truffle/Graal can permanently deoptimize some methods and "give up" on ever trying to compile them again. Is there an easy way to find out if that might be the case for a large program I'm trying to run?How could I go about logging which functions this happens to, or logging when interpreted functions get run? Thank you for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, this question was discussed on GraalVM's Slack: https://graalvm.slack.com/archives/CNQSB2DHD/p1598366789026200 I will copy @chumer's answer: Truffle only gives up on compilation if the graph gets too big or it failed with an internal error. That is shown when Besides you can have a look at: https://github.com/oracle/graal/blob/master/truffle/docs/Optimizing.md which describes flags to understand what is the cause of the deoptimization. Like trace compilation, trace transferToInterpeter or trace assumption invalidations. All options can be found here: https://github.com/oracle/graal/blob/master/truffle/docs/Options.md |
Beta Was this translation helpful? Give feedback.
Hi, this question was discussed on GraalVM's Slack: https://graalvm.slack.com/archives/CNQSB2DHD/p1598366789026200
I will copy @chumer's answer:
Truffle only gives up on compilation if the graph gets too big or it failed with an internal error. That is shown when
--engine.TraceCompilation
is enabled. For internal errors you can use--engine.CompilationFailureAction=Throw
to propagate them to the interpreter thread. Does you language support ROOT instrumentation? Then you can use the--cpusampler
tool. See https://www.graalvm.org/tools/profiling/ It shows the amount of time spent in optimized code.Besides you can have a look at: https://github.com/oracle/graal/blob/master/truffle/docs/Opt…