lttng-tools.git
9 years agoFix: Handle empty daemon configuration file lines
Jérémie Galarneau [Sun, 23 Nov 2014 16:30:33 +0000 (11:30 -0500)] 
Fix: Handle empty daemon configuration file lines

Empty daemon configuration file lines such as
my_option=

will cause set_option to be called with an arg value of length 0
which should display a warning.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoDocs: Add -f/--config option to lttng-sessiond man page
Jérémie Galarneau [Sun, 23 Nov 2014 15:37:06 +0000 (10:37 -0500)] 
Docs: Add -f/--config option to lttng-sessiond man page

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoCleanup: spaghetti function return path
Mathieu Desnoyers [Fri, 21 Nov 2014 17:36:36 +0000 (18:36 +0100)] 
Cleanup: spaghetti function return path

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: relayd: unbalanced RCU read-side lock/unlock
Mathieu Desnoyers [Fri, 21 Nov 2014 17:38:37 +0000 (18:38 +0100)] 
Fix: relayd: unbalanced RCU read-side lock/unlock

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: relayd: unbalanced RCU read lock/unlock
Mathieu Desnoyers [Fri, 21 Nov 2014 17:42:05 +0000 (18:42 +0100)] 
Fix: relayd: unbalanced RCU read lock/unlock

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: lttng-relayd: unhandled out of memory error
Mathieu Desnoyers [Fri, 21 Nov 2014 17:47:52 +0000 (18:47 +0100)] 
Fix: lttng-relayd: unhandled out of memory error

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: relayd viewer stream: unhandled out of memory error
Mathieu Desnoyers [Fri, 21 Nov 2014 17:49:08 +0000 (18:49 +0100)] 
Fix: relayd viewer stream: unhandled out of memory error

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoBuild fix: Apps defining _LGPL_SOURCE must link to urcu-bp
Jérémie Galarneau [Wed, 19 Nov 2014 22:01:01 +0000 (17:01 -0500)] 
Build fix: Apps defining _LGPL_SOURCE must link to urcu-bp

Defining _LGPL_SOURCE causes lttng-ust tracepoint headers to
inline uses of userspace-rcu, which make linking against urcu
necessary.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoDefine _LGPL_SOURCE in test apps' tracepoint provider files
Jérémie Galarneau [Wed, 19 Nov 2014 19:14:12 +0000 (14:14 -0500)] 
Define _LGPL_SOURCE in test apps' tracepoint provider files

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoDefine _LGPL_SOURCE in test applications
Jérémie Galarneau [Wed, 19 Nov 2014 16:06:43 +0000 (11:06 -0500)] 
Define _LGPL_SOURCE in test applications

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Missing rcu_read_lock in cmd_list_events()
Jérémie Galarneau [Tue, 18 Nov 2014 19:30:56 +0000 (14:30 -0500)] 
Fix: Missing rcu_read_lock in cmd_list_events()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Missing rcu_read_lock in list_lttng_agent_events()
Jérémie Galarneau [Tue, 18 Nov 2014 19:30:17 +0000 (14:30 -0500)] 
Fix: Missing rcu_read_lock in list_lttng_agent_events()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Missing rcu_read_lock in cmd_list_channels()
Jérémie Galarneau [Tue, 18 Nov 2014 19:19:43 +0000 (14:19 -0500)] 
Fix: Missing rcu_read_lock in cmd_list_channels()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Missing rcu_read_locks in cmd_list_domains()
Jérémie Galarneau [Tue, 18 Nov 2014 19:15:07 +0000 (14:15 -0500)] 
Fix: Missing rcu_read_locks in cmd_list_domains()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Missing rcu_read_lock in cmd_snapshot_list_outputs()
Jérémie Galarneau [Tue, 18 Nov 2014 19:10:14 +0000 (14:10 -0500)] 
Fix: Missing rcu_read_lock in cmd_snapshot_list_outputs()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Missing rcu_read_lock in save_domains()
Jérémie Galarneau [Tue, 18 Nov 2014 19:09:36 +0000 (14:09 -0500)] 
Fix: Missing rcu_read_lock in save_domains()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Missing rcu_read_lock in ust_app_get_nb_stream()
Jérémie Galarneau [Tue, 18 Nov 2014 18:37:29 +0000 (13:37 -0500)] 
Fix: Missing rcu_read_lock in ust_app_get_nb_stream()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: UST subbuffers silently dropped on moderate trace traffic
Mathieu Desnoyers [Tue, 18 Nov 2014 16:33:23 +0000 (17:33 +0100)] 
Fix: UST subbuffers silently dropped on moderate trace traffic

Well, it looks like we really screwed up on this one.

lttng-tools commit 02b3d1769d5f8a33e4109b1e681141c9295dfda6 introduced
an important regression for lttng-ust tracing in the consumer daemon:
after reading a sub-buffer, a check has been added to see whether there
are more sub-buffers available to read, and if it is the case, it
ensures the wakeup pipe will be awakened again.

The issue lies in the use of ustctl_put_next_subbuf() in this check.
This acts as if the sub-buffer has been read, when in reality it has not
been read. It therefore trashes the data contained by this sub-buffer.

This check should use ustctl_put_subbuf(), which does not move the
consumer position.

This is a severe bug, and the fix needs to be applied to stable-2.6,
stable-2.5, and stable-2.4.

Fixes #861

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Missing rcu_read_lock in get_session_max_subbuf_size()
Jérémie Galarneau [Tue, 18 Nov 2014 14:35:48 +0000 (09:35 -0500)] 
Fix: Missing rcu_read_lock in get_session_max_subbuf_size()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: create/destroy a splice_pipe per stream
Julien Desfossez [Wed, 12 Nov 2014 23:36:17 +0000 (18:36 -0500)] 
Fix: create/destroy a splice_pipe per stream

We had a per-thread splice_pipe (one for data and one for metadata), but
in case of error, we would end up filling the write side of the pipe and
never emptying it. This could lead to leaking data from one session to
the other, but also to stall the consumer trying to splice into a full
pipe.

Now we create a splice_pipe per-stream, so it is destroyed when the
session is destroyed.

Fixes: #726
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoNote find_ust_app_context must be called with RCU read lock
Jérémie Galarneau [Wed, 12 Nov 2014 20:19:49 +0000 (15:19 -0500)] 
Note find_ust_app_context must be called with RCU read lock

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: empty indexes_ht before destroying it.
Julien Desfossez [Tue, 11 Nov 2014 20:57:48 +0000 (15:57 -0500)] 
Fix: empty indexes_ht before destroying it.

Fixes: #722
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: removed useless key from relay_index
Julien Desfossez [Tue, 11 Nov 2014 20:57:47 +0000 (15:57 -0500)] 
Fix: removed useless key from relay_index

This field was never used except in debug messages (instead of using the
good value that is part of index_n).

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Ambiguous agent event filter bytecode ownership
Jérémie Galarneau [Sat, 15 Nov 2014 05:20:15 +0000 (00:20 -0500)] 
Fix: Ambiguous agent event filter bytecode ownership

A shared ownership of the filter bytecode between UST events
and Agent event led to a leak in cmd_enable_event() which was
fixed previously. However, that fix introduced a bug which
passed NULL to the agent event creation function.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: filter bytecode and string memory leak on error
Mathieu Desnoyers [Thu, 13 Nov 2014 22:18:16 +0000 (17:18 -0500)] 
Fix: filter bytecode and string memory leak on error

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: define _LGPL_SOURCE in C files
Mathieu Desnoyers [Thu, 13 Nov 2014 21:22:33 +0000 (16:22 -0500)] 
Fix: define _LGPL_SOURCE in C files

Defining this in headers is a bad practice, since the header is not
necessarily the first in the include list.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: HT must not be destroyed with a rcu_read_lock held
Jérémie Galarneau [Sat, 15 Nov 2014 04:38:36 +0000 (23:38 -0500)] 
Fix: HT must not be destroyed with a rcu_read_lock held

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: agent events HT should be destroyed from the cleanup thread
Jérémie Galarneau [Sat, 15 Nov 2014 04:35:45 +0000 (23:35 -0500)] 
Fix: agent events HT should be destroyed from the cleanup thread

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: missing rcu_read_lock in trace_ust_destroy_session()
Jérémie Galarneau [Thu, 13 Nov 2014 21:27:40 +0000 (16:27 -0500)] 
Fix: missing rcu_read_lock in trace_ust_destroy_session()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: missing rcu_read_lock when calling trace_ust_find_agent()
Jérémie Galarneau [Thu, 13 Nov 2014 21:23:04 +0000 (16:23 -0500)] 
Fix: missing rcu_read_lock when calling trace_ust_find_agent()

Added a comment to note that this function is assumed to be
called with the rcu_read_lock held.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: missing rcu_read_lock in cmd_start_trace()
Jérémie Galarneau [Thu, 13 Nov 2014 21:09:57 +0000 (16:09 -0500)] 
Fix: missing rcu_read_lock in cmd_start_trace()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoCleanup: remove "disabled" flag for new release cycle
Mathieu Desnoyers [Wed, 12 Nov 2014 23:18:33 +0000 (18:18 -0500)] 
Cleanup: remove "disabled" flag for new release cycle

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: filter attach vs event enable race
Mathieu Desnoyers [Wed, 12 Nov 2014 23:18:32 +0000 (18:18 -0500)] 
Fix: filter attach vs event enable race

In order to correctly handle the use-case where events are enabled
_after_ trace is started, and _after_ applications are already being
traced, the event should be created in a "disabled" state, so that it
does not trace events until its filter is attached.

This fix needs to be done both in lttng-tools and lttng-ust. In order to
keep ABI compatibility between tools and ust within a stable release
cycle, we introduce a new "disabled" within struct lttng_ust_event
padding (previously zeroed). Newer LTTng-UST checks this flag, and
fallback on the old racy behavior (enabling the event on creation) if it
is unset.

Therefore, old session daemon works with newer lttng-ust of the same
stable release, and vice-versa. However, building lttng-tools requires
an upgraded lttng-ust, which contains the communication protocol with
the new "disabled" field.

This patch should be backported to stable-2.4, stable-2.5, stable-2.6
branches.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Mark libxml2 as a mandatory dependency
Jérémie Galarneau [Tue, 11 Nov 2014 19:36:15 +0000 (14:36 -0500)] 
Fix: Mark libxml2 as a mandatory dependency

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Warn the user when enabling an event in a new domain
Christian Babeux [Fri, 7 Nov 2014 23:18:43 +0000 (18:18 -0500)] 
Fix: Warn the user when enabling an event in a new domain

This patch warn the user when trying to enable an event in a new domain
that was not configured prior to the tracing start.

Fixes #826

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Don't report an error when listing a session with no channels
Jérémie Galarneau [Fri, 7 Nov 2014 22:58:15 +0000 (17:58 -0500)] 
Fix: Don't report an error when listing a session with no channels

The LTTng sessiond daemon reports an error when the list_channel
command is invoked on a session which only has a metadata channel.

The error lies in assuming that a session which has an enabled
domains also has (user-visible) channels.

The metadata channel should be listed in a future fix.

Fixes #855

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoBypass 0 byte allocation when no domains are enabled
Jérémie Galarneau [Fri, 7 Nov 2014 21:10:46 +0000 (16:10 -0500)] 
Bypass 0 byte allocation when no domains are enabled

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Add missing URCU_TLS access to error_log_time
Christian Babeux [Fri, 7 Nov 2014 17:17:02 +0000 (12:17 -0500)] 
Fix: Add missing URCU_TLS access to error_log_time

Fixes #849

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: check userspace perf counter name when looking up contexts
Jérémie Galarneau [Thu, 6 Nov 2014 22:34:08 +0000 (17:34 -0500)] 
Fix: check userspace perf counter name when looking up contexts

create_ust_app_channel_context() looks for a context's existance
in a channel before adding it. However, it only checks for
context types. This is valid for all context types except for
LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER since multiple perf
thread counters may be enabled at the same time.

This fix ensures that the perf counter name is taken into
consideration when checking for a context's presence in a
channel.

Reported-by: Alexander Grigoriev <alexgri@tbricks.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoUpdate maintainer section of the man pages
Jérémie Galarneau [Wed, 5 Nov 2014 22:34:14 +0000 (17:34 -0500)] 
Update maintainer section of the man pages

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoUpdate maintainer section of README.md
Jérémie Galarneau [Wed, 5 Nov 2014 20:51:29 +0000 (15:51 -0500)] 
Update maintainer section of README.md

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: add README.md to documentation files
Jérémie Galarneau [Tue, 4 Nov 2014 22:59:29 +0000 (17:59 -0500)] 
Fix: add README.md to documentation files

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: UST consumer sync all available metadata
David Goulet [Fri, 31 Oct 2014 17:23:29 +0000 (13:23 -0400)] 
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>
9 years agoTest: remove bogus argument from prove invocation
Nathan Lynch [Tue, 28 Oct 2014 02:00:06 +0000 (21:00 -0500)] 
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>
9 years agoFix: typo in pythong test Makefile
David Goulet [Sat, 25 Oct 2014 20:47:31 +0000 (16:47 -0400)] 
Fix: typo in pythong test Makefile

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: memory leak in libconfig
David Goulet [Thu, 23 Oct 2014 14:16:06 +0000 (10:16 -0400)] 
Fix: memory leak in libconfig

Fixes Coverity issue 1191755.

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoAdd Python agent support
David Goulet [Tue, 14 Oct 2014 15:15:22 +0000 (11:15 -0400)] 
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>
9 years agoFix: return EINVAL if agent registration fails
David Goulet [Tue, 7 Oct 2014 19:05:48 +0000 (15:05 -0400)] 
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>
9 years agoUse lttng-modules ABI version ioctl
Mathieu Desnoyers [Mon, 20 Oct 2014 22:50:33 +0000 (18:50 -0400)] 
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>
9 years agoFix: syscall list ioctl number conflict
Mathieu Desnoyers [Mon, 20 Oct 2014 22:50:32 +0000 (18:50 -0400)] 
Fix: syscall list ioctl number conflict

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoUpdate master ChangeLog with 2.5.1 release
David Goulet [Mon, 20 Oct 2014 20:10:19 +0000 (16:10 -0400)] 
Update master ChangeLog with 2.5.1 release

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoUpdate version to v2.6.0-rc1 v2.6.0-rc1
David Goulet [Mon, 20 Oct 2014 17:17:42 +0000 (13:17 -0400)] 
Update version to v2.6.0-rc1

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoUpdate man page with LOG4J information
David Goulet [Mon, 20 Oct 2014 15:21:44 +0000 (11:21 -0400)] 
Update man page with LOG4J information

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoAdd log4j values to mi XML schema
David Goulet [Mon, 20 Oct 2014 14:48:13 +0000 (10:48 -0400)] 
Add log4j values to mi XML schema

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: add missing headers to makefile for dist tarball
David Goulet [Thu, 16 Oct 2014 16:18:00 +0000 (12:18 -0400)] 
Fix: add missing headers to makefile for dist tarball

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: initialize context list node on creation
David Goulet [Thu, 16 Oct 2014 15:16:07 +0000 (11:16 -0400)] 
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>
9 years agoFix: update man page with log4j option
David Goulet [Wed, 15 Oct 2014 18:29:01 +0000 (14:29 -0400)] 
Fix: update man page with log4j option

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: support log4j loglevel in mi
David Goulet [Tue, 14 Oct 2014 18:43:29 +0000 (14:43 -0400)] 
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>
9 years agoFix: add log4j domain to session.xsd
David Goulet [Tue, 14 Oct 2014 18:16:23 +0000 (14:16 -0400)] 
Fix: add log4j domain to session.xsd

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: add log4j to lttng list help
David Goulet [Tue, 14 Oct 2014 15:30:59 +0000 (11:30 -0400)] 
Fix: add log4j to lttng list help

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: Don't save an empty <contexts> node in kernel channels
Jérémie Galarneau [Mon, 6 Oct 2014 23:47:19 +0000 (19:47 -0400)] 
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>
9 years agoFix: save UST context informations as a event_perf_context_type
Jérémie Galarneau [Mon, 6 Oct 2014 23:44:21 +0000 (19:44 -0400)] 
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>
9 years agoFix: handle kernel event type correctly on enable
David Goulet [Fri, 3 Oct 2014 18:30:54 +0000 (14:30 -0400)] 
Fix: handle kernel event type correctly on enable

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoTest: Add syscall listing
David Goulet [Fri, 3 Oct 2014 15:05:13 +0000 (11:05 -0400)] 
Test: Add syscall listing

For both available syscall and session event.

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: set hidden attribute to all public mi functions
David Goulet [Wed, 1 Oct 2014 20:10:54 +0000 (16:10 -0400)] 
Fix: set hidden attribute to all public mi functions

Reported-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: set the hidden attribute to a filter function in liblttng-ctl
David Goulet [Wed, 1 Oct 2014 19:57:34 +0000 (15:57 -0400)] 
Fix: set the hidden attribute to a filter function in liblttng-ctl

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: handle sysconf possible negative returned value
David Goulet [Wed, 1 Oct 2014 18:57:36 +0000 (14:57 -0400)] 
Fix: handle sysconf possible negative returned value

Fixes Coverity issue 1019947.

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: channel deref. after NULL check in kernel consumer
David Goulet [Wed, 1 Oct 2014 18:52:33 +0000 (14:52 -0400)] 
Fix: channel deref. after NULL check in kernel consumer

Fixes Coverity issue 1040158.

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: check for kernel session metadata during init
David Goulet [Wed, 1 Oct 2014 18:49:42 +0000 (14:49 -0400)] 
Fix: check for kernel session metadata during init

Fixes Coverity issue 1040159.

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: cmd snapshot record output can't be NULL
David Goulet [Wed, 1 Oct 2014 18:40:13 +0000 (14:40 -0400)] 
Fix: cmd snapshot record output can't be NULL

The session daemon calls cmd_record_snapshot always with a valid
pointer.

Fixes Coverity issue 1047269.

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: incorrect cast in ust consumer assert
David Goulet [Wed, 1 Oct 2014 18:32:12 +0000 (14:32 -0400)] 
Fix: incorrect cast in ust consumer assert

Fixes Coverity issue 1068813.

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: remove useless assert in relayd
David Goulet [Wed, 1 Oct 2014 18:27:26 +0000 (14:27 -0400)] 
Fix: remove useless assert in relayd

Fixes Coverity issue 1127095.

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: bad handling of incoming data in consumer thread
David Goulet [Wed, 1 Oct 2014 18:16:07 +0000 (14:16 -0400)] 
Fix: bad handling of incoming data in consumer thread

This will fix Coverity issue 1019892.

The issue uncovered a more serious problem. The loop on ready FDs of the
thread was exiting at each branch thus not going on all fd. This is
problematic when the thread quit pipe is triggered and when there is
also at the same time a request for metadata from the consumer since the
metadata request could have been ignored.

This patch makes sure we go through all FDs in the loop when the thread
quit pipe or the metadata fd is triggered.

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: detect size_t overflow in syscall table init
David Goulet [Wed, 1 Oct 2014 17:30:27 +0000 (13:30 -0400)] 
Fix: detect size_t overflow in syscall table init

Fixes Coverity issue 1242317.

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: remove non existent header files from Makefile
David Goulet [Wed, 1 Oct 2014 17:00:36 +0000 (13:00 -0400)] 
Fix: remove non existent header files from Makefile

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: only initialize syscall table if kernel tracer available
David Goulet [Wed, 1 Oct 2014 15:30:15 +0000 (11:30 -0400)] 
Fix: only initialize syscall table if kernel tracer available

Fixes #844

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoModernize README with Markdown
Philippe Proulx [Wed, 17 Sep 2014 19:33:10 +0000 (15:33 -0400)] 
Modernize README with Markdown

This commit also:

  * adds a project description at the top
  * fixes a few grammar mistakes here and there
  * updates the Package contents list

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoAdd --list-options to save/load command
David Goulet [Tue, 30 Sep 2014 17:31:43 +0000 (13:31 -0400)] 
Add --list-options to save/load command

Fixes #835

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: use max between index and nbmem for syscall table realloc
David Goulet [Tue, 30 Sep 2014 16:00:31 +0000 (12:00 -0400)] 
Fix: use max between index and nbmem for syscall table realloc

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: fd leak in inet accept call
David Goulet [Tue, 30 Sep 2014 15:59:49 +0000 (11:59 -0400)] 
Fix: fd leak in inet accept call

Fixes Coverity issue #1241799.

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoTest: add diag to each syscall test
David Goulet [Mon, 29 Sep 2014 19:06:56 +0000 (15:06 -0400)] 
Test: add diag to each syscall test

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoSupport syscall event in save session
David Goulet [Mon, 29 Sep 2014 14:55:33 +0000 (10:55 -0400)] 
Support syscall event in save session

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoAdd syscall listing support
David Goulet [Mon, 22 Sep 2014 18:58:30 +0000 (14:58 -0400)] 
Add syscall listing support

This adds two things. First, a global syscall table populated at boot
time that is used to match which syscall is enabled or not using the
lttng kernel get mask call.

The second thing is the ability to list which syscall is enable or not
in a specific session. Keep in mind that for syscalls, NO state is kept
on the session daemon so we have to ask the kernel tracer which syscall
is enabled for a specific channel.

This introduce some changes to the API/ABI. First, an event flag is
added to the lttng_event data structure using 4 bytes of padding for an
enum value that can be ORed together in that field. This is used for now
to know which bitness the event is in case of a syscall event type.

Second, lttng_list_syscalls(...) is added to provide the ability to list
all available syscalls that the user can trace. To use that with the
lttng command line, "--syscall" is added to lttng list.

    $ lttng list -k --syscall

The above only lists available syscalls from the kernel tracer.

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: change perror to PERROR in kernel consumer
David Goulet [Mon, 29 Sep 2014 13:38:42 +0000 (09:38 -0400)] 
Fix: change perror to PERROR in kernel consumer

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: syscall test: add missing semicolumns in match
Mathieu Desnoyers [Fri, 26 Sep 2014 00:52:27 +0000 (20:52 -0400)] 
Fix: syscall test: add missing semicolumns in match

Don't match the system call "openat" for instance.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: kernel consumer: issue put_subbuf on error
Mathieu Desnoyers [Fri, 26 Sep 2014 00:49:45 +0000 (20:49 -0400)] 
Fix: kernel consumer: issue put_subbuf on error

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoTest: add disable syscalls when none are enabled
Mathieu Desnoyers [Wed, 24 Sep 2014 16:18:19 +0000 (12:18 -0400)] 
Test: add disable syscalls when none are enabled

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 years agoImplement tests for kernel syscall tracing feature
Mathieu Desnoyers [Wed, 24 Sep 2014 01:19:07 +0000 (21:19 -0400)] 
Implement tests for kernel syscall tracing feature

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 years agoFix: syscall tracing: disable all and missing error handling
Mathieu Desnoyers [Wed, 24 Sep 2014 01:04:29 +0000 (21:04 -0400)] 
Fix: syscall tracing: disable all and missing error handling

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 years agoImplement kernctl_syscall_mask
Mathieu Desnoyers [Mon, 15 Sep 2014 19:07:02 +0000 (15:07 -0400)] 
Implement kernctl_syscall_mask

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoImplement syscall mask ioctl
Mathieu Desnoyers [Mon, 15 Sep 2014 18:20:53 +0000 (14:20 -0400)] 
Implement syscall mask ioctl

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agolttng-modules ABI: syscall field "enable"
Mathieu Desnoyers [Fri, 12 Sep 2014 18:22:28 +0000 (14:22 -0400)] 
lttng-modules ABI: syscall field "enable"

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoAdd kernctl_syscall_list
Mathieu Desnoyers [Fri, 12 Sep 2014 16:10:29 +0000 (12:10 -0400)] 
Add kernctl_syscall_list

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoCleanup: Remove LTTNG_ENABLE_ALL_EVENT and LTTNG_DISABLE_ALL_EVENT
Mathieu Desnoyers [Wed, 10 Sep 2014 20:50:58 +0000 (16:50 -0400)] 
Cleanup: Remove LTTNG_ENABLE_ALL_EVENT and LTTNG_DISABLE_ALL_EVENT

Cleanup lttng-ctl to session daemon communication protocol, and cleanup
session daemon code (remove dead code).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoImplement support for lttng-modules syscall filtering
Mathieu Desnoyers [Tue, 9 Sep 2014 22:56:13 +0000 (18:56 -0400)] 
Implement support for lttng-modules syscall filtering

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoSupport lttng-modules syscall filtering in enable-event
Mathieu Desnoyers [Sat, 19 Jul 2014 21:16:22 +0000 (17:16 -0400)] 
Support lttng-modules syscall filtering in enable-event

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix out-of-tree build
Simon Marchi [Sat, 20 Sep 2014 01:29:23 +0000 (21:29 -0400)] 
Fix out-of-tree build

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: Propagate socket timeouts on lttcomm_accept_inet_sock()
Jérémie Galarneau [Tue, 23 Sep 2014 21:46:32 +0000 (17:46 -0400)] 
Fix: Propagate socket timeouts on lttcomm_accept_inet_sock()

Ensure that send/recv timeouts are applied to new sockets created
from a lttcomm_accept_inet_sock().

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: report UST consumer channel creation error
Mathieu Desnoyers [Mon, 22 Sep 2014 16:39:08 +0000 (12:39 -0400)] 
Fix: report UST consumer channel creation error

The session daemon reports no error whatsoever when the consumer daemon
fails to create a channel. We don't want to print errors when failing to
send the channel to the UST application though, because the application
may be concurrently exiting. So only print those errors when receiving
reply from the consumerd.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoTest: Add the new log4j agent
David Goulet [Mon, 15 Sep 2014 19:22:12 +0000 (15:22 -0400)] 
Test: Add the new log4j agent

This adds the log4j java agent test.

It also moves the JUL test and build system to use the new UST java
agent jar.

Signed-off-by: David Goulet <dgoulet@efficios.com>
This page took 0.041177 seconds and 4 git commands to generate.