From: Jonathan Rajotte Date: Tue, 26 Jul 2022 15:56:24 +0000 (-0400) Subject: CTF2: add to relayd supported trace format X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=40a3f14a2c83923d06ae3a59bf8c00438290a877;p=lttng-tools.git CTF2: add to relayd supported trace format Signed-off-by: Jonathan Rajotte Change-Id: I4bf0ecbc97c64b6d9dbe78c66d2271d67d1902d0 --- diff --git a/src/bin/lttng-relayd/main.cpp b/src/bin/lttng-relayd/main.cpp index d7b65cbac..5c4792bfa 100644 --- a/src/bin/lttng-relayd/main.cpp +++ b/src/bin/lttng-relayd/main.cpp @@ -3346,6 +3346,11 @@ static int relay_get_configuration( supported_trace_format |= LTTCOMM_RELAYD_CONFIGURATION_TRACE_FORMAT_SUPPORTED_CTF1; + if (opt_allow_ctf2) { + supported_trace_format |= + LTTCOMM_RELAYD_CONFIGURATION_TRACE_FORMAT_SUPPORTED_CTF2; + } + supported_trace_format = htobe64(supported_trace_format); lttcomm_relayd_get_configuration_specialized_query_reply s_reply = {}; diff --git a/src/bin/lttng-sessiond/cmd.cpp b/src/bin/lttng-sessiond/cmd.cpp index f975f31e2..b519f9e70 100644 --- a/src/bin/lttng-sessiond/cmd.cpp +++ b/src/bin/lttng-sessiond/cmd.cpp @@ -898,6 +898,8 @@ static bool is_trace_format_configuration_supported( mapping = { {LTTNG_TRACE_FORMAT_DESCRIPTOR_TYPE_CTF_1, LTTCOMM_RELAYD_CONFIGURATION_TRACE_FORMAT_SUPPORTED_CTF1}, + {LTTNG_TRACE_FORMAT_DESCRIPTOR_TYPE_CTF_2, + LTTCOMM_RELAYD_CONFIGURATION_TRACE_FORMAT_SUPPORTED_CTF2}, }; auto it = mapping.find(trace_format.type()); diff --git a/src/common/sessiond-comm/relayd.hpp b/src/common/sessiond-comm/relayd.hpp index 5f7bd3dc4..49d3ed1f7 100644 --- a/src/common/sessiond-comm/relayd.hpp +++ b/src/common/sessiond-comm/relayd.hpp @@ -348,6 +348,7 @@ enum lttcomm_relayd_configuration_query_flag { enum lttcomm_relayd_configuration_trace_format_flag { LTTCOMM_RELAYD_CONFIGURATION_TRACE_FORMAT_SUPPORTED_CTF1 = (1 << 0), + LTTCOMM_RELAYD_CONFIGURATION_TRACE_FORMAT_SUPPORTED_CTF2 = (1 << 1) }; struct lttcomm_relayd_get_configuration {