Get the latest tech news

A Walk with LuaJIT


How we scrape callstack information from the LuaJIT engine for profiling

If your program has many different hot loops the JIT will eat a lot of time and space JIT'ing an immense variety of paths through your code that can exhaust the memory resources of the target machine. That's still a little loosey goosey for a production code so we take the added measure of looking for the lj_vm_asm_begin address and cross-checking against that when debug information hasn't been stripped (and we run unit tests against every version we can get our hands on to make sure they all work). That's important for two reasons, it limits the chances the compiler will so something tricky (like stash rdx on the stack and read it back later) and it avoids issues with Golangs incomplete x86 disassembler (to be fair x86 is a complicated beast).

Get the Android app

Or read this on Hacker News

Read more on:

Photo of LuaJIT

LuaJIT

Photo of walk

walk

Related news:

News photo

OpenAI in throes of executive exodus as three walk at once

News photo

A walk through the crypto jungle at Korea Blockchain Week

News photo

Are you blocking "keyboard walk" passwords in your Active Directory?