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

Gerard Krol gerard at gerardkrol.nl
Thu Aug 11 20:28:26 UTC 2016


Hi Christian,

Great, thanks!

Regards,

Gerard

On Thu, Aug 11, 2016 at 8:06 PM, Christian Humer <christian.humer at gmail.com>
wrote:

> Hi Gerard,
>
> I could reproduce and fix your problem. The outer loop compilation was
> indeed blocking the inner loop compilation when background compilation was
> enabled.
>
> Its fixed in https://github.com/graalvm/graal-core/commit/e46c8d69e4a12fc
> e8a7ca6853a5e60294af262de if you are building your own graal-core.
> If not, its going to be in the next GraalVM release 0.17 coming to OTN,
> early next month.
>
> Cheers,
> Christian
>
>
> On 04.08.2016 22:13:27, "Gerard Krol" <gerard at gerardkrol.nl> wrote:
>
> Hi Christian,
>>
>> I'm using graalvm version 0.12, with truffle-api 0.15. I'm perfectly happy
>> with background compilation disabled at the moment, so take your time.
>>
>> Regards,
>>
>> Gerard
>>
>> On Thu, Aug 4, 2016 at 9:56 PM, Christian Humer <
>> christian.humer at gmail.com>
>> wrote:
>>
>>  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?
>>>
>>>  Thanks,
>>>  Christian
>>>
>>>  On 04.08.2016 21:46:17, "Gerard Krol" <gerard at gerardkrol.nl> wrote:
>>>
>>>  Hi,
>>>
>>>>
>>>>  I've had some performance problems with Cover[1] and a specific
>>>> benchmark.
>>>>  Yesterday I finally figured out what was going on. The problem seems
>>>> to be
>>>>  that on-stack-replacement doesn't always work well with background
>>>>  compilation.
>>>>
>>>>  The benchmark (fannkuch, [2])  did take 311 seconds to run, while the
>>>> GCC
>>>>  version would finish in 25 seconds. Warming up (running the benchmark
>>>>  twice
>>>>  and timing the second run) would reduce the runtime to 47 seconds. I
>>>> like
>>>>  to run my benchmarks without warmup though, as that is a good
>>>> worst-case
>>>>  scenario.
>>>>
>>>>  I then figured out that just adding
>>>>  -Dgraal.TruffleBackgroundCompilation=false made a huge difference. The
>>>>  time
>>>>  needed was reduced to 52 seconds.
>>>>
>>>>  Is this a bug? Expected behavior in some cases? Am I doing something
>>>>  wrong?
>>>>
>>>>  Reproduction:
>>>>  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
>>>> will
>>>>  disable the background compilation)
>>>>
>>>>  Regards,
>>>>
>>>>  Gerard
>>>>
>>>>  [1] https://github.com/gerard-/cover
>>>>  [2]
>>>>  https://github.com/gerard-/cover/blob/master/tests/fannkuch-
>>>>  redux_gcc5.cover
>>>>
>>>>
>>>
>>>
>


More information about the graal-dev mailing list