Fix: save UST context informations as a event_perf_context_type

This fixes UST perf counters not being recognized by the session
restore code at the linting stage.

Reported-by: Philipe Proulx <philippe.proulx@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Fix: Don't save an empty <contexts> node in kernel channels

An empty <contexts/> node is saved when kernel channels are
saved even when no kernel contexts are enabled.

Note that this is a minor fix as the generated XML remains valid
anyhow.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Fix: add log4j to lttng list help

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: add log4j domain to session.xsd

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: support log4j loglevel in mi

To achieve this, a couple of functions needed to send the domain of the
event so we can use the right loglevel according to the domain.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: update man page with log4j option

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: initialize context list node on creation

This is to avoid a segfault when destroying a kernel context that has
not been added to a channel.

Fixes #845

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: add missing headers to makefile for dist tarball

Signed-off-by: David Goulet <dgoulet@efficios.com>
Add log4j values to mi XML schema

Signed-off-by: David Goulet <dgoulet@efficios.com>
Update man page with LOG4J information

Signed-off-by: David Goulet <dgoulet@efficios.com>
Update version to v2.6.0-rc1

Signed-off-by: David Goulet <dgoulet@efficios.com>
Update master ChangeLog with 2.5.1 release

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: syscall list ioctl number conflict

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Use lttng-modules ABI version ioctl

Check compatibility between lttng-modules and tools using a version
numbering specifically for the ABI, rather than relying on the major
version of lttng-modules per se. This takes into account that we
sometimes depend on lock-step updates of the toolchain, including
tools and modules.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: return EINVAL if agent registration fails

The errno value might be 0 thus not returning an error if so. It has
been seen with an unstable python agent code base which means it could
happen in the future if a third part decides to create an agent.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Add Python agent support

Support the new Python agent shipped in liblttng-ust.

This adds the -p, --python option to the list and enable/disable-event
command to control the domain exactly like JUL and LOG4J.

The agent support is for the Python "logging" module.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: memory leak in libconfig

Fixes Coverity issue 1191755.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: typo in pythong test Makefile

Signed-off-by: David Goulet <dgoulet@efficios.com>
Test: remove bogus argument from prove invocation

An argument of "$2" was added to the prove command line in tests/run.sh
by 68270f0f604e "Mi test: Basic test structure". This is harmless since
run.sh is never called with more than one argument, but it is confusing,
and it breaks patches in OE that add support for running tests on the
target.

Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: UST consumer sync all available metadata

In live mode, the sync metadata function was only working on one single
metadata stream of a given session ID. However, we can have multiple
metadata stream for the same session ID thus failing to send the data in
live mode correctly for the other streams.

This fixes it by simply iterating over all metadata stream for a session
ID and syncing them all.

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