mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Report parent of stitched trace.
Thanks to Nick Zavaritsky.
This commit is contained in:
parent
716f2daef8
commit
7a58a8fb3d
@ -556,7 +556,7 @@ local function dump_trace(what, tr, func, pc, otr, oex)
|
|||||||
if what == "start" then
|
if what == "start" then
|
||||||
if dumpmode.H then out:write('<pre class="ljdump">\n') end
|
if dumpmode.H then out:write('<pre class="ljdump">\n') end
|
||||||
out:write("---- TRACE ", tr, " ", what)
|
out:write("---- TRACE ", tr, " ", what)
|
||||||
if otr then out:write(" ", otr, "/", oex) end
|
if otr then out:write(" ", otr, "/", oex == -1 and "stitch" or oex) end
|
||||||
out:write(" ", fmtfunc(func, pc), "\n")
|
out:write(" ", fmtfunc(func, pc), "\n")
|
||||||
elseif what == "stop" or what == "abort" then
|
elseif what == "stop" or what == "abort" then
|
||||||
out:write("---- TRACE ", tr, " ", what)
|
out:write("---- TRACE ", tr, " ", what)
|
||||||
|
@ -99,7 +99,7 @@ end
|
|||||||
local function dump_trace(what, tr, func, pc, otr, oex)
|
local function dump_trace(what, tr, func, pc, otr, oex)
|
||||||
if what == "start" then
|
if what == "start" then
|
||||||
startloc = fmtfunc(func, pc)
|
startloc = fmtfunc(func, pc)
|
||||||
startex = otr and "("..otr.."/"..oex..") " or ""
|
startex = otr and "("..otr.."/"..(oex == -1 and "stitch" or oex)..") " or ""
|
||||||
else
|
else
|
||||||
if what == "abort" then
|
if what == "abort" then
|
||||||
local loc = fmtfunc(func, pc)
|
local loc = fmtfunc(func, pc)
|
||||||
|
@ -446,6 +446,12 @@ static void trace_start(jit_State *J)
|
|||||||
if (J->parent) {
|
if (J->parent) {
|
||||||
setintV(L->top++, J->parent);
|
setintV(L->top++, J->parent);
|
||||||
setintV(L->top++, J->exitno);
|
setintV(L->top++, J->exitno);
|
||||||
|
} else {
|
||||||
|
BCOp op = bc_op(*J->pc);
|
||||||
|
if (op == BC_CALLM || op == BC_CALL || op == BC_ITERC) {
|
||||||
|
setintV(L->top++, J->exitno); /* Parent of stitched trace. */
|
||||||
|
setintV(L->top++, -1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
lj_record_setup(J);
|
lj_record_setup(J);
|
||||||
|
Loading…
Reference in New Issue
Block a user