diff options
Diffstat (limited to 'src/lj_trace.c')
-rw-r--r-- | src/lj_trace.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lj_trace.c b/src/lj_trace.c index 69124542..ab75c9d2 100644 --- a/src/lj_trace.c +++ b/src/lj_trace.c | |||
@@ -638,6 +638,7 @@ void lj_trace_ins(jit_State *J, const BCIns *pc) | |||
638 | /* A hotcount triggered. Start recording a root trace. */ | 638 | /* A hotcount triggered. Start recording a root trace. */ |
639 | void LJ_FASTCALL lj_trace_hot(jit_State *J, const BCIns *pc) | 639 | void LJ_FASTCALL lj_trace_hot(jit_State *J, const BCIns *pc) |
640 | { | 640 | { |
641 | ERRNO_SAVE | ||
641 | /* Note: pc is the interpreter bytecode PC here. It's offset by 1. */ | 642 | /* Note: pc is the interpreter bytecode PC here. It's offset by 1. */ |
642 | hotcount_set(J2GG(J), pc, J->param[JIT_P_hotloop]+1); /* Reset hotcount. */ | 643 | hotcount_set(J2GG(J), pc, J->param[JIT_P_hotloop]+1); /* Reset hotcount. */ |
643 | /* Only start a new trace if not recording or inside __gc call or vmevent. */ | 644 | /* Only start a new trace if not recording or inside __gc call or vmevent. */ |
@@ -648,6 +649,7 @@ void LJ_FASTCALL lj_trace_hot(jit_State *J, const BCIns *pc) | |||
648 | J->state = LJ_TRACE_START; | 649 | J->state = LJ_TRACE_START; |
649 | lj_trace_ins(J, pc-1); | 650 | lj_trace_ins(J, pc-1); |
650 | } | 651 | } |
652 | ERRNO_RESTORE | ||
651 | } | 653 | } |
652 | 654 | ||
653 | /* Check for a hot side exit. If yes, start recording a side trace. */ | 655 | /* Check for a hot side exit. If yes, start recording a side trace. */ |
@@ -684,6 +686,7 @@ static TValue *trace_exit_cp(lua_State *L, lua_CFunction dummy, void *ud) | |||
684 | /* A trace exited. Restore interpreter state. */ | 686 | /* A trace exited. Restore interpreter state. */ |
685 | int LJ_FASTCALL lj_trace_exit(jit_State *J, void *exptr) | 687 | int LJ_FASTCALL lj_trace_exit(jit_State *J, void *exptr) |
686 | { | 688 | { |
689 | ERRNO_SAVE | ||
687 | lua_State *L = J->L; | 690 | lua_State *L = J->L; |
688 | ExitDataCP exd; | 691 | ExitDataCP exd; |
689 | int errcode; | 692 | int errcode; |
@@ -738,6 +741,7 @@ int LJ_FASTCALL lj_trace_exit(jit_State *J, void *exptr) | |||
738 | } | 741 | } |
739 | } | 742 | } |
740 | /* Return MULTRES or 0. */ | 743 | /* Return MULTRES or 0. */ |
744 | ERRNO_RESTORE | ||
741 | switch (bc_op(*pc)) { | 745 | switch (bc_op(*pc)) { |
742 | case BC_CALLM: case BC_CALLMT: | 746 | case BC_CALLM: case BC_CALLMT: |
743 | return (int)((BCReg)(L->top - L->base) - bc_a(*pc) - bc_c(*pc)); | 747 | return (int)((BCReg)(L->top - L->base) - bc_a(*pc) - bc_c(*pc)); |