Call Targets Not Optimized

Chris Seaton chris.seaton at oracle.com
Sat Sep 17 07:35:02 UTC 2016


Hi Christian,

You run a loop 1000+ times, but then do you give it a chance to compile before the program exits? You’ve got background compilation enabled so the program won’t wait for compilation before it exits.

Instead of running a loop 1000+ times, try making the loop infinite and running it for a few seconds to see what happens longer term.

Try -Dgraal.TraceTruffleCompilation and -Dgraal.TraceTruffleCompilationDetails to see the compilation events printed as the program runs.

Chris

> On 17 Sep 2016, at 08:31, Cristian Esquivias <cristian.esquivias at gmail.com> wrote:
> 
> I moved to a new system and downloaded the latest Graal VM from OTN to try
> it out. When I ran IGV to see compilations none of my functions appeared. I
> enabled the TruffleCallTargetProfiling and TruffleCompilationStatistics
> flags and saw that none of my functions were optimized.
> 
> Am I doing something wrong? I haven't changed my code, and I'm fairly
> certain compilation was triggered on my old system (I don't have access to
> it anymore).
> 
> I think I set up Graal properly. I basically just call java from my
> downloaded VM like I normally do. Here's the full command for reference.
> 
> ~/lib/graalvm-0.16/bin/java
> -Dgraal.TruffleCompilationStatistics=true
> -Dgraal.TruffleCompilationExceptionsAreFatal=true
> -Dgraal.TruffleCallTargetProfiling=true -Dgraal.Dump
> -Dgraal.TruffleBackgroundCompilation=true -Djvmci.option.Dump -cp
> $MUMBLER_LIB/antlr4-runtime-4.5.jar:$MUMBLER_LIB/lang.jar
> mumbler.truffle.TruffleMumblerMain /tmp/inline-test.mumbler
> 
> My test program is a simple recursive loop that adds a number 1000+ times
> to trigger compilation. Nothing fancy.
> 
> I tried to build graal per the instructions on GitHub but I get a
> compilation error.
> 
> Some of the output from the flags:
> 
> Truffle compilation statistics:
>  Compilations                                      : 0
>    Success                                         : 0
>    Failed                                          : 0
>    Interrupted                                     : 0
>  Invalidated                                       : 0
>  Queues                                            : 7
>  Dequeues                                          : 2
>  Splits                                            : 0
>  Compilation Accuracy                              : NaN
>  Queue Accuracy                                    : 0.714286
>  Compilation Utilization                           : 0.000000
>  Remaining Compilation Queue                       : 6
> 
> Call Target                                         | Total Calls     ||
> Interp. Calls   | Opt. Calls      || Direct Calls    | Inlined Calls   |
> Indirect Calls  || Invalidations
>  [AddBuiltinNodeGen at 6e2c634b]                       |           26000 ||
>        26000 |               0 ||           26000 |               0 |
>          0 ||   0
>  [EqualBuiltinNodeGen at 4b9af9a9]                     |           23005 ||
>        23005 |               0 ||           23005 |               0 |
>          0 ||   0
>  [SubBuiltinNodeGen at 4d405ef7]                       |           23001 ||
>        23001 |               0 ||           23001 |               0 |
>          0 ||   0
> 
> Thanks,
> Cristian



More information about the graal-dev mailing list