Fix: set hidden attribute to utils_* calls

Signed-off-by: David Goulet <dgoulet@efficios.com>
Add utils function to format current time as a string

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

Signed-off-by: David Goulet <dgoulet@efficios.com>
Update URCU detection to correctly check for a 0.7 version

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Fix: consumer double-close on error

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: send per-pid session id in channel creation

The registry indexing for per-pid sessions is done with a per-pid
session id. So for per-pid buffers, we need to send the per-pid session
id as well as the global session id to the consumer in order to give it
enough information if it needs to request metadata later.

This patch adds the session_id_per_pid to the channel creation message
and to the consumer. When the sessiond receives a metadata_request,
depending on the buffer type (per-pid or per-uid), it selects the right
id to do the registry lookup.

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

Conflicts:
	src/bin/lttng-sessiond/consumer.c
	src/bin/lttng-sessiond/consumer.h
	src/bin/lttng-sessiond/ust-consumer.c
	src/common/consumer.c
	src/common/consumer.h
	src/common/kernel-consumer/kernel-consumer.c
	src/common/sessiond-comm/sessiond-comm.h
	src/common/ust-consumer/ust-consumer.c
Fix UST channel/stream output assignation

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: consumer: 64-bit index for relayd rather than 32-bit (v2)

Relayd "unique" ids wrap every 32-bit, and in some cases, negative
values are considered as error.

Change this to make the error value specifically -1ULL, use a direct
comparison (since we use an unsigned 64-bit integer, comparison with 0
becomes incorrect).

Since we now use a 64-bit ID, it is assumed to _never_ wrap-around
(remember, value -1ULL is an _error_). Therefore,
consumer_add_relayd_socket() can become much more strict than it was:
instead of accepting re-use of net_seq_idx, we can now assert that upon
LTTNG_STREAM_CONTROL socket, we have indeed allocated a relayd object,
and upon LTTNG_STREAM_DATA, we have found a relayd object.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: periodical flush check trace before stop

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: use snapshot consumer output for kernel

Signed-off-by: David Goulet <dgoulet@efficios.com>
Tests: Add kernel snapshot streaming

Signed-off-by: David Goulet <dgoulet@efficios.com>
Tests: remove debug output from test

Signed-off-by: David Goulet <dgoulet@efficios.com>
Tests: add kernel snapshot streaming to root regression

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: sessiond: use uint64_t for all session ids

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: detect the correct version of LTTng-UST

Fixes #580

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