Fix ua_chan assert

delete_ust_app() can remove a channel objd from the hash table
concurrently with notify

Fix #560

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: hash table cleanup call_rcu deadlock

Implement hash table cleanup thread so HT cleanup never deadlocks on
resize in progress.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Implement health check for app notification thread

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Implement health check for app registration dispatch

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: sanitize wait queue in the dispatch thread

This is to avoid memory leaks when the notify socket is never received
thus cleaning the wait node for command socket that are invalid.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Add a lttng-ctl header to facilitate code separation

In order for lttng-ctl.c not to grow into an uncontrollable monster of
code, add this helper header and remove static declaration of some
functions to be exported out of the C file and set them hidden.

Future work on snapshot and trigger will use it in order to better split
the code into different files.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Move multiple URLs parsing fct from lttng-ctl to uri.c

Just move some functions around so we can use the multiple URLs parsing
to URIs function outside of liblttng-ctl.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Add consumer-stream.c/.h in libconsumer

This new file contains relevant calls to a lttng_consumer_stream object
and for now breaks down consumer_del_stream() in consumer.c that got out
of hand in terms of size and can not be used if the stream was not
previously successfully added to a thread which makes difficult the
deletion of a stream in some error path or in no monitor mode (future
mode for streams with snapshots).

It helps also modularize the consumer object a bit better and makes this
code a bit easier to maintain and to evolve better.

At this commit, no components use this yet. Future work will
incrementaly move every consumer stream specific actions to that file
and of course use those calls.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Use the consumer stream API in consumer_del_stream()

Signed-off-by: David Goulet <dgoulet@efficios.com>
[HEAD MERGE] Snapshot API

Every call has been coded in liblttng-ctl. Nothing on the session daemon
side yet apart from adding the case to the process client command
subsystem.

!!Need comments!! before mergin that commit.

Signed-off-by: David Goulet <dgoulet@efficios.com>
[HEAD MERGE] Add snapshot command to lttng UI

Signed-off-by: David Goulet <dgoulet@efficios.com>
[HEAD MERGE] Snapshot commands in sessiond

Signed-off-by: David Goulet <dgoulet@efficios.com>
[MERGE] lttng snapshot command fails if session is not in no output mode

Signed-off-by: David Goulet <dgoulet@efficios.com>
[HEAD MERGE] Flight recorder feature

Signed-off-by: David Goulet <dgoulet@efficios.com>
[HEAD MERGE] Kernel snapshot support

**ADD CHANGELOG**

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
[MERGE] add kernel consumer destroy channel. NOT COMPLETED

Signed-off-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
[MERGE] free stream in the no monitor list on del channel

Signed-off-by: David Goulet <dgoulet@efficios.com>
[MERGE] Some fixes. Veille technologique (RLNX inside)

Signed-off-by: David Goulet <dgoulet@efficios.com>
[MERGE] destroy kernel channel fix

Signed-off-by: David Goulet <dgoulet@efficios.com>
[MERGE] sessiond destroy metadata

Signed-off-by: David Goulet <dgoulet@efficios.com>