lttng-tools.git
9 years agoFix: Memory leak in setup of relayd_path
Jérémie Galarneau [Thu, 2 Jul 2015 22:55:17 +0000 (18:55 -0400)] 
Fix: Memory leak in setup of relayd_path

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: update liburcu URL
Jérémie Galarneau [Thu, 2 Jul 2015 22:25:28 +0000 (18:25 -0400)] 
Fix: update liburcu URL

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: test: use "$@" to pass and quote argument
Jonathan Rajotte [Sun, 26 Apr 2015 21:14:16 +0000 (17:14 -0400)] 
Fix: test: use "$@" to pass and quote argument

${*} expands wildcard and does not preserve initial arguments.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoRefactor: test: wrapper for lttng_snapshot_del_output
Jonathan Rajotte [Fri, 24 Apr 2015 20:50:39 +0000 (16:50 -0400)] 
Refactor: test: wrapper for lttng_snapshot_del_output

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoRefactor: test: wrapper for lttng_snapshot_add_output
Jonathan Rajotte [Fri, 24 Apr 2015 20:45:08 +0000 (16:45 -0400)] 
Refactor: test: wrapper for lttng_snapshot_add_output

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoRefactor: test: wrapper for destroy_lttng_session
Jonathan Rajotte [Fri, 24 Apr 2015 20:29:40 +0000 (16:29 -0400)] 
Refactor: test: wrapper for destroy_lttng_session

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoRefactor: test: wrapper for stop_lttng_tracing
Jonathan Rajotte [Fri, 24 Apr 2015 20:10:08 +0000 (16:10 -0400)] 
Refactor: test: wrapper for stop_lttng_tracing

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoRefactor: test: wrapper for start_lttng_tracing
Jonathan Rajotte [Fri, 24 Apr 2015 19:53:10 +0000 (15:53 -0400)] 
Refactor: test: wrapper for start_lttng_tracing

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoRefactor: test: wrapper for enable_ust_lttng_event
Jonathan Rajotte [Fri, 24 Apr 2015 17:50:04 +0000 (13:50 -0400)] 
Refactor: test: wrapper for enable_ust_lttng_event

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoRefactor: test: wrapper for enable_ust_lttng_channel
Jonathan Rajotte [Thu, 23 Apr 2015 21:22:36 +0000 (17:22 -0400)] 
Refactor: test: wrapper for enable_ust_lttng_channel

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoRefactor: test: wrapper for create_lttng_session
Jonathan Rajotte [Thu, 23 Apr 2015 20:32:19 +0000 (16:32 -0400)] 
Refactor: test: wrapper for create_lttng_session

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Memory allocated by xmlNodeGetContent() must be freed by xmlFree()
Jérémie Galarneau [Thu, 25 Jun 2015 16:42:48 +0000 (12:42 -0400)] 
Fix: Memory allocated by xmlNodeGetContent() must be freed by xmlFree()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoSave/load: add support for shared memory path
Jonathan Rajotte [Fri, 17 Apr 2015 21:26:41 +0000 (17:26 -0400)] 
Save/load: add support for shared memory path

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: get_cmdline_by_pid path length assumes a max pid of 65535
Jérémie Galarneau [Tue, 23 Jun 2015 21:27:31 +0000 (23:27 +0200)] 
Fix: get_cmdline_by_pid path length assumes a max pid of 65535

PROC(5) mentions that "On 64-bit systems, pid_max can be set to any
value up to 2^22 (PID_MAX_LIMIT, approximately 4 million)."

We use 32 bits for simplicity's sake.

Reported-by: Zhenyu Ren <zhenyu.ren@aliyun.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoClean-up: Remove ifdef-ed out lttng list options
Jérémie Galarneau [Tue, 23 Jun 2015 20:30:59 +0000 (22:30 +0200)] 
Clean-up: Remove ifdef-ed out lttng list options

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoTest: mi: test for greater or equal to a minimum of events on ust listing.
Jonathan Rajotte [Wed, 10 Jun 2015 15:27:41 +0000 (11:27 -0400)] 
Test: mi: test for greater or equal to a minimum of events on ust listing.

Since the number of events present in the tests apps in prone to change it
make more sense to look for a minimum of events. This is less rigourous
but more flexible to change.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: update regression tests involving UST
Antoine Busque [Wed, 27 May 2015 19:09:18 +0000 (15:09 -0400)] 
Fix: update regression tests involving UST

This patch fixes previously failing regression tests which involve
either the UST statedump or helper events, following a refactor and
rename.

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoClean-up: Remove ifdef-ed out function:entry feature
Jérémie Galarneau [Fri, 22 May 2015 16:55:57 +0000 (12:55 -0400)] 
Clean-up: Remove ifdef-ed out function:entry feature

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Mark MI and Config string declarations as extern
Jérémie Galarneau [Fri, 22 May 2015 16:53:30 +0000 (12:53 -0400)] 
Fix: Mark MI and Config string declarations as extern

This fixes a build issue with GCC 5.1 which would complain about
these symbols being defined multiple times.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoClean-up append_list_to_probes()
Jérémie Galarneau [Wed, 6 May 2015 15:51:50 +0000 (11:51 -0400)] 
Clean-up append_list_to_probes()

Remove unecessary "index" variable and cur_mod increment which was
probably meant to increment "index", a bug fixed by 9ae17e2.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: modprobe.c: fix tmp_list memory leak
Philippe Proulx [Tue, 28 Apr 2015 21:09:16 +0000 (17:09 -0400)] 
Fix: modprobe.c: fix tmp_list memory leak

Reported-by: Hannes Weisbach <hannes.weisbach@mailbox.tu-dresden.de>
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: append_list_to_probes(): increment index
Philippe Proulx [Tue, 28 Apr 2015 21:08:58 +0000 (17:08 -0400)] 
Fix: append_list_to_probes(): increment index

Reported-by: Hannes Weisbach <hannes.weisbach@mailbox.tu-dresden.de>
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoDocs: LTTNG(1) filtering is now supported by the kernel tracer
Jérémie Galarneau [Wed, 29 Apr 2015 20:19:38 +0000 (16:19 -0400)] 
Docs: LTTNG(1) filtering is now supported by the kernel tracer

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: live_test regression on large number of cpus
Mathieu Desnoyers [Tue, 28 Apr 2015 21:23:34 +0000 (17:23 -0400)] 
Fix: live_test regression on large number of cpus

Merge fixes from Babeltrace lttng-live plugin, especially about
incorrect use of send() and recv().

Can be triggered with 32 virtual processors visible on the system with
the root_regression test suite.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: set UST register timeout to -1 as test default
Mathieu Desnoyers [Tue, 28 Apr 2015 14:16:37 +0000 (10:16 -0400)] 
Fix: set UST register timeout to -1 as test default

On busy systems, it's possible to spuriously hit the default 3 seconds
timeout for UST registration to sessiond, thus causing tests to be flaky
on those systems.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoMan page: reference lttng-crash under --shm-path option
Jonathan Rajotte [Wed, 22 Apr 2015 19:39:00 +0000 (15:39 -0400)] 
Man page: reference lttng-crash under --shm-path option

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoTests: Don't rely on implicit scalar expression dereference
Jérémie Galarneau [Thu, 23 Apr 2015 23:41:35 +0000 (19:41 -0400)] 
Tests: Don't rely on implicit scalar expression dereference

This silences an "experimental feature" warning when using Perl 5.20.2.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoman pages: use standard NAME format
Philippe Proulx [Wed, 8 Apr 2015 19:11:41 +0000 (15:11 -0400)] 
man pages: use standard NAME format

As per man(7):

    The only mandatory heading is NAME, which should
    be the first section and be followed on the next
    line by a one-line description of the program:

        .SH NAME
        item \- description

    It is extremely important that this format is followed,
    and that there is a backslash before the single dash
    which follows the item name. This syntax is used by the
    mandb(8) program to create a database of short
    descriptions for the whatis(1) and apropos(1) commands.

Furthermore (lexgrog(1)):

    When using the traditional man macro set, a correct NAME
    section looks something like this:

        .SH NAME
        foo \- program to do something

    Some manual pagers require the ‘\-’ to be exactly as shown;
    mandb is more tolerant, but for compatibility with other
    systems it is nevertheless a good idea to retain the
    backslash.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix python bindings' Makefile for out-of-tree builds
Simon Marchi [Tue, 14 Apr 2015 20:45:27 +0000 (16:45 -0400)] 
Fix python bindings' Makefile for out-of-tree builds

The references to the built archives should use top_builddir and not
top_srcdir, because that's where they are.

And new in V2, I got a new error:

  lttng_wrap.c:2970:25: fatal error: lttng/lttng.h: No such file or directory
   #include <lttng/lttng.h>

I think we are missing the -I$(top_srcdir)/include. I had not noticed this
previously, probably because I had an lttng/lttng.h in
/usr/local/include or /usr/include. Also, the other includes seem
unnecessary. The This is not really related to out-of-tree builds though.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: use LIBS instead of AM_LDFLAGS for dl and c linking
Jonathan Rajotte [Mon, 13 Apr 2015 18:53:04 +0000 (14:53 -0400)] 
Fix: use LIBS instead of AM_LDFLAGS for dl and c linking

The change to --as-needed on linking of the tool chain on Debian based dist
break the build. This fix aim to generalize the linking and be
independent of the distribution choice of base parameter for the linking
process.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Add missing -ldl when checking for lttng-ust
Jérémie Galarneau [Fri, 10 Apr 2015 23:08:03 +0000 (19:08 -0400)] 
Fix: Add missing -ldl when checking for lttng-ust

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoclock plugin: increase offset measurement accuracy
Mathieu Desnoyers [Sun, 12 Oct 2014 11:46:20 +0000 (13:46 +0200)] 
clock plugin: increase offset measurement accuracy

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoImplement UST clock override plugin support
Mathieu Desnoyers [Wed, 1 Oct 2014 21:59:20 +0000 (17:59 -0400)] 
Implement UST clock override plugin support

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: ownership of filter and filter_expression
Mathieu Desnoyers [Mon, 6 Apr 2015 16:17:20 +0000 (12:17 -0400)] 
Fix: ownership of filter and filter_expression

Applies to the kernel wildcard feature.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: zero memory passed to create channel kernel ioctl
Mathieu Desnoyers [Mon, 6 Apr 2015 16:16:11 +0000 (12:16 -0400)] 
Fix: zero memory passed to create channel kernel ioctl

Valgrind complains about uninitialized memory passed to ioctl.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Check that lttng create --live's time is not zero
Jérémie Galarneau [Thu, 2 Apr 2015 22:44:58 +0000 (18:44 -0400)] 
Fix: Check that lttng create --live's time is not zero

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Validate lttng_create_session_live's timer is > 0
Jérémie Galarneau [Thu, 2 Apr 2015 22:37:18 +0000 (18:37 -0400)] 
Fix: Validate lttng_create_session_live's timer is > 0

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoUI: Only show live timer when the session is in live mode
Jérémie Galarneau [Thu, 2 Apr 2015 22:09:29 +0000 (18:09 -0400)] 
UI: Only show live timer when the session is in live mode

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoUI: Only show tracker PID state when enabled
Jérémie Galarneau [Thu, 2 Apr 2015 22:07:45 +0000 (18:07 -0400)] 
UI: Only show tracker PID state when enabled

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoImplement kernel filter support
Mathieu Desnoyers [Tue, 11 Nov 2014 21:31:40 +0000 (16:31 -0500)] 
Implement kernel filter support

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agosyscall tracing: update tests
Mathieu Desnoyers [Wed, 5 Nov 2014 21:54:48 +0000 (16:54 -0500)] 
syscall tracing: update tests

Update syscall tracing tests following the semantic changes of enablers
in lttng-modules and disable behavior of lttng-sessiond.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoSupport lttng-modules syscall wildcards
Mathieu Desnoyers [Wed, 5 Nov 2014 00:14:19 +0000 (19:14 -0500)] 
Support lttng-modules syscall wildcards

While we are there, fix semantic issues with disable-event and various
types of instrumentation.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoImplement lttng-modules tracepoint wildcard support
Mathieu Desnoyers [Mon, 3 Nov 2014 20:52:36 +0000 (15:52 -0500)] 
Implement lttng-modules tracepoint wildcard support

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix build when configuring with --disable-lttng-ust
Jérémie Galarneau [Tue, 31 Mar 2015 20:02:17 +0000 (16:02 -0400)] 
Fix build when configuring with --disable-lttng-ust

Mark trace_ust_list_tracker_pids as static inline to eliminate
"multiple definition" error.

Fix ust_app_global_update() stub to reflect the signature change
introduced by a9ad0c8f

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: add missing function prototype to trace-ust.h header
Mathieu Desnoyers [Fri, 20 Mar 2015 19:16:11 +0000 (15:16 -0400)] 
Fix: add missing function prototype to trace-ust.h header

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoImplement PID tracker content listing
Mathieu Desnoyers [Wed, 28 Jan 2015 14:50:07 +0000 (09:50 -0500)] 
Implement PID tracker content listing

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoImplement UST PID tracker
Mathieu Desnoyers [Mon, 26 Jan 2015 19:01:12 +0000 (14:01 -0500)] 
Implement UST PID tracker

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoCleanup: Remove unimplemented UST domains
Mathieu Desnoyers [Sun, 25 Jan 2015 15:08:10 +0000 (10:08 -0500)] 
Cleanup: Remove unimplemented UST domains

They will be implemented as options of the UST domains.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoImplement PID tracking for kernel tracing
Mathieu Desnoyers [Sat, 27 Sep 2014 21:29:12 +0000 (17:29 -0400)] 
Implement PID tracking for kernel tracing

Implement PID tracking (per-session) for kernel tracing. Only
save/restore and MI are missing.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: leak on error in lttng-crash
Mathieu Desnoyers [Fri, 27 Mar 2015 19:52:00 +0000 (15:52 -0400)] 
Fix: leak on error in lttng-crash

Found by Coverity:
** CID 1291945:  Resource leaks  (RESOURCE_LEAK)
/src/bin/lttng-crash/lttng-crash.c: 769 in copy_crash_data()

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoMan page fixes: missing --version option and typo
Jérémie Galarneau [Thu, 26 Mar 2015 21:38:17 +0000 (17:38 -0400)] 
Man page fixes: missing --version option and typo

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoDocs: add lttng-crash(1) man page
Jérémie Galarneau [Thu, 26 Mar 2015 21:37:07 +0000 (17:37 -0400)] 
Docs: add lttng-crash(1) man page

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoDocs: lttng-crash refers to "lttng"
Jérémie Galarneau [Thu, 26 Mar 2015 21:21:07 +0000 (17:21 -0400)] 
Docs: lttng-crash refers to "lttng"

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: possible use of uninitialized data in loglevel conversion funcs
Jérémie Galarneau [Thu, 26 Mar 2015 19:07:35 +0000 (15:07 -0400)] 
Fix: possible use of uninitialized data in loglevel conversion funcs

str will be uninitialized if inputstr[0] == '\0'

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: possible evaluation of garbage values in fini_validation_ctx()
Jérémie Galarneau [Thu, 26 Mar 2015 19:02:40 +0000 (15:02 -0400)] 
Fix: possible evaluation of garbage values in fini_validation_ctx()

Zero-out struct validation_ctx on creation.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoCleanup: Remove stale #ifdef-ed-out code from spawn_viewer()
Jérémie Galarneau [Thu, 26 Mar 2015 18:57:59 +0000 (14:57 -0400)] 
Cleanup: Remove stale #ifdef-ed-out code from spawn_viewer()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Possible call to execvp with NULL argument on allocation failure
Jérémie Galarneau [Thu, 26 Mar 2015 18:57:50 +0000 (14:57 -0400)] 
Fix: Possible call to execvp with NULL argument on allocation failure

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Possible call to strtoul() with NULL argument
Jérémie Galarneau [Thu, 26 Mar 2015 18:49:52 +0000 (14:49 -0400)] 
Fix: Possible call to strtoul() with NULL argument

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoDocs: clarify lttng.1 shm-path section
Jérémie Galarneau [Thu, 26 Mar 2015 16:51:31 +0000 (12:51 -0400)] 
Docs: clarify lttng.1 shm-path section

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Missing return value check in extract_trace_recursive()
Jérémie Galarneau [Wed, 25 Mar 2015 22:29:29 +0000 (18:29 -0400)] 
Fix: Missing return value check in extract_trace_recursive()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: recursive_rmdir: empty all empty subdir
Mathieu Desnoyers [Thu, 18 Dec 2014 03:28:04 +0000 (22:28 -0500)] 
Fix: recursive_rmdir: empty all empty subdir

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoMove file creation/unlink from liblttng-ust-ctl to consumerd
Mathieu Desnoyers [Tue, 16 Dec 2014 01:24:46 +0000 (20:24 -0500)] 
Move file creation/unlink from liblttng-ust-ctl to consumerd

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agolttng-crash: support recursive traces
Mathieu Desnoyers [Mon, 15 Dec 2014 03:56:04 +0000 (22:56 -0500)] 
lttng-crash: support recursive traces

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoshm-path: remove directory hierarchy on destroy
Mathieu Desnoyers [Mon, 15 Dec 2014 03:29:53 +0000 (22:29 -0500)] 
shm-path: remove directory hierarchy on destroy

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoImplement --shm-path option for UST sessions (per-uid channels)
Mathieu Desnoyers [Tue, 8 Jul 2014 14:12:23 +0000 (10:12 -0400)] 
Implement --shm-path option for UST sessions (per-uid channels)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoCleanup: Reduce scope of connections in main relayd thread
Jérémie Galarneau [Fri, 27 Feb 2015 16:34:44 +0000 (11:34 -0500)] 
Cleanup: Reduce scope of connections in main relayd thread

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoCleanup: Reduce scope of relayd connections in live thread
Jérémie Galarneau [Fri, 27 Feb 2015 16:34:04 +0000 (11:34 -0500)] 
Cleanup: Reduce scope of relayd connections in live thread

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoDocs: connection_find_by_sock() must be called with rcu_read_lock
Jérémie Galarneau [Fri, 27 Feb 2015 04:09:35 +0000 (23:09 -0500)] 
Docs: connection_find_by_sock() must be called with rcu_read_lock

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoRename current release as 2.7.0-pre
Jérémie Galarneau [Fri, 13 Feb 2015 17:23:02 +0000 (12:23 -0500)] 
Rename current release as 2.7.0-pre

This change is introduced to make the release name clearer than "master"
which may be misleading.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoDocs: grammar fix in Makefile
Jérémie Galarneau [Fri, 13 Feb 2015 16:57:54 +0000 (11:57 -0500)] 
Docs: grammar fix in Makefile

runned -> ran

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoChange release name to master
Jérémie Galarneau [Fri, 13 Feb 2015 16:52:06 +0000 (11:52 -0500)] 
Change release name to master

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoconfigure: add type availability checking
Jonathan Rajotte [Mon, 2 Feb 2015 21:33:57 +0000 (16:33 -0500)] 
configure: add type availability checking

Based on autoscan diagnostic

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoconfigure: add check for compiler inline keyword support
Jonathan Rajotte [Mon, 2 Feb 2015 21:33:56 +0000 (16:33 -0500)] 
configure: add check for compiler inline keyword support

Check support of the inline keyword by the compiler.
If not supported, inline is replaced by the appropriate keyword or nothing.[1]

Based on autoscan diagnostic

[1]http://www.gnu.org/software/autoconf/manual/autoconf.html#AC_005fC_005fINLINE

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoconfigure: missing check for needed header
Jonathan Rajotte [Mon, 2 Feb 2015 21:33:55 +0000 (16:33 -0500)] 
configure: missing check for needed header

Based on autoscan diagnostic:

autoscan: warning: missing AC_CHECK_HEADERS([arpa/inet.h]) wanted by:
src/common/uri.c:21
src/common/sessiond-comm/sessiond-comm.h:38
src/bin/lttng/utils.c:28
autoscan: warning: missing AC_CHECK_HEADERS([netdb.h]) wanted by:
src/common/uri.c:22
autoscan: warning: missing AC_CHECK_HEADERS([netinet/in.h]) wanted by:
src/common/uri.h:21
src/common/sessiond-comm/sessiond-comm.h:39
src/bin/lttng/utils.c:27
autoscan: warning: missing AC_CHECK_HEADERS([paths.h]) wanted by:
src/common/daemonize.c:22
src/bin/lttng-sessiond/main.c:25
autoscan: warning: missing AC_CHECK_HEADERS([stddef.h]) wanted by:
src/common/defaults.c:20
src/common/hashtable/rculfhash-mm-chunk.c:25
src/bin/lttng-sessiond/ust-clock.h:26
autoscan: warning: missing AC_CHECK_HEADERS([sys/file.h]) wanted by:
src/common/utils.c:34
autoscan: warning: missing AC_CHECK_HEADERS([sys/ioctl.h]) wanted by:
src/common/kernel-ctl/kernel-ctl.c:22
autoscan: warning: missing AC_CHECK_HEADERS([sys/mount.h]) wanted by:
src/bin/lttng-sessiond/main.c:33
src/bin/lttng-relayd/live.c:30
src/bin/lttng-relayd/main.c:31
autoscan: warning: missing AC_CHECK_HEADERS([sys/param.h]) wanted by:
src/common/hashtable/utils.c:57
autoscan: warning: missing AC_CHECK_HEADERS([sys/time.h]) wanted by:
src/common/compat/compat-poll.c:23
src/bin/lttng-sessiond/ust-clock.h:24
src/bin/lttng-sessiond/fd-limit.c:21

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoconfigure: missing check of functions
Jonathan Rajotte [Mon, 2 Feb 2015 21:33:54 +0000 (16:33 -0500)] 
configure: missing check of functions

Based on autoscan diagnostic

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: test: log4j: missing static test files for dist and out of tree build
Jonathan Rajotte [Fri, 30 Jan 2015 22:04:57 +0000 (17:04 -0500)] 
Fix: test: log4j: missing static test files for dist and out of tree build

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
9 years agoFix: test: java-jul:missing static test files for dist and out of tree build
Jonathan Rajotte [Fri, 30 Jan 2015 22:04:56 +0000 (17:04 -0500)] 
Fix: test: java-jul:missing static test files for dist and out of tree build

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
9 years agoFix: out-of-tree build: missing xsd file for mi test execution
Jonathan Rajotte [Fri, 30 Jan 2015 18:30:11 +0000 (13:30 -0500)] 
Fix: out-of-tree build: missing xsd file for mi test execution

This need to be backported to stable 2.6.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: out-of-tree build: missing xsd file for save-load test execution
Jonathan Rajotte [Fri, 30 Jan 2015 18:30:10 +0000 (13:30 -0500)] 
Fix: out-of-tree build: missing xsd file for save-load test execution

This need to be backported to stable 2.6 and stable 2.5

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoCleanup: remove unused end_no_session label in ust_app_flush_session()
Jérémie Galarneau [Fri, 30 Jan 2015 06:47:56 +0000 (01:47 -0500)] 
Cleanup: remove unused end_no_session label in ust_app_flush_session()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoCleanup: Remove unused "end" label in push_metadata()
Jérémie Galarneau [Fri, 30 Jan 2015 06:47:11 +0000 (01:47 -0500)] 
Cleanup: Remove unused "end" label in push_metadata()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoTests: Run health check test_thread_ok as part of root_regression
Jérémie Galarneau [Mon, 26 Jan 2015 17:14:13 +0000 (12:14 -0500)] 
Tests: Run health check test_thread_ok as part of root_regression

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: deadlock between UST registry lock and consumer lock
Mathieu Desnoyers [Fri, 23 Jan 2015 16:29:00 +0000 (11:29 -0500)] 
Fix: deadlock between UST registry lock and consumer lock

Reorganize locking of ust registry and consumer socket communication.

commit ce34fcd0 "Fix: per-uid flush and ust registry locking" attempted
to fix locking related to the UST registry, but doing so introduced a
deadlock. The actual solution is to reverse the order in which the UST
registry and the consumer lock nest: the UST registry will now to
responsible for serializing the registry content, and the consumer lock
will only protect communication with the consumer, as it should. This
deals with a TODO in the code.

The reason why this was not done from the beginning is that there was
originally an intent to make sure the ust registry lock is not held for
a long time, thus not while communicating with the consumer daemon.
However, when live has been implemented, it required communication with
the consumer daemon while the ust registry is held anyway. Therefore,
there is not much point anymore in trying to make sure this lock is not
held across the communication with consumerd in push_metadata. This
allows us to greatly simplify locking of the UST registry.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: uninitialized return value
Mathieu Desnoyers [Fri, 23 Jan 2015 16:28:59 +0000 (11:28 -0500)] 
Fix: uninitialized return value

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: build failure using disable-lttng-ust configure option
Jérémie Galarneau [Thu, 22 Jan 2015 20:17:34 +0000 (15:17 -0500)] 
Fix: build failure using disable-lttng-ust configure option

A stub for ust_app_get_size_one_more_packet_per_stream() is missing
which causes the build to fail when using the --disable-lttng-ust
configuration option.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoCleanup: Remove unused variable
Jérémie Galarneau [Thu, 22 Jan 2015 20:04:35 +0000 (15:04 -0500)] 
Cleanup: Remove unused variable

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: setuid/setgid daemons should not get sensitive env. var./args
Mathieu Desnoyers [Fri, 16 Jan 2015 17:48:20 +0000 (12:48 -0500)] 
Fix: setuid/setgid daemons should not get sensitive env. var./args

Also, don't allow lttng command line interface to run as setuid/setgid
binary.

Fixes #780

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: grab more than one packet for snapshots
Mathieu Desnoyers [Thu, 15 Jan 2015 22:24:27 +0000 (17:24 -0500)] 
Fix: grab more than one packet for snapshots

There are a few issues with snapshot size: when taking a snapshot
without specifying any "max size" (should be unlimited), only a single
packet from each stream is saved. We expect all stream available content
to be saved. There is a similar issue when a max size is specified.

Also, trying to make all streams save as much data has unexpected
corner-cases: for instance, if we have this configuration:
- kernel channels: 2 subbuffers of 1MB x 8 CPUs
- per-PID UST channels: 16 subbuffers of 4kB x 8 CPUs x 100 apps

would require the user to have a very large max size, since it would try
to fit (8 + (100 * 8)) * 1MB = 808MB of sub-buffers, else it would fail.
This issue here is using the largest subbuffer size as the criterion
applied to all channels.

We fix those issues by simplifying the algorithm used to calculate how
much data to grab. Rather than calculating the size to grab from each
stream, we calculate a number of packets to grab. It fails if we cannot
grab at least one packet from each stream in the session. Then checks if
it can grab 2 packets from each stream, and so on, until there is no
more space available (based on max size). This is not a perfect
solution, but has the merit of being simple to understand, and has no
(or few) unexpected corner-cases.

Fixes #860

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: per-uid flush and ust registry locking
Mathieu Desnoyers [Thu, 15 Jan 2015 22:24:26 +0000 (17:24 -0500)] 
Fix: per-uid flush and ust registry locking

Commit c4b88406 "Fix: ust-app: per-PID app unregister vs tracing stop
races" introduces a regression for per-UID flush. It can be triggered by
the test_high_throughput_limits (root regression) test. For per-UID
tracing, we need to use the registry channel ID, not the per-application
channel ID, when asking the consumer daemon to flush.

When doing this fix, we notice that the locking rules of push_metadata()
are weird. A per-ust app session lock is protecting registry data, which
makes it impossible to call push_metadata from a ust session level (for
the entire session) in the case of per-UID tracing. Moreover, it's
unclear how holding a per-application lock can protect a registry shared
across applications in per-UID tracing. Therefore, we move all accesses
to the registry metadata_key and metadata_closed fields into the
registry lock critical section. We now only rely on RCU to ensure
existance of registry across push_metadata(), rather than relying on the
per-application session lock.

It also takes care of a documentation vs code mismatch: push_metadata()
documents that "The session lock MUST be acquired here before calling
this.", but in reality, it's the application session lock which is held
across those calls. Removing this requirement, and relying on RCU
instead, fixes this mismatch.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoDocs: Missing optional dependency on lttng-ust in README.md
Jérémie Galarneau [Thu, 15 Jan 2015 20:39:20 +0000 (15:39 -0500)] 
Docs: Missing optional dependency on lttng-ust in README.md

Reported-by: Jonathan Rajotte <jonathan.rajotte@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoDocs: Grammar fixes in the lttng manpage
Jérémie Galarneau [Wed, 14 Jan 2015 23:41:10 +0000 (18:41 -0500)] 
Docs: Grammar fixes in the lttng manpage

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: add missing UST perf counter support check
Mathieu Desnoyers [Mon, 12 Jan 2015 22:14:52 +0000 (17:14 -0500)] 
Fix: add missing UST perf counter support check

Report whether performance counters are supported by UST on the
architecture as soon as the user try to enable a perf counter context.

Fixes #851

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: tests: integer too large for long type
Mathieu Desnoyers [Tue, 2 Dec 2014 22:21:12 +0000 (17:21 -0500)] 
Fix: tests: integer too large for long type

Compiler warns on 32-bit builds.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: undefined operation on last_relay_viewer_session_id
Mathieu Desnoyers [Tue, 2 Dec 2014 22:21:11 +0000 (17:21 -0500)] 
Fix: undefined operation on last_relay_viewer_session_id

Triggers compiler warning on 32-bit build.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: print format type mismatch
Mathieu Desnoyers [Tue, 2 Dec 2014 22:21:10 +0000 (17:21 -0500)] 
Fix: print format type mismatch

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: print format type mismatch
Mathieu Desnoyers [Tue, 2 Dec 2014 22:21:09 +0000 (17:21 -0500)] 
Fix: print format type mismatch

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Remove structurally dead code from relayd
Jérémie Galarneau [Thu, 8 Jan 2015 23:06:20 +0000 (18:06 -0500)] 
Fix: Remove structurally dead code from relayd

CID 1262070:  Structurally dead code  (UNREACHABLE)

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoCleanup: Remove logically dead code
Jérémie Galarneau [Thu, 8 Jan 2015 22:57:11 +0000 (17:57 -0500)] 
Cleanup: Remove logically dead code

*** CID 1262071:  Logically dead code  (DEADCODE)
/src/bin/lttng-sessiond/ht-cleanup.c: 130 in thread_ht_cleanup()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoCleanup: Remove unused label
Jérémie Galarneau [Thu, 8 Jan 2015 21:02:13 +0000 (16:02 -0500)] 
Cleanup: Remove unused label

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Remove unused argument in debug statement
Jérémie Galarneau [Thu, 8 Jan 2015 20:43:24 +0000 (15:43 -0500)] 
Fix: Remove unused argument in debug statement

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