Force 64-bit timestamps
[lttng-ust.git] / libringbuffer / frontend_api.h
index 24f94acf110b5f663443207d3711e3bbe323fa39..d5a2f2a043cb892a0ef020bfd7ef9b137978debb 100644 (file)
@@ -18,7 +18,6 @@
  */
 
 #include "frontend.h"
-#include "lttng/core.h"
 #include <urcu-bp.h>
 #include <urcu/compiler.h>
 
@@ -42,7 +41,7 @@ int lib_ring_buffer_get_cpu(const struct lttng_ust_lib_ring_buffer_config *confi
        int cpu, nesting;
 
        rcu_read_lock();
-       cpu = ust_get_cpu();
+       cpu = lttng_ust_get_cpu();
        nesting = ++lib_ring_buffer_nesting;    /* TLS */
        cmm_barrier();
 
@@ -94,8 +93,18 @@ int lib_ring_buffer_try_reserve(const struct lttng_ust_lib_ring_buffer_config *c
         */
        //prefetch(&buf->commit_hot[subbuf_index(*o_begin, chan)]);
 
+       /*
+        * Because we don't use any timer in the application, we
+        * currently cannot guarantee that we have frequent
+        * events that let us detect 27-bit overflows.
+        * Therefore, for now, we force event headers
+        * to contain 64-bit timestamps.
+        */
+       ctx->rflags |= RING_BUFFER_RFLAG_FULL_TSC;
+#if 0
        if (last_tsc_overflow(config, buf, ctx->tsc))
                ctx->rflags |= RING_BUFFER_RFLAG_FULL_TSC;
+#endif //0
 
        if (caa_unlikely(subbuf_offset(*o_begin, chan) == 0))
                return 1;
This page took 0.026812 seconds and 4 git commands to generate.