[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Are there any lua profilers that work with LuaJIT 2.x?
- From: Geoff Leyland <geoff_leyland@...>
- Date: Tue, 3 Sep 2013 16:15:00 +1200
On 3/09/2013, at 4:00 PM, lua.greatwolf@mamber.net wrote:
> Greetings,
>
> I was wondering if there are any suitable profiling tools for checking script performance in LuaJIT. I've tried most of the profilers listed in the lua wiki:
>
> http://lua-users.org/wiki/ProfilingLuaCode
>
> but the main problem I keep running into is that none of them can properly profile lua C function calls. The main issue seems to be that LuaJIT doesn't implement the "return" sethook when C functions are called. What ends up happening is that the final generated report would end up listing any C function calls as taking up 0 time.
I thought I'd got that one right at least, but it's been a while since I worked on or used luatrace I don't really remember. In any case, tracing both Lua and LuaJIT with the same code is difficult, and hooks don't play well with jit.on.
> Are there any other alternatives or different approach to consider? How would one profile lua script performance under LuaJIT when lua C functions are involve?
Mike mentioned profiling in the LuaJIT list in June:
http://www.freelists.org/post/luajit/RFC-Lowoverhead-profiling-for-LuaJIT-21