[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: question on debug hooks
- From: Roberto Ierusalimschy <roberto@...>
- Date: Sat, 6 Apr 2013 10:11:45 -0300
> Especially with values "l" and 50000, I would have expected the debug counter to be far lower than the loop counter.
> What am I missing? Any help is appreciated.
* http://www.lua.org/manual/5.2/manual.html#pdf-debug.sethook
With a count different from zero, the hook is called after every
count instructions.
"instructions" here means opcode instructions of the virtual machine.
So, with values "l" and 50000, the hook is called for every line and for
every 50000 instructions executed. Each line in your loop has less than a
dozen instructions, so the line calls completely dominates the counting.
-- Roberto