X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt-usertrace%2Fltt%2Fltt-usertrace-fast.h;h=bfca0c10d5b994b4df5292bb02c7481e8ea1a865;hb=3a4541a514dc6da3580401c084489910bc769ab7;hp=b0d222f83bc0467da307bd1daa53d5780b06af11;hpb=976db1b3ea97f6714590ec9cf36ea30b9b6aa59b;p=lttv.git diff --git a/ltt-usertrace/ltt/ltt-usertrace-fast.h b/ltt-usertrace/ltt/ltt-usertrace-fast.h index b0d222f8..bfca0c10 100644 --- a/ltt-usertrace/ltt/ltt-usertrace-fast.h +++ b/ltt-usertrace/ltt/ltt-usertrace-fast.h @@ -12,11 +12,9 @@ #ifdef LTT_TRACE_FAST #include -#include #include #include #include -#include #include #include @@ -350,7 +348,7 @@ static inline void * __attribute__((no_instrument_function)) ltt_reserve_slot( struct ltt_trace_info *trace, struct ltt_buf *ltt_buf, unsigned int data_size, - unsigned int *slot_size, + size_t *slot_size, uint64_t *tsc, size_t *before_hdr_pad, size_t *after_hdr_pad, @@ -476,7 +474,7 @@ static inline void * __attribute__((no_instrument_function)) ltt_reserve_slot( index in the buffer being the one which will win this loop. */ /* If the buffer is not in overwrite mode, pushing the reader only happen if a sub-buffer is corrupted */ - if((SUBBUF_TRUNC(offset_end, ltt_buf) + if((SUBBUF_TRUNC(offset_end-1, ltt_buf) - SUBBUF_TRUNC(consumed_old, ltt_buf)) >= ltt_buf->alloc_size) consumed_new = SUBBUF_ALIGN(consumed_old, ltt_buf);