X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=libust%2Fbuffers.h;h=4fa6262af1715da97ebd69afecfa4084d61566dd;hb=97c102527d03ebc20f1b579ffa0bc2e88646b58e;hp=ca78796fbc9aa7e2aa28f2c4a0fcb9db73cbc7c7;hpb=12e81b07455a1aef2e2bcc73004f14a7b73596fa;p=ust.git diff --git a/libust/buffers.h b/libust/buffers.h index ca78796..4fa6262 100644 --- a/libust/buffers.h +++ b/libust/buffers.h @@ -24,7 +24,9 @@ #define _UST_BUFFERS_H #include -#include + +#include + #include "usterr.h" #include "channels.h" #include "tracerconst.h" @@ -367,7 +369,7 @@ static __inline__ int ltt_reserve_slot(struct ust_channel *chan, /* * Perform retryable operations. */ - /* FIXME: make this rellay per cpu? */ + /* FIXME: make this really per cpu? */ if (unlikely(LOAD_SHARED(ltt_nesting) > 4)) { DBG("Dropping event because nesting is too deep."); uatomic_inc(&buf->events_lost); @@ -481,16 +483,8 @@ static __inline__ void ltt_commit_slot( long endidx = SUBBUF_INDEX(offset_end - 1, chan); long commit_count; -#ifdef LTT_NO_IPI_BARRIER smp_wmb(); -#else - /* - * Must write slot data before incrementing commit count. - * This compiler barrier is upgraded into a smp_mb() by the IPI - * sent by get_subbuf(). - */ - barrier(); -#endif + uatomic_add(&buf->commit_count[endidx].cc, slot_size); /* * commit count read can race with concurrent OOO commit count updates.