Don't start a trace on side exit to non-Lua function.

This commit is contained in:
Mike Pall 2014-01-31 20:44:27 +01:00
parent 5a5a340f6e
commit a2abf2e098

View File

@ -682,6 +682,7 @@ static void trace_hotside(jit_State *J, const BCIns *pc)
{ {
SnapShot *snap = &traceref(J, J->parent)->snap[J->exitno]; SnapShot *snap = &traceref(J, J->parent)->snap[J->exitno];
if (!(J2G(J)->hookmask & (HOOK_GC|HOOK_VMEVENT)) && if (!(J2G(J)->hookmask & (HOOK_GC|HOOK_VMEVENT)) &&
isluafunc(curr_func(J->L)) &&
snap->count != SNAPCOUNT_DONE && snap->count != SNAPCOUNT_DONE &&
++snap->count >= J->param[JIT_P_hotexit]) { ++snap->count >= J->param[JIT_P_hotexit]) {
lua_assert(J->state == LJ_TRACE_IDLE); lua_assert(J->state == LJ_TRACE_IDLE);