lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi all.

I'm looking at putting together some simple profiling code, for the project
that I'm working on at the moment - and one of the things that I want to
keep track of are the number of lines of Lua that have been run per frame of
game time.

To that end, I'm using lua_sethook() on my main co-routine, and that's
working excellently - however - it doesn't get called for any of the
co-routines created and run from that that call.

Is there a nice way that I can catch the creation of those co-routines, in
order to install the hook on them, short of modifying the code for
luaB_cocreate directly, that anyone can think of?

Thanks in advance,

D.
--
Plotting the Downfall of Humanity, since 1974...