It looks like you are seeing the inlined C calls but the Lua level
name isn't getting reset so you see "a" apparently called four times.
the output is a bit less confusing if you restrict to Lua

        if (hookType == "call" and funcInfo.what=='Lua') then

Then you get

$ luajittex --luaonly pg1.lua
call    dothings
call    a
call    a
return  dothings


$ luatex --luaonly pg1.lua
call    dothings
call    a
return  a
call    a
return  a
return  dothings

so it doesn't trace format in either case and doesn't trace the
returns in luajit, presumably as the function has been inlined in some
way by the jit compiler.

Reply via email to