X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fkernel.c;h=daf14b3396f8e8792b50c52028310aff0cf164d4;hp=b79503b7d0185fd90b076c705f54ae6b90b8b3c2;hb=8ff4109e3e6089d04c018a10c96c8498f893fdfb;hpb=8de8806159d9d2544e2bc3091cc3c98abe4d97ad diff --git a/src/bin/lttng-sessiond/kernel.c b/src/bin/lttng-sessiond/kernel.c index b79503b7d..daf14b339 100644 --- a/src/bin/lttng-sessiond/kernel.c +++ b/src/bin/lttng-sessiond/kernel.c @@ -134,6 +134,20 @@ int kernel_create_session(struct ltt_session *session) DBG("Kernel session created (fd: %d)", lks->fd); + /* + * This is necessary since the creation time is present in the session + * name when it is generated. + */ + if (session->has_auto_generated_name) { + ret = kernctl_session_set_name(lks->fd, DEFAULT_SESSION_NAME); + } else { + ret = kernctl_session_set_name(lks->fd, session->name); + } + if (ret) { + WARN("Could not set kernel session name for session %" PRIu64 " name: %s", + session->id, session->name); + } + return 0; error: