Truffle on-stack-replacement sometimes not working well with background compilation?

Christian Humer christian.humer at
Thu Aug 4 19:56:07 UTC 2016

Hi Gerard,

Thanks for the report. Unfortunately I am unable to have a look at it 
right now, but I will asap.
Can you, in the meantime, provide me with some info on which version of 
graalvm/truffle you are using so I can try to reproduce?


On 04.08.2016 21:46:17, "Gerard Krol" <gerard at> wrote:

>I've had some performance problems with Cover[1] and a specific 
>Yesterday I finally figured out what was going on. The problem seems to 
>that on-stack-replacement doesn't always work well with background
>The benchmark (fannkuch, [2])  did take 311 seconds to run, while the 
>version would finish in 25 seconds. Warming up (running the benchmark 
>and timing the second run) would reduce the runtime to 47 seconds. I 
>to run my benchmarks without warmup though, as that is a good 
>I then figured out that just adding
>-Dgraal.TruffleBackgroundCompilation=false made a huge difference. The 
>needed was reduced to 52 seconds.
>Is this a bug? Expected behavior in some cases? Am I doing something 
>1. Get Cover from [1] (don't forget the 5th installation step)
>2. Run time ./cover tests/fannkuch-redux_gcc5.cover
>3. Run time ./cover -benchmark tests/fannkuch-redux_gcc5.cover (this 
>disable the background compilation)

More information about the graal-dev mailing list