From: Jérémie Galarneau Date: Thu, 30 Jan 2020 06:51:10 +0000 (-0500) Subject: relayd: register fd tracker instance to all created trace chunks X-Git-Tag: v2.12.0-rc1~33 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=7145f5e9af16907c65a514fe9112e99564cf6333;p=lttng-tools.git relayd: register fd tracker instance to all created trace chunks Provide a reference to 'the_fd_tracker' to trace chunks during their creation. This causes file descriptors created through the relay daemon's trace chunks to be tracked by the daemon's fd tracker. Signed-off-by: Jérémie Galarneau Change-Id: I9c96851ef06bb7f0be0c7f3e8b7f01638f13fbda --- diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index 00292a02d..4a2258d34 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -2724,6 +2724,7 @@ static int relay_create_trace_chunk(const struct lttcomm_relayd_hdr *recv_hdr, reply_code = LTTNG_ERR_NOMEM; goto end; } + lttng_trace_chunk_set_fd_tracker(chunk, the_fd_tracker); if (msg->override_name_length) { const char *name; diff --git a/src/bin/lttng-relayd/session.c b/src/bin/lttng-relayd/session.c index d83838521..5d5aa4c64 100644 --- a/src/bin/lttng-relayd/session.c +++ b/src/bin/lttng-relayd/session.c @@ -241,6 +241,8 @@ static int session_set_anonymous_chunk(struct relay_session *session) ret = -1; goto end; } + + lttng_trace_chunk_set_fd_tracker(chunk, the_fd_tracker); output_directory = NULL; session->current_trace_chunk = chunk; chunk = NULL;