#include <inttypes.h>
#include <signal.h>
-#include <lttng/ust-ctl.h>
#include <common/common.h>
#include <common/kernel-ctl/kernel-ctl.h>
#include <common/kernel-consumer/kernel-consumer.h>
#include "consumer-timer.h"
#include "ust-consumer/ust-consumer.h"
+#include "../bin/lttng-consumerd/health-consumerd.h"
static struct timer_signal_data timer_signal = {
.tid = 0,
goto error_unlock;
}
- ret = ustctl_get_current_timestamp(stream->ustream, &ts);
+ ret = lttng_ustconsumer_get_current_timestamp(stream, &ts);
if (ret < 0) {
ERR("Failed to get the current timestamp");
goto error_unlock;
}
- ustctl_flush_buffer(stream->ustream, 1);
- ret = ustctl_snapshot(stream->ustream);
+ lttng_ustconsumer_flush_buffer(stream, 1);
+ ret = lttng_ustconsumer_take_snapshot(stream);
if (ret < 0) {
if (ret != -EAGAIN) {
ERR("Taking UST snapshot");
siginfo_t info;
struct lttng_consumer_local_data *ctx = data;
+ health_register(health_consumerd, HEALTH_CONSUMERD_TYPE_METADATA_TIMER);
+
/* Only self thread will receive signal mask. */
setmask(&mask);
CMM_STORE_SHARED(timer_signal.tid, pthread_self());
}
}
+ /* Currently never reached */
+ health_unregister(health_consumerd);
+
+ /* Never return */
return NULL;
}