I'm looking for a good guide on how to optimize Lua code for [LuaJIT 2](http://luajit.org). It should focus on LJ2 specifics, like how to detect which traces are being compiled and which are not, etc.

Any pointers? Collection of links to Lua ML posts would do as an answer (bonus points for summarizing these links here.)

*Update: I've changed the title text from 'profiling' to 'optimization' guide, as this makes more sense.*