[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] LuaJIT-2.0.0-beta1
- From: Mike Pall <mikelu-0911@...>
- Date: Sun, 1 Nov 2009 17:11:35 +0100
steve donovan wrote:
> Seeing as LJ is already tracing all Lua calls that are executed, could
> it not have an option to export this information in a form that would
> facilitate code browsing? This is a common problem when familiarizing
> oneself with a large code base. From static analysis, it is
> practically impossible to know what code paths are implied by the
> simple call 'obj:method()'
Well, yes, but it only shows the hot paths. Try -jdump=b and watch
the traced bytecode on a non-trivial example.
> The exact format is not important, only that it is parseable ;)
Even better: the VM has full introspection -- the dump module is
written in pure Lua. Look at the dump_record() function. Simply
hook into the "record" vmhook yourself and collect whatever info
you need about the executed code.
--Mike