Skip to content

Commit

Permalink
lj_trace.c, lj_auditlog.c: Log auditlog event "trace_flushall"
Browse files Browse the repository at this point in the history
  • Loading branch information
lukego committed Mar 1, 2018
1 parent c6347dc commit cad220d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/lj_auditlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,12 @@ void lj_auditlog_new_prototype(GCproto *pt)
}
}

void lj_auditlog_trace_flushall(jit_State *J)
{
if (ensure_log_started()) {
log_jit_State(J);
log_event("trace_flushall", 1);
str_16("jit_State"); /* = */ uint_64((uint64_t)J);
}
}

2 changes: 1 addition & 1 deletion src/lj_auditlog.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ int lj_auditlog_open(const char *path);

void lj_auditlog_new_prototype(GCproto *pt);
void lj_auditlog_lex(const char *chunkname, const char *s, int sz);
void lj_auditlog_trace_flush(jit_State *J);
void lj_auditlog_trace_flushall(jit_State *J);
void lj_auditlog_trace_stop(jit_State *J, GCtrace *T);
void lj_auditlog_trace_abort(jit_State *J, TraceError e);

Expand Down
1 change: 1 addition & 0 deletions src/lj_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ int lj_trace_flushall(lua_State *L)
ptrdiff_t i;
if ((J2G(J)->hookmask & HOOK_GC))
return 1;
lj_auditlog_trace_flushall(J);
for (i = (ptrdiff_t)J->sizetrace-1; i > 0; i--) {
GCtrace *T = traceref(J, i);
if (T) {
Expand Down

0 comments on commit cad220d

Please sign in to comment.