From: Francis Deslauriers Date: Fri, 18 Jun 2021 16:23:35 +0000 (-0400) Subject: trace-ust: Rename `{next, used}_channel_id` to `{next, used}_event_container_id` X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=dc88217e78259cb6b35fbaf6b85ad5aed6a37023;p=lttng-tools.git trace-ust: Rename `{next, used}_channel_id` to `{next, used}_event_container_id` Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau Change-Id: Idb07462c15cbebaf37a244ad76a32e893ecbab0c --- diff --git a/src/bin/lttng-sessiond/channel.cpp b/src/bin/lttng-sessiond/channel.cpp index 65bdd361d..4e5401295 100644 --- a/src/bin/lttng-sessiond/channel.cpp +++ b/src/bin/lttng-sessiond/channel.cpp @@ -427,11 +427,12 @@ enum lttng_error_code channel_ust_create(struct ltt_ust_session *usess, } uchan->enabled = true; - if (trace_ust_is_max_id(usess->used_channel_id)) { + if (trace_ust_is_max_id(usess->used_event_container_id)) { ret_code = LTTNG_ERR_UST_CHAN_FAIL; goto error; } - uchan->id = trace_ust_get_next_chan_id(usess); + + uchan->id = trace_ust_get_next_event_container_id(usess); DBG2("Channel %s is being created for UST with buffer %d and id %" PRIu64, uchan->name, diff --git a/src/bin/lttng-sessiond/trace-ust.hpp b/src/bin/lttng-sessiond/trace-ust.hpp index 74b1df60f..ea84722f1 100644 --- a/src/bin/lttng-sessiond/trace-ust.hpp +++ b/src/bin/lttng-sessiond/trace-ust.hpp @@ -112,9 +112,9 @@ struct ltt_ust_session { /* For per UID buffer, every buffer reg object is kept of this session */ struct cds_list_head buffer_reg_uid_list; /* Next channel ID available for a newly registered channel. */ - uint64_t next_channel_id; - /* Once this value reaches UINT32_MAX, no more id can be allocated. */ - uint64_t used_channel_id; + uint64_t next_event_container_id; + /* Once this value reaches UINT64_MAX, no more id can be allocated. */ + uint64_t used_event_container_id; /* Tell or not if the session has to output the traces. */ unsigned int output_traces; unsigned int snapshot_mode; @@ -160,17 +160,17 @@ static inline int trace_ust_is_max_id(uint64_t id) * the maximum number of IDs have been reached. If not, it is safe to call this * function. * - * Return a unique channel ID. If max is reached, the used_channel_id counter + * Return a unique channel ID. If max is reached, the used_event_container_id counter * is returned. */ -static inline uint64_t trace_ust_get_next_chan_id(struct ltt_ust_session *s) +static inline uint64_t trace_ust_get_next_event_container_id(struct ltt_ust_session *s) { - if (trace_ust_is_max_id(s->used_channel_id)) { - return s->used_channel_id; + if (trace_ust_is_max_id(s->used_event_container_id)) { + return s->used_event_container_id; } - s->used_channel_id++; - return s->next_channel_id++; + s->used_event_container_id++; + return s->next_event_container_id++; } #ifdef HAVE_LIBLTTNG_UST_CTL