#include <inttypes.h>
#include <common/common.h>
+#include <common/trace-chunk.h>
#include <common/kernel-ctl/kernel-ctl.h>
#include <common/kernel-ctl/kernel-ioctl.h>
#include <common/sessiond-comm/sessiond-comm.h>
*/
void kernel_destroy_session(struct ltt_kernel_session *ksess)
{
+ struct lttng_trace_chunk *trace_chunk;
+
if (ksess == NULL) {
DBG3("No kernel session when tearing down session");
return;
}
DBG("Tearing down kernel session");
+ trace_chunk = ksess->current_trace_chunk;
/*
* Destroy channels on the consumer if at least one FD has been sent and we
consumer_output_send_destroy_relayd(ksess->consumer);
trace_kernel_destroy_session(ksess);
+ lttng_trace_chunk_put(trace_chunk);
}
/*
*
* Return LTTNG_OK on success or else return a LTTNG_ERR code.
*/
-enum lttng_error_code kernel_snapshot_record(struct ltt_kernel_session *ksess,
- struct snapshot_output *output, int wait,
+enum lttng_error_code kernel_snapshot_record(
+ struct ltt_kernel_session *ksess,
+ const struct snapshot_output *output, int wait,
uint64_t nb_packets_per_stream)
{
int err, ret, saved_metadata_fd;