From: Liu Yuan <[email protected]> Sometimes it can be negative, in this case it will be too big as unsigned.
Also mark tow functions as notrace because the are producing too high volume of trace. Signed-off-by: Liu Yuan <[email protected]> --- lib/net.c | 4 ++-- sheep/trace/graph.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/net.c b/lib/net.c index ef91446..0970111 100644 --- a/lib/net.c +++ b/lib/net.c @@ -60,7 +60,7 @@ int conn_rx_on(struct connection *conn) return modify_event(conn->fd, conn->events); } -int is_conn_dead(struct connection *conn) +notrace int is_conn_dead(struct connection *conn) { if (conn->c_rx_state == C_IO_CLOSED || conn->c_tx_state == C_IO_CLOSED) return 1; @@ -93,7 +93,7 @@ int rx(struct connection *conn, enum conn_state next_state) return ret; } -int tx(struct connection *conn, enum conn_state next_state, int flags) +notrace int tx(struct connection *conn, enum conn_state next_state, int flags) { int ret; diff --git a/sheep/trace/graph.c b/sheep/trace/graph.c index 8a7b73e..ab3a6c3 100644 --- a/sheep/trace/graph.c +++ b/sheep/trace/graph.c @@ -19,7 +19,7 @@ #include "logger.h" #include "util.h" -static __thread unsigned ret_stack_index; +static __thread int ret_stack_index; static __thread struct trace_ret_stack { unsigned long ret; unsigned long func; -- 1.7.10.2 -- sheepdog mailing list [email protected] http://lists.wpkg.org/mailman/listinfo/sheepdog
