I don't know about luaprofiler. But consider using luatrace, which冶晶邓 wrote:
> i find the profiler not work when using luajit2...
> the "profiler.start()" call leads to a crash with some tips as "pure virtual
> function call"...
> is luajit2 incompatible with luaprofiler?
has explicit support for LuaJIT: