mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Fix interaction of profiler and ITERN recording.
Reported and analyzed by vfprintf. #754
This commit is contained in:
parent
442eff63ab
commit
05f1984e1a
@ -663,7 +663,9 @@ static LoopEvent rec_itern(jit_State *J, BCReg ra, BCReg rb)
|
|||||||
#else
|
#else
|
||||||
RecordIndex ix;
|
RecordIndex ix;
|
||||||
/* Since ITERN is recorded at the start, we need our own loop detection. */
|
/* Since ITERN is recorded at the start, we need our own loop detection. */
|
||||||
if (J->pc == J->startpc && J->cur.nins > REF_FIRST &&
|
if (J->pc == J->startpc &&
|
||||||
|
(J->cur.nins > REF_FIRST+1 ||
|
||||||
|
(J->cur.nins == REF_FIRST+1 && J->cur.ir[REF_FIRST].o != IR_PROF)) &&
|
||||||
J->framedepth + J->retdepth == 0 && J->parent == 0 && J->exitno == 0) {
|
J->framedepth + J->retdepth == 0 && J->parent == 0 && J->exitno == 0) {
|
||||||
lj_record_stop(J, LJ_TRLINK_LOOP, J->cur.traceno); /* Looping trace. */
|
lj_record_stop(J, LJ_TRLINK_LOOP, J->cur.traceno); /* Looping trace. */
|
||||||
return LOOPEV_ENTER;
|
return LOOPEV_ENTER;
|
||||||
|
Loading…
Reference in New Issue
Block a user