lua-users home
lua-l archive

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


Ok, I added a guard for the nested case in the CVS (a second profiler start interrupts the previous profiling and starts another), as well as fixing multiple stops after a start (a small oversight in my previous fix, sigh). I also added summary.lua to the CVS rockspec and uploaded this new rockspec to http://luarocks.luaforge.net/rocks-cvs (install it using LuaRocks' --from switch), per Norman Ramsey's request on the Kepler list.

--
Fabio Mascarenhas

On Tue, May 20, 2008 at 9:27 AM, Shmuel Zeigerman <shmuz@actcom.co.il> wrote:
Fabio Mascarenhas wrote:
   The 4-th test case:
    require"profiler"
    profiler.stop()
    profiler.stop() --> crash here


Sorry, couldn't reproduce this... the code is already guarding against a stop without a start, so it shouldn't matter if you are doing one stop or 10. :-)

You are right. I got a crash because I didn't run this test case independently but rather together with other test cases.
The 4-th test case crashes when it is run after the 1-st test.
I combined them together:


The 6-th test case:
 require"profiler"
 profiler.start()
 local co = coroutine.create(function() end)
 coroutine.resume(co)
 profiler.stop()

 profiler.stop()
 profiler.stop() --> crash

--
Shmuel