From 7062f070b01e86c2e29490ea41e25f1f519ceadb Mon Sep 17 00:00:00 2001 From: Julien Desfossez Date: Fri, 21 Aug 2015 12:21:41 -0400 Subject: [PATCH] Store the version of the tracer in the UID registry MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When the per-uid registry is created, we copy the version of the tracer (extracted from the first app that creates the registry). Useful to regenerate the metadata later regardless of the state of this first app. Signed-off-by: Julien Desfossez Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/ust-registry.c | 2 ++ src/bin/lttng-sessiond/ust-registry.h | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/src/bin/lttng-sessiond/ust-registry.c b/src/bin/lttng-sessiond/ust-registry.c index 1990655ef..dea443d94 100644 --- a/src/bin/lttng-sessiond/ust-registry.c +++ b/src/bin/lttng-sessiond/ust-registry.c @@ -860,6 +860,8 @@ int ust_registry_session_init(struct ust_registry_session **sessionp, session->uid = euid; session->gid = egid; session->next_enum_id = 0; + session->major = major; + session->minor = minor; strncpy(session->root_shm_path, root_shm_path, sizeof(session->root_shm_path)); session->root_shm_path[sizeof(session->root_shm_path) - 1] = '\0'; diff --git a/src/bin/lttng-sessiond/ust-registry.h b/src/bin/lttng-sessiond/ust-registry.h index a8466ebf5..77b9a8666 100644 --- a/src/bin/lttng-sessiond/ust-registry.h +++ b/src/bin/lttng-sessiond/ust-registry.h @@ -96,6 +96,13 @@ struct ust_registry_session { /* Enumerations table. */ struct lttng_ht *enums; + + /* + * Copy of the tracer version when the first app is registered. + * It is used if we need to regenerate the metadata. + */ + uint32_t major; + uint32_t minor; }; struct ust_registry_channel { -- 2.34.1