diff options
author | Mike Pall <mike> | 2010-02-03 14:34:30 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2010-02-03 14:34:30 +0100 |
commit | c1c9abeab7f3716dda213c6048344e1bf4f58486 (patch) | |
tree | 31b151bcdd368a3b0cbb6c1e90bfc491ec262b3c /src | |
parent | 305ecbbb84e18bb6b8a90402ca38c604c64c7bd8 (diff) | |
download | luajit-c1c9abeab7f3716dda213c6048344e1bf4f58486.tar.gz luajit-c1c9abeab7f3716dda213c6048344e1bf4f58486.tar.bz2 luajit-c1c9abeab7f3716dda213c6048344e1bf4f58486.zip |
Add extra check to suppress hotcall event during recording.
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_trace.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lj_trace.c b/src/lj_trace.c index b2b35373..d1883ad2 100644 --- a/src/lj_trace.c +++ b/src/lj_trace.c | |||
@@ -551,8 +551,9 @@ static void trace_new(jit_State *J) | |||
551 | void LJ_FASTCALL lj_trace_hot(jit_State *J, const BCIns *pc) | 551 | void LJ_FASTCALL lj_trace_hot(jit_State *J, const BCIns *pc) |
552 | { | 552 | { |
553 | hotcount_set(J2GG(J), pc, J->param[JIT_P_hotloop]+1); /* Reset hotcount. */ | 553 | hotcount_set(J2GG(J), pc, J->param[JIT_P_hotloop]+1); /* Reset hotcount. */ |
554 | /* Only start a new trace if not inside __gc call or vmevent. */ | 554 | /* Only start a new trace if not recording or inside __gc call or vmevent. */ |
555 | if (!(J2G(J)->hookmask & (HOOK_GC|HOOK_VMEVENT))) { | 555 | if (J->state == LJ_TRACE_IDLE && |
556 | !(J2G(J)->hookmask & (HOOK_GC|HOOK_VMEVENT))) { | ||
556 | lua_State *L = J->L; | 557 | lua_State *L = J->L; |
557 | L->top = curr_topL(L); /* Only called from Lua and NRESULTS is not used. */ | 558 | L->top = curr_topL(L); /* Only called from Lua and NRESULTS is not used. */ |
558 | J->parent = 0; /* Root trace. */ | 559 | J->parent = 0; /* Root trace. */ |