Mike has implemented a low overhead profiler in 2.1, you may try it to sample your code and find the hot spot. Regards, Zenk 2014-11-5 上午3:35于 "Александр Киранов" <xhaskx@xxxxxxxxx>写道: > Hi all! > > Need your help with C api of luajit. > > I have large Linux application, it contains many OS threads and some of > them has lua_State to execute LUA scripts. > And I need to prevent big CPU time consumption by any lua_State. > So, when some lua_State consumed too many CPU I need to know it and handle > it on LUA or on C level. > > Maybe there is an existing solution in luajit for it? > Or somebody can point me where in luajit source I can put some appropriate > "crutch" for my purpose? > > P.S. sorry for my bad english > > --- > Best regards, > Alex >