Propagate trace format to ust_app_session object
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 18 Aug 2022 20:38:50 +0000 (16:38 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Fri, 19 Aug 2022 15:53:50 +0000 (11:53 -0400)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Change-Id: I8aaaf60f2f0d4ad42f6390ca1e2a689320531ba0

src/bin/lttng-sessiond/ust-app.cpp
src/bin/lttng-sessiond/ust-app.hpp
src/bin/lttng-sessiond/ust-consumer.cpp

index e6f251f40cde2bc0b63e683d8085e82635b2485d..19884307a89141315f691c7130ad995b56cacca4 100644 (file)
@@ -2408,6 +2408,8 @@ static void shadow_copy_session(struct ust_app_session *ua_sess,
        LTTNG_OPTIONAL_SET(&ua_sess->effective_credentials.gid, usess->gid);
        ua_sess->buffer_type = usess->buffer_type;
        ua_sess->bits_per_long = app->abi.bits_per_long;
+       ua_sess->trace_format = std::const_pointer_cast<const lttng::trace_format_descriptor>(
+                       usess->trace_format);
 
        /* There is only one consumer object per session possible. */
        consumer_output_get(usess->consumer);
index 5007d807b63c52f25b59c5cceb6c2eb660263189..25b2b1e3bc790ca99bfe832396fcfd67c5aee928 100644 (file)
 
 #include <stdint.h>
 
-#include <common/index-allocator.hpp>
 #include <common/format.hpp>
+#include <common/index-allocator.hpp>
 #include <common/uuid.hpp>
+#include <lttng/trace-format-descriptor-internal.hpp>
 
 #include "trace-ust.hpp"
 #include "ust-registry.hpp"
@@ -241,6 +242,8 @@ struct ust_app_session {
 
        char root_shm_path[PATH_MAX]{};
        char shm_path[PATH_MAX]{};
+
+       lttng::trace_format_descriptor::csptr trace_format;
 };
 
 /*
index df4689920eb0b90ffff3eb45c368b42be8727c28..2724121d7915ac85fc795d337d8395d495a451a1 100644 (file)
@@ -134,33 +134,18 @@ static int ask_channel_creation(struct ust_app_session *ua_sess,
                break;
        }
 
-       consumer_init_ask_channel_comm_msg(&msg,
-                       ua_chan->attr.subbuf_size,
-                       ua_chan->attr.num_subbuf,
-                       ua_chan->attr.overwrite,
-                       ua_chan->attr.switch_timer_interval,
-                       ua_chan->attr.read_timer_interval,
-                       ua_sess->live_timer_interval,
-                       ua_sess->live_timer_interval != 0,
-                       ua_chan->monitor_timer_interval,
-                       output,
-                       (int) ua_chan->attr.type,
-                       ua_sess->tracing_id,
-                       &pathname[consumer_path_offset],
-                       ua_chan->name,
-                       consumer->net_seq_index,
-                       ua_chan->key,
-                       registry->uuid,
-                       chan_id,
-                       ua_chan->tracefile_size,
-                       ua_chan->tracefile_count,
-                       ua_sess->id,
+       consumer_init_ask_channel_comm_msg(&msg, ua_chan->attr.subbuf_size,
+                       ua_chan->attr.num_subbuf, ua_chan->attr.overwrite,
+                       ua_chan->attr.switch_timer_interval, ua_chan->attr.read_timer_interval,
+                       ua_sess->live_timer_interval, ua_sess->live_timer_interval != 0,
+                       ua_chan->monitor_timer_interval, output, (int) ua_chan->attr.type,
+                       ua_sess->tracing_id, &pathname[consumer_path_offset], ua_chan->name,
+                       consumer->net_seq_index, ua_chan->key, registry->uuid, chan_id,
+                       ua_chan->tracefile_size, ua_chan->tracefile_count, ua_sess->id,
                        ua_sess->output_traces,
                        lttng_credentials_get_uid(&ua_sess->real_credentials),
-                       ua_chan->attr.blocking_timeout,
-                       root_shm_path, shm_path,
-                       trace_chunk,
-                       &ua_sess->effective_credentials);
+                       ua_chan->attr.blocking_timeout, root_shm_path, shm_path, trace_chunk,
+                       &ua_sess->effective_credentials, *ua_sess->trace_format);
 
        health_code_update();
 
This page took 0.031628 seconds and 5 git commands to generate.