Skip to content

Commit

Permalink
lj_auditlog: Implement logging of trace_abort
Browse files Browse the repository at this point in the history
  • Loading branch information
lukego committed May 24, 2017
1 parent b302c6e commit 2dfdb73
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/lj_auditlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <stdio.h>

#include "lj_trace.h"
#include "lj_auditlog.h"

/* File where the audit log is written. */
Expand Down Expand Up @@ -80,3 +81,10 @@ void lj_auditlog_trace_stop(jit_State *J, GCtrace *T)
str_16("GCtrace"); /* = */ uint_64((uint64_t)T);
}

void lj_auditlog_trace_abort(jit_State *J, TraceError e) {
log_mem("jit_State", J, sizeof(*J));
log_event("trace_abort", 2);
str_16("jit_State"); /* = */ uint_64((uint64_t)J);
str_16("TraceError"); /* = */ uint_64(e);
}

3 changes: 2 additions & 1 deletion src/lj_auditlog.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
#define _LJ_AUDITLOG_H

#include "lj_jit.h"
#include "lj_trace.h"

void lj_auditlog_trace_flush(jit_State *J);
void lj_auditlog_trace_start(jit_State *J);
void lj_auditlog_trace_stop(jit_State *J, GCtrace *T);
void lj_auditlog_trace_abort(jit_State *J);
void lj_auditlog_trace_abort(jit_State *J, TraceError e);
void lj_auditlog_trace_record_bytecode(jit_State *J);

#endif

0 comments on commit 2dfdb73

Please sign in to comment.