aboutsummaryrefslogtreecommitdiff
path: root/src/lj_trace.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lj_trace.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/lj_trace.c b/src/lj_trace.c
index c70fc247..2b8d931f 100644
--- a/src/lj_trace.c
+++ b/src/lj_trace.c
@@ -766,17 +766,20 @@ int LJ_FASTCALL lj_trace_exit(jit_State *J, void *exptr)
766 if (errcode) 766 if (errcode)
767 return -errcode; /* Return negated error code. */ 767 return -errcode; /* Return negated error code. */
768 768
769 lj_vmevent_send(L, TEXIT, 769 if (!(LJ_HASPROFILE && (G(L)->hookmask & HOOK_PROFILE)))
770 lj_state_checkstack(L, 4+RID_NUM_GPR+RID_NUM_FPR+LUA_MINSTACK); 770 lj_vmevent_send(L, TEXIT,
771 setintV(L->top++, J->parent); 771 lj_state_checkstack(L, 4+RID_NUM_GPR+RID_NUM_FPR+LUA_MINSTACK);
772 setintV(L->top++, J->exitno); 772 setintV(L->top++, J->parent);
773 trace_exit_regs(L, ex); 773 setintV(L->top++, J->exitno);
774 ); 774 trace_exit_regs(L, ex);
775 );
775 776
776 pc = exd.pc; 777 pc = exd.pc;
777 cf = cframe_raw(L->cframe); 778 cf = cframe_raw(L->cframe);
778 setcframe_pc(cf, pc); 779 setcframe_pc(cf, pc);
779 if (G(L)->gc.state == GCSatomic || G(L)->gc.state == GCSfinalize) { 780 if (LJ_HASPROFILE && (G(L)->hookmask & HOOK_PROFILE)) {
781 /* Just exit to interpreter. */
782 } else if (G(L)->gc.state == GCSatomic || G(L)->gc.state == GCSfinalize) {
780 if (!(G(L)->hookmask & HOOK_GC)) 783 if (!(G(L)->hookmask & HOOK_GC))
781 lj_gc_step(L); /* Exited because of GC: drive GC forward. */ 784 lj_gc_step(L); /* Exited because of GC: drive GC forward. */
782 } else { 785 } else {