From: Julien Desfossez Date: Fri, 21 Aug 2015 16:21:41 +0000 (-0400) Subject: Store the version of the tracer in the UID registry X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=7062f070b01e86c2e29490ea41e25f1f519ceadb Store the version of the tracer in the UID registry 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 --- 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 {