Fix: kernel ctl error codes are based on errno

ioctl returns -1, and error codes are based on -errno.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Test: enable kernel events after start

This test detects if we actually append new metadata when enabling a
kernel event after a start.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: Dead code when checking return value from (ust_app|kernel)_snapshot_record

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
build: export major/minor/patchlevel numbers

Acked-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
sessiond: use version major/minor from build for communication with relayd

Acked-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
relayd: use version macros from build rather than scanf

Acked-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Bump version to 2.4.0-pre1

We need to bump the version early in the development cycle since we
extend the relayd protocol.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Live timer set up

Add a new option to create to enable the live_timer.
This timer is responsible to check all streams of a live session and
make sure the viewer receives periodic updates even for low-throughput
channels.

This patch only enables the parameter from the UI to the consumer.
A couple of FIXMEs to check (changes to the ABI/API especially).

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
basic handling of live_timer, for now just a printf

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Create relayd session from the sessiond

Move the relayd session creation from the consumer to the relayd. No
change in behaviour expected here, just prepare for the next patch to
allow the sessiond to pass additionnal parameters in the relayd session
creation required for live tracing (hostname, session name, flags, etc).

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Create relayd session with live parameters

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Relay listen on 2 additionnal ports

Copy the structure of the threads management of the main relayd for the
live viewer.
So we have 3 new threads live_listener, live_dispatcher, live_worker. It
maybe is a lot of duplicated code, but it is too early in the dev to
identify precisely the code that could be merged.
For now we don't do anything useful on these ports, but that's the next
step.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Cleanup line-wrap, add lttng-viewer.h

Viewer command VIEWER_VERSION working (tested with separate test program
using only lttng-viewer.h as "internal" header).

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Viewer list sessions

Add a session_list HT in the relayd and allow the viewer to list the
sessions.
Introduce a relay_local_data struct to have a simple way to share data
between threads.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Attach session + list streams

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>