X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt-usertrace%2Fltt%2Fltt-usertrace-fast.h;h=778e8eb0a6d9e93c71e2865f79287d79774d2b8a;hb=680b9daadac4954ac6949f17bcf1889805811f09;hp=b0d222f83bc0467da307bd1daa53d5780b06af11;hpb=39c1a823855ca5c0dbecf361adef32ad0d893421;p=lttv.git diff --git a/ltt-usertrace/ltt/ltt-usertrace-fast.h b/ltt-usertrace/ltt/ltt-usertrace-fast.h index b0d222f8..778e8eb0 100644 --- a/ltt-usertrace/ltt/ltt-usertrace-fast.h +++ b/ltt-usertrace/ltt/ltt-usertrace-fast.h @@ -476,7 +476,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);