X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt-usertrace%2Fltt%2Fltt-usertrace-fast.h;h=d3fac6dad587a34ca736afeda5a3db78b78a2113;hb=61a02d969e63ae3e5080bca625286737e2c10880;hp=4d7c56ba808872a18596e38e19c44a7636d14f31;hpb=38f24d5cd982084f488f6e09d7d007e98fe1e20c;p=lttv.git diff --git a/ltt-usertrace/ltt/ltt-usertrace-fast.h b/ltt-usertrace/ltt/ltt-usertrace-fast.h index 4d7c56ba..d3fac6da 100644 --- a/ltt-usertrace/ltt/ltt-usertrace-fast.h +++ b/ltt-usertrace/ltt/ltt-usertrace-fast.h @@ -12,7 +12,6 @@ #ifdef LTT_TRACE_FAST #include -#include #include #include #include @@ -21,7 +20,6 @@ #include #include -#include #ifndef LTT_N_SUBBUFS #define LTT_N_SUBBUFS 2 @@ -58,8 +56,6 @@ #define atomic_cmpxchg(v, old, new) ((int)cmpxchg(&((v)->counter), old, new)) #endif //atomic_cmpxchg -typedef unsigned int ltt_facility_t; - struct ltt_trace_header { uint32_t magic_number; uint32_t arch_type; @@ -479,7 +475,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);