Fix: ust metadata: resample clock on regenerate metadata
[lttng-tools.git] / src / bin / lttng-sessiond / save.cpp
index 2055e867de5eac86496a7cd599c0aee488510026..5db70faef47e98f0c865e65e69916365beab3a89 100644 (file)
 #include <urcu/uatomic.h>
 #include <unistd.h>
 
-#include <common/defaults.h>
-#include <common/error.h>
-#include <common/config/session-config.h>
-#include <common/utils.h>
-#include <common/runas.h>
-#include <lttng/save-internal.h>
-
-#include "kernel.h"
-#include "save.h"
-#include "session.h"
-#include "lttng-syscall.h"
-#include "trace-ust.h"
-#include "agent.h"
+#include <common/defaults.hpp>
+#include <common/error.hpp>
+#include <common/config/session-config.hpp>
+#include <common/utils.hpp>
+#include <common/runas.hpp>
+#include <lttng/save-internal.hpp>
+
+#include "kernel.hpp"
+#include "save.hpp"
+#include "session.hpp"
+#include "lttng-syscall.hpp"
+#include "trace-ust.hpp"
+#include "agent.hpp"
 
 /* Return LTTNG_OK on success else a LTTNG_ERR* code. */
 static
@@ -199,7 +199,7 @@ int save_ust_channel_attributes(struct config_writer *writer,
         * Fetch the monitor timer which is located in the parent of
         * lttng_ust_channel_attr
         */
-       channel = caa_container_of(attr, struct ltt_ust_channel, attr);
+       channel = lttng::utils::container_of(attr, &ltt_ust_channel::attr);
        ret = config_writer_write_element_unsigned_int(writer,
                config_element_monitor_timer_interval,
                channel->monitor_timer_interval);
@@ -1155,7 +1155,7 @@ int save_ust_events(struct config_writer *writer,
 
        rcu_read_lock();
        cds_lfht_for_each_entry(events->ht, &iter.iter, node, node) {
-               event = caa_container_of(node, struct ltt_ust_event, node);
+               event = lttng::utils::container_of(node, &ltt_ust_event::node);
 
                if (event->internal) {
                        /* Internal events must not be exposed to clients */
@@ -1243,7 +1243,7 @@ int save_agent_events(struct config_writer *writer,
                struct ltt_ust_event fake_event;
 
                memset(&fake_event, 0, sizeof(fake_event));
-               agent_event = caa_container_of(node, struct agent_event, node);
+               agent_event = lttng::utils::container_of(node, &agent_event::node);
 
                /*
                 * Initialize a fake ust event to reuse the same serialization
@@ -2135,7 +2135,7 @@ int save_ust_domain(struct config_writer *writer,
        rcu_read_lock();
        cds_lfht_for_each_entry(session->ust_session->domain_global.channels->ht,
                        &iter.iter, node, node) {
-               ust_chan = caa_container_of(node, struct ltt_ust_channel, node);
+               ust_chan = lttng::utils::container_of(node, &ltt_ust_channel::node);
                if (domain == ust_chan->domain) {
                        ret = save_ust_channel(writer, ust_chan, session->ust_session);
                        if (ret != LTTNG_OK) {
@@ -2322,7 +2322,7 @@ int save_consumer_output(struct config_writer *writer,
        {
                char *uri;
 
-               uri = (char *) zmalloc(PATH_MAX);
+               uri = calloc<char>(PATH_MAX);
                if (!uri) {
                        ret = LTTNG_ERR_NOMEM;
                        goto end;
This page took 0.024632 seconds and 4 git commands to generate.