[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Hooks, tailcalls and tracing LuaJIT
- From: Geoff Leyland <geoff_leyland@...>
- Date: Wed, 6 Apr 2011 06:22:45 +1200
On 6/04/2011, at 3:05 AM, Mike Pall wrote:
> Oops, I just noticed I can't provide that info. The (tail)call has
> already been performed when the hook is called.
>
> Sorry, I guess you have to record the stack depth in the hook.
> Note that it's sufficient to probe the outermost frame and one
> below (one should be ok, the other not).
I guess I'll do that. I think that means that the collector will have to have enough state to follow threads and errors, which I was hoping to avoid. Maybe I need to think harder about how to keep track of what the stack depth was.
>> Another question for later: is the timing measurement error for
>> a profiler likely to change for VM and JITed code?
>
> Well, the JIT compiled code doesn't call hooks ...
Oh. Do you mean that if you're using hooks then nothing gets compiled or that I'll miss traces from compiled code? Either way, that makes profiling awkward.