Re: Hi!

  • From: Thomas Schilling <nominolo@xxxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 10 Oct 2012 19:55:20 +0100

On 10 October 2012 02:38, Sanjoy Das <sanjoy@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> Hi all,
>
> I'm a software engineer with a keen interest in virtual machines and
> related technology.  Currently I'm playing around with
> state-of-the-art VMs in an attempt to observe, learn and improve.
>
> Can you guys suggest a small bite-sized project I could work on to
> familiarize myself with LuaJIT internals?  Something that would take
> someone with prior VM experience (but no experience with LuaJIT)
> around 7-10 days to implement?  This way I get my hands dirty with the
> source and, if my work is deemed good enough, LuaJIT profits as well.

Are you interested in any particular aspects?  The LuaJIT source is
dense but readable (and grep is your friend).  Some of the
higher-level ideas are explained at
<http://lua-users.org/lists/lua-l/2009-11/msg00089.html> and on the
wiki.

The profiler project seems like a good idea.  You can already use
Linux's `perf` (you need to add -DLUAJIT_USE_PERFTOOLS to your
XCFLAGS). It can tell you how much time is spent in various traces vs.
the interpreter. A more integrated profiler could inspect the Lua
stack to give better insights.

If you want to dig into the code generator some more, you could add
support for collecting trace completion stats. This would be more
useful for tuning the trace selection heuristics itself. It's less of
an end-user tool. It also adds runtime overhead, so it should be
optional.

It would be helpful to know what aspects of LuaJIT you're most interested in.

 / Thomas

  • Follow-Ups:
  • References:
    • Hi!
      • From: Sanjoy Das

Other related posts: