Launch the notification thread using lttng_thread
[lttng-tools.git] / src / bin / lttng-sessiond / ust-metadata.c
index d24df194342f144ebd2bbee832c6b7b5de69595b..3256c2cb74a26569dada62cdd6fc2d705f2e5766 100644 (file)
@@ -28,6 +28,7 @@
 #include <unistd.h>
 #include <inttypes.h>
 #include <common/common.h>
+#include <common/time.h>
 
 #include "ust-registry.h"
 #include "ust-clock.h"
@@ -37,7 +38,6 @@
 #define max_t(type, a, b)      ((type) ((a) > (b) ? (a) : (b)))
 #endif
 
-#define NSEC_PER_SEC                   1000000000ULL
 #define NR_CLOCK_OFFSET_SAMPLES                10
 
 struct offset_sample {
@@ -74,7 +74,6 @@ int fls(unsigned int x)
                r -= 2;
        }
        if (!(x & 0x80000000U)) {
-               x <<= 1;
                r -= 1;
        }
        return r;
@@ -404,6 +403,9 @@ int _lttng_variant_statedump(struct ust_registry_session *session,
        }
        sanitize_ctf_identifier(identifier, variant->name);
        ret = print_tabs(session, nesting);
+       if (ret) {
+               goto end;
+       }
        ret = lttng_metadata_printf(session,
                        "} _%s;\n",
                        identifier);
@@ -819,7 +821,7 @@ int measure_single_clock_offset(struct offset_sample *sample)
        int ret;
 
        monotonic[0] = trace_clock_read64();
-       ret = clock_gettime(CLOCK_REALTIME, &rts);
+       ret = lttng_clock_gettime(CLOCK_REALTIME, &rts);
        if (ret < 0) {
                return ret;
        }
This page took 0.024767 seconds and 5 git commands to generate.