Alexey Bruevich
2014-08-07 11:25:05 UTC
Hi,
I'm trying to use luajit profiler to investigate bottlenecks of lua code in our project and have been stuck.
In a few words I describe our architecture:Â
Our C++ program, call wrappers to execute different Lua scriptsÂ
Problem: It seems that our lua scripts have bottlenecks we want to investigate.
Based on previous discussion ( http://www.freelists.org/post/luajit/LuaJIT-21-profiler-from-CC ) I have tried to enable profiler in our project, but have no luck.Â
( It seems, that callback function, that passed to luaJIT_profile_start is never called. Here ( http://www.freelists.org/post/luajit/LuaJIT-21-profiler-from-CC,1 ) you wrote that  callback gets called when lua code is executing - I've checked Lua code is executing.) While investigation I noticed that "lj_dispatch_profile" function is never called. This function is important, because in it body "callback function" is calling.
I was searching for answer in Internet but there are pure information about this topic. So If it possible could you create a simple example (tutorial) how to build-in luajit profiler in C++ project.Â
Thank you.
Best regards, Â AlexeyÂ
I'm trying to use luajit profiler to investigate bottlenecks of lua code in our project and have been stuck.
In a few words I describe our architecture:Â
Our C++ program, call wrappers to execute different Lua scriptsÂ
Problem: It seems that our lua scripts have bottlenecks we want to investigate.
Based on previous discussion ( http://www.freelists.org/post/luajit/LuaJIT-21-profiler-from-CC ) I have tried to enable profiler in our project, but have no luck.Â
( It seems, that callback function, that passed to luaJIT_profile_start is never called. Here ( http://www.freelists.org/post/luajit/LuaJIT-21-profiler-from-CC,1 ) you wrote that  callback gets called when lua code is executing - I've checked Lua code is executing.) While investigation I noticed that "lj_dispatch_profile" function is never called. This function is important, because in it body "callback function" is calling.
I was searching for answer in Internet but there are pure information about this topic. So If it possible could you create a simple example (tutorial) how to build-in luajit profiler in C++ project.Â
Thank you.
Best regards, Â AlexeyÂ