Skip to content

Commit

Permalink
xlog.h: add a few __predict_false
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Jan 19, 2023
1 parent bbedc54 commit 56d8693
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/xlog.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "platform.h"
#include "toywasm_config.h"

void xlog_printf(const char *, ...)
Expand All @@ -16,7 +17,7 @@ extern int xlog_tracing;
#if defined(TOYWASM_ENABLE_TRACING_INSN)
#define xlog_trace_insn(...) \
do { \
if (xlog_tracing > 1) { \
if (__predict_false(xlog_tracing > 1)) { \
xlog__trace(__VA_ARGS__); \
} \
} while (0)
Expand All @@ -27,7 +28,7 @@ extern int xlog_tracing;
#if defined(TOYWASM_ENABLE_TRACING)
#define xlog_trace(...) \
do { \
if (xlog_tracing > 0) { \
if (__predict_false(xlog_tracing > 0)) { \
xlog__trace(__VA_ARGS__); \
} \
} while (0)
Expand Down

0 comments on commit 56d8693

Please sign in to comment.