>
> I guess the main thing would perhaps be that you'd have to update the
> command line argument parser to accept
> the LuaJIT profiling arguments?


Yes, we might need to do that. Though in some cases I've seen before, it is
possible to also access those arguments using a Lua API, making it feasible
to use the profiler without threading it through the interpreter arguments.

-- Zach


On Mon, May 11, 2015 at 11:34 AM, Isak Andersson <[email protected]>
wrote:

>  Hey Zach,
>
> Thanks for the reply!
>
> Yeah I was thinking that too when looking through the Makefile. However I
> don't actually know if there is any
> tar ball available yet for any of the 2.1 things. If so maybe it would
> work. Otherwise one could just modify the
> Makefile to get the latest git version or something along those lines.
>
> I guess the main thing would perhaps be that you'd have to update the
> command line argument parser to accept
> the LuaJIT profiling arguments?
>
> Thanks
>
>
> On 11/05/2015 19:13, Zach DeVito wrote:
>
> When we update to LuaJIT 2.1, profiling support should come along with the
> upgrade (we don't modify the LuaJIT API in any way). I'll probably make the
> switch once 2.1 is actually out of beta. Though I haven't tested it, it may
> be possible to just use it right now by changing the line:
>
>  LUAJIT_VERSION=LuaJIT-2.0.3
>
>  in the Terra makefile.
>
>  -- Zach
>
> On Sun, May 10, 2015 at 1:59 PM, Isak Andersson <[email protected]>
> wrote:
>
>> Hey hey!
>>
>> I'm about to start using Terra for a pretty large project and I was
>> wondering a little bit about the status and plans for profiling support for
>> Terra that exists now and that's coming up in the future. LuaJIT 2.1 has
>> added support for profiling and it's proven essential to figure out how to
>> make code run faster. I was trying to benchmark luajit with minilight (
>> http://www.hxa.name/minilight/) comparing it to the performance of C. It
>> was about 10x slower and when profiling it seemed to be due to it pretty
>> much not using the JIT at all, instead always falling back to the
>> interpreter because of the current register handling in luajit.
>>
>> So when using Terra it would be super useful to be able to figure out
>> where LuaJIT is doing things the wrong way, so that I can replace the
>> troublesome functions with terra functions instead. Which would allow me to
>> easier balance using (possibly) more productive high level code a lot of
>> the time without sacrificing control of performance.
>>
>> As such, I'm wondering if the LuaJIT 2.1 profiling support will be added
>> to Terra when it's finally released, and also if maybe Terra has any plans
>> for profiling Terra code to find hotspots etc. Something that could also be
>> useful.
>>
>> Thanks!
>>
>> Best regards,
>> Isak Andersson
>> _______________________________________________
>> terralang mailing list
>> [email protected]
>> https://mailman.stanford.edu/mailman/listinfo/terralang
>>
>
>
>
_______________________________________________
terralang mailing list
[email protected]
https://mailman.stanford.edu/mailman/listinfo/terralang

Reply via email to