X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fkernel.c;h=d52d9aa62f4e997b327fe2d1ec336ed5414392f8;hb=2f77fc4b3720dc8f75847130498c2d4aad7c03ec;hp=f734760778db81f24d704f59d416ca7ce68af845;hpb=68264071f9d1b789de1350cbec479b52a9b54acf;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/kernel.c b/src/bin/lttng-sessiond/kernel.c index f73476077..d52d9aa62 100644 --- a/src/bin/lttng-sessiond/kernel.c +++ b/src/bin/lttng-sessiond/kernel.c @@ -28,6 +28,7 @@ #include #include +#include "consumer.h" #include "kernel.h" #include "kern-modules.h" @@ -718,3 +719,21 @@ int init_kernel_workarounds(void) end_boot_id: return 0; } + +/* + * Complete teardown of a kernel session. + */ +void kernel_destroy_session(struct ltt_kernel_session *ksess) +{ + if (ksess == NULL) { + DBG3("No kernel session when tearing down session"); + return; + } + + DBG("Tearing down kernel session"); + + /* Close any relayd session */ + consumer_output_send_destroy_relayd(ksess->consumer); + + trace_kernel_destroy_session(ksess); +}