Trace in LuaJIT

#1

I was confused about LuaJIT’s trace link and exit.

I thought every trace will exit via int LJ_FASTCALL lj_trace_exit(jit_State *J, void *exptr), but the trace link return didn’t invoke this function,
even the function LJ_FUNC const BCIns *lj_snap_restore(jit_State *J, void *exptr) at all.

But when a trace exit to the interpreter(ignore sidetrace here), the register
will restore from the corresponding snapshot. So how did the trace link “return” restore it’s register when it exit to the interpreter?

And when did the link setted in lj_record_stop was used? in the end of the corresponding MC?

#2

Ehm, that is in which way related to Cloudflare?

#3

I would guess in relation to Cloudflare’s use of luajit

But I don’t think this is the right forum for this, it’s a little technical and too unrelated to Cloudflare.

#4

If that is the relation the OP best writes a comment at the bottom of that article. It is not really for the forum here.

1 Like
closed #5

This topic was automatically closed after 30 days. New replies are no longer allowed.