From c2644d4c2efe7b1231fcd1c5f9dad91eeff46c1c Mon Sep 17 00:00:00 2001 From: Nick Zavaritsky Date: Sun, 6 Nov 2016 17:33:21 +0300 Subject: [PATCH] Report parent for stitched traces in trace start vmevent --- src/lj_trace.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lj_trace.c b/src/lj_trace.c index 87146832..31676293 100644 --- a/src/lj_trace.c +++ b/src/lj_trace.c @@ -446,6 +446,13 @@ static void trace_start(jit_State *J) if (J->parent) { setintV(L->top++, J->parent); setintV(L->top++, J->exitno); + } else { + BCOp op = bc_op(*J->pc); + if (op == BC_CALLM || op == BC_CALL || op == BC_ITERC) { + /* stitching, parent stored as exitno */ + setintV(L->top++, J->exitno); + setintV(L->top++, 0); + } } ); lj_record_setup(J);