X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fkernel.c;h=93afc9d6fb25e795aab694bc77b9ace813c5aacb;hp=b5c4a5e1267b5ae5fbe95cd70723ed2afb5710ab;hb=5da88b0f58d7f838068037ea449ddfb25d3e85ad;hpb=a9dde553270b4e8f3f280706e3f19f8f3ac41e1b diff --git a/src/bin/lttng-sessiond/kernel.c b/src/bin/lttng-sessiond/kernel.c index b5c4a5e12..93afc9d6f 100644 --- a/src/bin/lttng-sessiond/kernel.c +++ b/src/bin/lttng-sessiond/kernel.c @@ -1289,6 +1289,7 @@ enum lttng_error_code kernel_snapshot_record( struct lttng_ht_iter iter; struct ltt_kernel_metadata *saved_metadata; char *trace_path = NULL; + size_t consumer_path_offset = 0; assert(ksess); assert(ksess->consumer); @@ -1315,7 +1316,7 @@ enum lttng_error_code kernel_snapshot_record( } trace_path = setup_channel_trace_path(ksess->consumer, - DEFAULT_KERNEL_TRACE_DIR); + DEFAULT_KERNEL_TRACE_DIR, &consumer_path_offset); if (!trace_path) { status = LTTNG_ERR_INVALID; goto error; @@ -1338,7 +1339,7 @@ enum lttng_error_code kernel_snapshot_record( cds_list_for_each_entry(chan, &ksess->channel_list.head, list) { status = consumer_snapshot_channel(socket, chan->key, output, 0, ksess->uid, ksess->gid, - trace_path, wait, + &trace_path[consumer_path_offset], wait, nb_packets_per_stream); if (status != LTTNG_OK) { (void) kernel_consumer_destroy_metadata(socket, @@ -1349,7 +1350,8 @@ enum lttng_error_code kernel_snapshot_record( /* Snapshot metadata, */ status = consumer_snapshot_channel(socket, ksess->metadata->key, output, - 1, ksess->uid, ksess->gid, trace_path, wait, 0); + 1, ksess->uid, ksess->gid, &trace_path[consumer_path_offset], + wait, 0); if (status != LTTNG_OK) { goto error_consumer; }