/*
* Create a kernel event, enable it to the kernel tracer and add it to the
* channel event list of the kernel session.
+ * We own filter_expression and filter.
*/
int kernel_create_event(struct lttng_event *ev,
struct ltt_kernel_channel *channel)
struct lttng_ht_iter iter;
/* For each consumer socket. */
+ rcu_read_lock();
cds_lfht_for_each_entry(ksess->consumer->socks->ht, &iter.iter,
socket, node.node) {
struct ltt_kernel_channel *chan;
}
}
}
+ rcu_read_unlock();
}
/* Close any relayd session */
* Return 0 on success or else return a LTTNG_ERR code.
*/
int kernel_snapshot_record(struct ltt_kernel_session *ksess,
- struct snapshot_output *output, int wait, uint64_t max_size_per_stream)
+ struct snapshot_output *output, int wait,
+ uint64_t nb_packets_per_stream)
{
int err, ret, saved_metadata_fd;
struct consumer_socket *socket;
ret = consumer_snapshot_channel(socket, chan->fd, output, 0,
ksess->uid, ksess->gid,
DEFAULT_KERNEL_TRACE_DIR, wait,
- max_size_per_stream);
+ nb_packets_per_stream);
pthread_mutex_unlock(socket->lock);
if (ret < 0) {
ret = LTTNG_ERR_KERN_CONSUMER_FAIL;
pthread_mutex_lock(socket->lock);
ret = consumer_snapshot_channel(socket, ksess->metadata->fd, output,
1, ksess->uid, ksess->gid,
- DEFAULT_KERNEL_TRACE_DIR, wait, max_size_per_stream);
+ DEFAULT_KERNEL_TRACE_DIR, wait, 0);
pthread_mutex_unlock(socket->lock);
if (ret < 0) {
ret = LTTNG_ERR_KERN_CONSUMER_FAIL;