lttng-tools.git
7 years agolttng-ctl: add override helper to load api
Jonathan Rajotte [Thu, 8 Sep 2016 22:02:51 +0000 (18:02 -0400)] 
lttng-ctl: add override helper to load api

User can provide an url override that will be used during the loading of a
configuration file.

The url format is the same found at lttng-create(1).

This correspond to a --set-url operation on lttng-create.

Note: an url might be invalid for a trace configuration. The override will fail
during the session load (call to lttng_load_session) and simply cancel the
loading.

e.g Loading a live session with a file:// url override will fail.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoRename override to overwrite for config_load_session
Jonathan Rajotte [Fri, 9 Sep 2016 16:37:37 +0000 (12:37 -0400)] 
Rename override to overwrite for config_load_session

This rename is to be consistent with the load API doc and interface.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: report truncation on snprintf
Jonathan Rajotte [Wed, 7 Sep 2016 15:54:40 +0000 (11:54 -0400)] 
Fix: report truncation on snprintf

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: check for a session daemon before running load command
Jérémie Galarneau [Thu, 6 Oct 2016 18:52:19 +0000 (14:52 -0400)] 
Fix: check for a session daemon before running load command

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: ignore SIGPIPE
Mathieu Desnoyers [Thu, 6 Oct 2016 16:57:45 +0000 (12:57 -0400)] 
Fix: ignore SIGPIPE

Issuing fprintf() to stderr (thus write() to the standard error file
descriptor) within the SIGPIPE signal handler is bad: it can trigger
SIGPIPE repeatedly if the listening end has closed its end of the pipe.

Set the SIGPIPE action to SIG_IGN in relayd, sessiond, and consumerd.

This was affecting sessiond and relayd. The consumerd did not print
anything to stderr.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoUse lttng api for the load command
Jonathan Rajotte [Wed, 7 Sep 2016 15:53:06 +0000 (11:53 -0400)] 
Use lttng api for the load command

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: use ssize_type for the return value of uri_parse_str_urls
Jonathan Rajotte [Wed, 7 Sep 2016 15:07:52 +0000 (11:07 -0400)] 
Fix: use ssize_type for the return value of uri_parse_str_urls

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoDocs: grammar fixes in load.h
Jérémie Galarneau [Thu, 6 Oct 2016 15:24:23 +0000 (11:24 -0400)] 
Docs: grammar fixes in load.h

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: wrong api comments for load.h
Jonathan Rajotte [Tue, 6 Sep 2016 18:21:11 +0000 (14:21 -0400)] 
Fix: wrong api comments for load.h

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: do not overwrite ret if already set and session found
Jonathan Rajotte [Tue, 13 Sep 2016 21:17:50 +0000 (17:17 -0400)] 
Fix: do not overwrite ret if already set and session found

Errors were not propagated correctly otherwise.

e.g:
(No sessiond running)
lttng load --all
-> All sessions have been loaded successfully
lttng list show no sessions

With fix the same command output:
Error: No session daemon is available

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agolttng-sessiond: auto-load lttng-probe-i2c module
Simon Marchi [Tue, 4 Oct 2016 22:24:50 +0000 (18:24 -0400)] 
lttng-sessiond: auto-load lttng-probe-i2c module

Automatically load the lttng-probe-i2c kernel module, which was recently
added in lttng-modules, along with the other probe modules.

Signed-off-by: Simon Marchi <simon.marchi@ericsson.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoBump lttng-modules ABI minor version
Mathieu Desnoyers [Wed, 5 Oct 2016 16:54:20 +0000 (12:54 -0400)] 
Bump lttng-modules ABI minor version

Follow lttng-modules upstream.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: handle backward compatibility with lttng-modules 2.7
Mathieu Desnoyers [Wed, 5 Oct 2016 16:54:19 +0000 (12:54 -0400)] 
Fix: handle backward compatibility with lttng-modules 2.7

There is no major version bump between lttng-module 2.7 and 2.8 ABI.
Even though we do not guarantee compatibility, do a best effort to
maintain it when possible.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoClean-up: remove unnecessary autoconf variable substitution
Jérémie Galarneau [Tue, 4 Oct 2016 21:16:01 +0000 (17:16 -0400)] 
Clean-up: remove unnecessary autoconf variable substitution

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: honor negative (unlimited) app socket timeout
Jérémie Galarneau [Tue, 4 Oct 2016 21:00:17 +0000 (17:00 -0400)] 
Fix: honor negative (unlimited) app socket timeout

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoBuild: Replace use of deprecated AM_PATH_XML2
Jérémie Galarneau [Tue, 4 Oct 2016 18:37:57 +0000 (14:37 -0400)] 
Build: Replace use of deprecated AM_PATH_XML2

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTest fix: set app and network socket timeouts to unlimited
Jérémie Galarneau [Thu, 29 Sep 2016 23:35:01 +0000 (19:35 -0400)] 
Test fix: set app and network socket timeouts to unlimited

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTest fix: test_fork can hang while waiting for child pids
Jérémie Galarneau [Thu, 29 Sep 2016 04:03:42 +0000 (00:03 -0400)] 
Test fix: test_fork can hang while waiting for child pids

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTest fix: test_daemon can hang while waiting for child pids
Jérémie Galarneau [Thu, 29 Sep 2016 04:01:06 +0000 (00:01 -0400)] 
Test fix: test_daemon can hang while waiting for child pids

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTest fix: redirect python test subprocess output to /dev/null
Jérémie Galarneau [Thu, 29 Sep 2016 03:13:19 +0000 (23:13 -0400)] 
Test fix: redirect python test subprocess output to /dev/null

Redirecting to subprocess.PIPE can deadlock when subprocess.wait()
is invoked.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoBuild fix: macOS Sierra provides clock_gettime
Jérémie Galarneau [Thu, 29 Sep 2016 00:43:57 +0000 (20:43 -0400)] 
Build fix: macOS Sierra provides clock_gettime

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: time redefinition warnings on macOS builds
Jérémie Galarneau [Wed, 28 Sep 2016 17:26:49 +0000 (13:26 -0400)] 
Fix: time redefinition warnings on macOS builds

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoClean-up: remove unused variable user
Jérémie Galarneau [Wed, 28 Sep 2016 16:24:50 +0000 (12:24 -0400)] 
Clean-up: remove unused variable user

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoCleanup: Remove fun from code base
Mathieu Desnoyers [Sun, 25 Sep 2016 18:32:27 +0000 (14:32 -0400)] 
Cleanup: Remove fun from code base

It appears choosing the release names provides plenty of enjoyment to
LTTng developers, thus allowing us to remove those easter eggs.

Incidentally, it will allow me to demo the LTTng project without
carrying this <yellow>Welcome back Dr Tracing!</yellow> message each
time I issue a "lttng" command.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: remove in-place backup suffix argument provided to sed
Jérémie Galarneau [Wed, 7 Sep 2016 21:21:22 +0000 (17:21 -0400)] 
Fix: remove in-place backup suffix argument provided to sed

GNU sed complains when an empty suffix argument is provided
as the in-place suffix.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: pass a valid length to accept() on unix domain sockets
Jérémie Galarneau [Wed, 31 Aug 2016 03:00:57 +0000 (23:00 -0400)] 
Fix: pass a valid length to accept() on unix domain sockets

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoLog signals received by run_as worker
Jérémie Galarneau [Fri, 26 Aug 2016 19:47:07 +0000 (15:47 -0400)] 
Log signals received by run_as worker

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoMissing word in worker_sighandler() comment
Jérémie Galarneau [Fri, 26 Aug 2016 19:46:50 +0000 (15:46 -0400)] 
Missing word in worker_sighandler() comment

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoClean-up snapshot command error reporting
Jérémie Galarneau [Thu, 25 Aug 2016 20:43:13 +0000 (16:43 -0400)] 
Clean-up snapshot command error reporting

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: RCU lock imbalance on error in cmd_snapshot_list_outputs()
Jérémie Galarneau [Thu, 25 Aug 2016 20:20:47 +0000 (16:20 -0400)] 
Fix: RCU lock imbalance on error in cmd_snapshot_list_outputs()

The error path of cmd_snapshot_list_outputs() unlocks the
rcu_read_lock. However, this path can be taken without having
ever locked before.

Fixes #1044

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoUse -M parameter instead of --manpath when invoking man(1)
Ricardo Nabinger Sanchez [Thu, 25 Aug 2016 19:57:46 +0000 (15:57 -0400)] 
Use -M parameter instead of --manpath when invoking man(1)

Older versions of man (and the implementation used in FreeBSD) do
not support the long version of the --manpath/-M option. Use
'-M' in the interest of portability.

Fixes #1043

Signed-off-by: Ricardo Nabinger Sanchez <rnsanchez@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoOOT Build fix: reference the source directory's Python test app
Jérémie Galarneau [Wed, 10 Aug 2016 18:40:24 +0000 (14:40 -0400)] 
OOT Build fix: reference the source directory's Python test app

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: pass NULL to config_load_session instead of an empty string
Jérémie Galarneau [Tue, 9 Aug 2016 17:03:00 +0000 (13:03 -0400)] 
Fix: pass NULL to config_load_session instead of an empty string

The public lttng_load_session wrapper uses empty strings (strings
starting with \0) to express "any" session_name and the default
session load paths.

However, this is not expected by config_load_session which uses
NULLs to express these values.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTests: don't copy test_python_logging explicitly
Jérémie Galarneau [Fri, 5 Aug 2016 21:55:38 +0000 (17:55 -0400)] 
Tests: don't copy test_python_logging explicitly

cp would fail silently in OOT builds when trying to copy
test_python_logging. This is no longer necessary as it is
generated on configure.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoOOT build fix: Missing include of src directory
Jérémie Galarneau [Fri, 5 Aug 2016 21:35:00 +0000 (17:35 -0400)] 
OOT build fix: Missing include of src directory

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoAccomodate BSD sed in version.h generation
Jérémie Galarneau [Fri, 5 Aug 2016 19:45:19 +0000 (15:45 -0400)] 
Accomodate BSD sed in version.h generation

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoPort: Detect platforms where librt is required
Michael Jeanson [Wed, 3 Aug 2016 21:59:16 +0000 (17:59 -0400)] 
Port: Detect platforms where librt is required

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoPort: Add OSX clock_gettime compat
Michael Jeanson [Wed, 3 Aug 2016 20:54:16 +0000 (16:54 -0400)] 
Port: Add OSX clock_gettime compat

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoPort: Add OSX support to socket compat
Michael Jeanson [Wed, 3 Aug 2016 18:35:27 +0000 (14:35 -0400)] 
Port: Add OSX support to socket compat

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoPort: Add OSX support to poll compat
Michael Jeanson [Wed, 3 Aug 2016 18:33:42 +0000 (14:33 -0400)] 
Port: Add OSX support to poll compat

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoPort: Add OSX support to fcntl compat
Michael Jeanson [Wed, 3 Aug 2016 18:29:28 +0000 (14:29 -0400)] 
Port: Add OSX support to fcntl compat

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoPort: Add OSX compat to sessiond-comm/unix.c
Michael Jeanson [Wed, 3 Aug 2016 18:25:25 +0000 (14:25 -0400)] 
Port: Add OSX compat to sessiond-comm/unix.c

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoPort: Add OSX endian.h compat
Michael Jeanson [Wed, 3 Aug 2016 18:21:36 +0000 (14:21 -0400)] 
Port: Add OSX endian.h compat

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoPort: Add OSX libuuid compat
Michael Jeanson [Tue, 2 Aug 2016 20:27:59 +0000 (16:27 -0400)] 
Port: Add OSX libuuid compat

OSX has the libuuid symbols built in the system libraries.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: zero-initialize fd_set
Jérémie Galarneau [Wed, 3 Aug 2016 18:14:33 +0000 (14:14 -0400)] 
Fix: zero-initialize fd_set

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoClean-up: missing cast to fd_set*
Jérémie Galarneau [Wed, 3 Aug 2016 16:42:43 +0000 (12:42 -0400)] 
Clean-up: missing cast to fd_set*

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: usage of FD_SET on fd_set > 1024 results in corruption
Jérémie Galarneau [Wed, 3 Aug 2016 16:36:34 +0000 (12:36 -0400)] 
Fix: usage of FD_SET on fd_set > 1024 results in corruption

fd_set is (typically) defined as an 1024 bit long array.
Therefore, using FD_SET with an fd > 1024 will result in a buffer
overrun.

Reported-by: Coverity Scan
CID 1360535 (#1 of 1): Out-of-bounds write (OVERRUN)

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: erroneous usage of addr parameter in mmap()
Jérémie Galarneau [Wed, 3 Aug 2016 15:43:13 +0000 (11:43 -0400)] 
Fix: erroneous usage of addr parameter in mmap()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoClean-up: remove useless assignment
Jérémie Galarneau [Wed, 3 Aug 2016 15:09:21 +0000 (11:09 -0400)] 
Clean-up: remove useless assignment

Reported-by Coverity Scan:
CID 1243014: Unused value (UNUSED_VALUE)

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: missing unmap in test error handling
Jérémie Galarneau [Mon, 1 Aug 2016 19:34:31 +0000 (15:34 -0400)] 
Fix: missing unmap in test error handling

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTests: unchecked pthread_join return value
Jérémie Galarneau [Mon, 1 Aug 2016 19:32:39 +0000 (15:32 -0400)] 
Tests: unchecked pthread_join return value

Reported-by Coverity Scan:
CID 1360530 (#1 of 1): Unchecked return value (CHECKED_RETURN)

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoClean-up: remove negative check against unsigned value
Jérémie Galarneau [Mon, 1 Aug 2016 19:27:33 +0000 (15:27 -0400)] 
Clean-up: remove negative check against unsigned value

Reported-by Coverity Scan:
CID 1360536 (#1 of 1): Unsigned compared against 0 (NO_EFFECT)

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: unchecked init_pipe return value
Jérémie Galarneau [Mon, 1 Aug 2016 19:16:38 +0000 (15:16 -0400)] 
Fix: unchecked init_pipe return value

Reported-by Coverity Scan:
CID 1360533 (#1 of 1): Logically dead code (DEADCODE)

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTests: Unchecked pthread_create return value
Jérémie Galarneau [Mon, 1 Aug 2016 19:07:42 +0000 (15:07 -0400)] 
Tests: Unchecked pthread_create return value

Reported-by Coverity Scan:
CID 1360529 (#1 of 1): Unchecked return value (CHECKED_RETURN)

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoClean-up: remove useless assignment
Jérémie Galarneau [Mon, 1 Aug 2016 18:39:37 +0000 (14:39 -0400)] 
Clean-up: remove useless assignment

Reported-by Coverity Scan
CID 1243048 (#1 of 1): Unused value (UNUSED_VALUE)

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTests: Add tracepoints to libbar, libfoo and libzzz
Jérémie Galarneau [Fri, 22 Jul 2016 19:10:57 +0000 (15:10 -0400)] 
Tests: Add tracepoints to libbar, libfoo and libzzz

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: Mark ASCIIDOC_ATTRS_CONF as a dependency of man page targets
Jérémie Galarneau [Wed, 20 Jul 2016 17:56:38 +0000 (13:56 -0400)] 
Fix: Mark ASCIIDOC_ATTRS_CONF as a dependency of man page targets

ASCIIDOC_ATTRS_CONF contains the various paths set by autoconf,
such as datadir, syscondif and prefix, and it may be changed
by the user by invoking ./configure with different options. In
such a case, the man pages should be regenerated to take the new
paths into account.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTest the parsing of perf raw context
Julien Desfossez [Tue, 5 Jul 2016 15:50:47 +0000 (11:50 -0400)] 
Test the parsing of perf raw context

Only test the parsing of the new option in fast_regression since the
real integration test requires particular hardware and kernel
configuration which might not be available.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoEnable perf PMU counters by raw ID
Julien Desfossez [Tue, 5 Jul 2016 15:50:46 +0000 (11:50 -0400)] 
Enable perf PMU counters by raw ID

Allow enabling perf PMU counters by raw ID in addition to the generic
list already provided. The format for kernel tracing is
"perf:cpu:raw:rNNN:<name>" and "perf:thread:raw:rNNN:<name> for
user-space. The rNNN format is the same as perf-record(1) where NNN is a
hexadecimal event descriptor in the form of umask+eventsel. The <name>
field to associate a clearer name to the counter.

Example usage on Intel i7-3520M to get the unhalted reference cycles
(eventsel: 0x13c) count at privilege level 0 (umask: 0x00):
lttng add-context -k -t perf:cpu:raw:r0013c:x86unhalted

Result in the trace:
sched_switch: { cpu_id = 3 }, {
perf_cpu_raw_r0013c_x86unhalted = 27632578 }, [...]

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoRun userspace perf tests on non-x86 platforms
Jérémie Galarneau [Wed, 6 Jul 2016 19:47:18 +0000 (15:47 -0400)] 
Run userspace perf tests on non-x86 platforms

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTests: adjust ust-dl planned test count
Jérémie Galarneau [Wed, 6 Jul 2016 23:39:10 +0000 (19:39 -0400)] 
Tests: adjust ust-dl planned test count

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTest library load/unload events
Mathieu Desnoyers [Mon, 4 Jul 2016 22:54:31 +0000 (18:54 -0400)] 
Test library load/unload events

Test the lttng_ust_lib:load, lttng_ust_lib:build_id,
lttng_ust_lib:debug_link, and lttng_ust_lib:unload events from
lttng-ust, which track the state of loaded libraries. This ensures we
correctly handle dlopen of libraries with direct dependencies.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoAdd missing ust_app_regenerate_statedump_all stub
Jérémie Galarneau [Wed, 6 Jul 2016 19:30:45 +0000 (15:30 -0400)] 
Add missing ust_app_regenerate_statedump_all stub

This allows the build to succeed in --without-lttng-ust mode.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoClean-up: remove unused ust_app_regenerate_metadata_all
Jérémie Galarneau [Wed, 6 Jul 2016 19:22:45 +0000 (15:22 -0400)] 
Clean-up: remove unused ust_app_regenerate_metadata_all

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoAdd regenerate command to MI schema
Jérémie Galarneau [Wed, 6 Jul 2016 18:52:18 +0000 (14:52 -0400)] 
Add regenerate command to MI schema

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoManpage for the regenerate statedump command
Julien Desfossez [Tue, 5 Jul 2016 14:54:38 +0000 (10:54 -0400)] 
Manpage for the regenerate statedump command

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTests for the regenerate statedump command
Julien Desfossez [Tue, 5 Jul 2016 14:54:37 +0000 (10:54 -0400)] 
Tests for the regenerate statedump command

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoAllow regenerating the statedump of a running session
Julien Desfossez [Tue, 5 Jul 2016 14:54:36 +0000 (10:54 -0400)] 
Allow regenerating the statedump of a running session

The "lttng regenerate statedump" command can be used to regenerate the
statedump of a running session whenever needed. This is particularly
useful in snapshot and trace-file rotation modes where the original
statedump may be lost.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoKernel ioctl to regenerate the statedump
Mathieu Desnoyers [Tue, 5 Jul 2016 14:54:35 +0000 (10:54 -0400)] 
Kernel ioctl to regenerate the statedump

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoUST command to regenerate the statedump
Mathieu Desnoyers [Tue, 5 Jul 2016 14:54:34 +0000 (10:54 -0400)] 
UST command to regenerate the statedump

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoRename the "metadata regenerate" command to "regenerate metadata"
Julien Desfossez [Tue, 5 Jul 2016 14:54:33 +0000 (10:54 -0400)] 
Rename the "metadata regenerate" command to "regenerate metadata"

Prepare the deprecation of the "metadata regenerate" command since we
need to regenerate the statedump as well, so it is more convenient to
have one command to regenerate various session's attributes.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTypo fix: uninitializez ->uninitialized
Jérémie Galarneau [Wed, 6 Jul 2016 14:09:40 +0000 (10:09 -0400)] 
Typo fix: uninitializez ->uninitialized

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: handle negative (unlimited) system stack size limits
Jérémie Galarneau [Wed, 6 Jul 2016 04:14:26 +0000 (00:14 -0400)] 
Fix: handle negative (unlimited) system stack size limits

This also changes the stack size selection policy to select
the largest of:

1) default pthread stack size (dictated by libc)
2) system soft limit
3) 2 MB

This is bounded by the system's hard limit on stack size.
If this limit is smaller than 2 MB, the default size mentionned
in pthread_create(3) for Linux, we warn the user that the daemons
may be unreliable and advise bumping this limit.

Note that is is most likely possible to operate the daemons with
way less than 2MB of stack space. However, this was not
extensively tested.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTests: adjust type declaration test count
Jérémie Galarneau [Tue, 5 Jul 2016 23:19:55 +0000 (19:19 -0400)] 
Tests: adjust type declaration test count

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: protocol mismatch between UST and tools
Philippe Proulx [Tue, 5 Jul 2016 21:05:21 +0000 (17:05 -0400)] 
Fix: protocol mismatch between UST and tools

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoust-ctl: use fixed-size integer rather than enum
Jérémie Galarneau [Tue, 5 Jul 2016 20:27:54 +0000 (16:27 -0400)] 
ust-ctl: use fixed-size integer rather than enum

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTest UST's autoincrementing enumeration values
Philippe Proulx [Mon, 4 Jul 2016 22:24:19 +0000 (18:24 -0400)] 
Test UST's autoincrementing enumeration values

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoAdd support for UST's autoincrementing enum entries
Philippe Proulx [Mon, 4 Jul 2016 21:48:42 +0000 (17:48 -0400)] 
Add support for UST's autoincrementing enum entries

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTests: eliminate process timeouts from Python tests
Jérémie Galarneau [Tue, 5 Jul 2016 19:13:15 +0000 (15:13 -0400)] 
Tests: eliminate process timeouts from Python tests

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: English syntax errors in 'lttng status'
Sebastien Boisvert [Tue, 28 Jun 2016 12:12:59 +0000 (08:12 -0400)] 
Fix: English syntax errors in 'lttng status'

Signed-off-by: Sebastien Boisvert <sboisvert@gydle.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTest for select, poll and epoll syscall overrides
Julien Desfossez [Tue, 28 Jun 2016 21:45:52 +0000 (17:45 -0400)] 
Test for select, poll and epoll syscall overrides

This test for root_regression checks if the syscall overrides for
select, pselect6, poll, ppoll, epoll_ctl, epoll_wait and epoll_pwait
work as expected on arm and x86 (32 and 64-bit).

There are 11 test cases that check for normal and abnormal behaviour. If
the test system has the Babeltrace python bindings, the test validates
the content of the events, otherwise only the presence of the generated
events is checked.

We also check if kernel OOPS, WARNING or BUG were generated during the
test.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTests: tap.sh spams tests' output when no plan is set
Jérémie Galarneau [Thu, 30 Jun 2016 20:37:57 +0000 (16:37 -0400)] 
Tests: tap.sh spams tests' output when no plan is set

Some tests are implemented in C (using tap.h) or in Python
and don't use tap.sh's facilities. However, it is sourced
by utils.sh and prints an error message during its clean-up
because a plan was never set.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: Set thread stack size to ulimit soft value
Michael Jeanson [Wed, 15 Jun 2016 21:18:07 +0000 (17:18 -0400)] 
Fix: Set thread stack size to ulimit soft value

Some libc don't honor the limit set for the stack size and use their own
empirically chosen static value. Detect this behavior by checking if the
current stack size is smally than the soft limit and in that case set
the pthread stack size to soft limit value.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: location of various standard headers
Michael Jeanson [Wed, 15 Jun 2016 21:18:06 +0000 (17:18 -0400)] 
Fix: location of various standard headers

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: missing include ctype.h for isdigit()
Michael Jeanson [Wed, 15 Jun 2016 21:18:05 +0000 (17:18 -0400)] 
Fix: missing include ctype.h for isdigit()

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: strerror_r behavior is glibc specific
Michael Jeanson [Wed, 15 Jun 2016 21:18:04 +0000 (17:18 -0400)] 
Fix: strerror_r behavior is glibc specific

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: error.h -> common/error.h
Michael Jeanson [Wed, 15 Jun 2016 21:18:03 +0000 (17:18 -0400)] 
Fix: error.h -> common/error.h

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: snapshot del-output with name on musl
Michael Jeanson [Wed, 15 Jun 2016 21:18:02 +0000 (17:18 -0400)] 
Fix: snapshot del-output with name on musl

Some implementations of strtol(), like the one in musl, will
return EINVAL in errno when no valid number was found in
the string.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: sessiond ht_match_event() check if filter is NULL
Philippe Proulx [Wed, 15 Jun 2016 21:18:03 +0000 (17:18 -0400)] 
Fix: sessiond ht_match_event() check if filter is NULL

It looks like an agent event's filter expression is NULL when
it's created with -a, for example:

    lttng enable-event -j -a

Since there's no check for this in ht_match_event(), strlen()
makes the session daemon segfault with this scenario:

    lttng create
    lttng enable-event -j -a
    lttng disable-event -j -a

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoconfigure.ac: fix --enable/disable-kmod option
Philippe Proulx [Tue, 21 Jun 2016 20:29:38 +0000 (16:29 -0400)] 
configure.ac: fix --enable/disable-kmod option

Now all the following work as expected:

  * No option (defaults to --enable-kmod)
  * --disable-kmod
  * --enable-kmod
  * --enable-kmod=no
  * --enable-kmod=yes

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTests: spawn ht_cleanup thread in unit tests
Jérémie Galarneau [Fri, 17 Jun 2016 21:50:49 +0000 (17:50 -0400)] 
Tests: spawn ht_cleanup thread in unit tests

Run the cleanup thread in the unit tests to ensure that the hash
tables are properly cleaned-up even in the context of tests. This
allows us to reliably check for memory leaks in the unit tests.

7 years agoLazily initialize max poll set size
Jérémie Galarneau [Mon, 27 Jun 2016 19:18:38 +0000 (15:18 -0400)] 
Lazily initialize max poll set size

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoRevert "Assert that a valid clean-up pipe exists on ht_cleanup_push"
Jérémie Galarneau [Fri, 17 Jun 2016 22:09:12 +0000 (18:09 -0400)] 
Revert "Assert that a valid clean-up pipe exists on ht_cleanup_push"

This reverts commit fc41443f7ee5fa95a942d0aedd61c75d622697b5.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agotests: test ust snapshot with discard buffers
Mathieu Desnoyers [Wed, 20 Apr 2016 15:20:00 +0000 (11:20 -0400)] 
tests: test ust snapshot with discard buffers

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agotests: test kernel snapshot with discard buffers
Mathieu Desnoyers [Wed, 20 Apr 2016 15:19:59 +0000 (11:19 -0400)] 
tests: test kernel snapshot with discard buffers

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoAllow channel mode override in snapshot sessions
Mathieu Desnoyers [Wed, 20 Apr 2016 15:19:58 +0000 (11:19 -0400)] 
Allow channel mode override in snapshot sessions

Allow the lttng cmd line and liblttng-ctl users to override the channel
mode in snapshot sessions.

Note that liblttng-ctl users expecting that an "overwrite" mode
explicitly set at the value "0" (discard) for a snapshot session will
now create a channel in discard mode.

The DEFAULT_CHANNEL_OVERWRITE used by liblttng-ctl
lttng_channel_set_default_attr() is changed to "-1".

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: validate number of subbuffers after tweaking properties
Mathieu Desnoyers [Wed, 20 Apr 2016 15:19:57 +0000 (11:19 -0400)] 
Fix: validate number of subbuffers after tweaking properties

There are properties that are tweaked by each of ust and kernel channel
create functions after a validation on the number of subbuffers for
overwrite channels. Move validation after those properties
modifications.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoUse bool type for save command options
Jérémie Galarneau [Tue, 14 Jun 2016 16:46:02 +0000 (12:46 -0400)] 
Use bool type for save command options

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoClean-up: harmonize popt option declarations in save.c
Jérémie Galarneau [Tue, 14 Jun 2016 16:41:39 +0000 (12:41 -0400)] 
Clean-up: harmonize popt option declarations in save.c

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoClean-up: move mi_writer declaration with other declarations
Jérémie Galarneau [Tue, 14 Jun 2016 16:41:09 +0000 (12:41 -0400)] 
Clean-up: move mi_writer declaration with other declarations

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.041489 seconds and 4 git commands to generate.