Skip to content

Commit

Permalink
Merge branch 'unique-trace-numbers' into auditlog
Browse files Browse the repository at this point in the history
  • Loading branch information
lukego committed Aug 2, 2017
2 parents a292144 + 4b4dcb0 commit 48be218
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/lj_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static TraceNo trace_findfree(jit_State *J)
lj_mem_growvec(J->L, J->trace, J->sizetrace, lim, GCRef);
for (; osz < J->sizetrace; osz++)
setgcrefnull(J->trace[osz]);
return J->freetrace;
return J->freetrace++;
}

#define TRACE_APPENDVEC(field, szfield, tp) \
Expand Down Expand Up @@ -136,8 +136,6 @@ void lj_trace_free(global_State *g, GCtrace *T)
jit_State *J = G2J(g);
if (T->traceno) {
lj_gdbjit_deltrace(J, T);
if (T->traceno < J->freetrace)
J->freetrace = T->traceno;
setgcrefnull(J->trace[T->traceno]);
}
lj_mem_free(g, T,
Expand Down Expand Up @@ -257,7 +255,6 @@ int lj_trace_flushall(lua_State *L)
}
}
J->cur.traceno = 0;
J->freetrace = 0;
/* Clear penalty cache. */
memset(J->penalty, 0, sizeof(J->penalty));
/* Free the whole machine code and invalidate all exit stub groups. */
Expand Down

0 comments on commit 48be218

Please sign in to comment.