lttng-tools.git
7 years agoRename normal_* template to discard_* template-1
Jonathan Rajotte [Tue, 5 Jul 2016 22:10:17 +0000 (18:10 -0400)] 
Rename normal_* template to discard_*

7 years agoCompletion: add --template-path to bash completion for directory listing
Jonathan Rajotte [Mon, 4 Jul 2016 19:35:45 +0000 (15:35 -0400)] 
Completion: add --template-path to bash completion for directory listing

7 years agoTemplate: add session templates.
Jonathan Rajotte [Mon, 4 Jul 2016 19:33:25 +0000 (15:33 -0400)] 
Template: add session templates.

For now session type is cast in stone based on the passed template.

7 years agoDocs: document new --default-output option of create command
Jérémie Galarneau [Wed, 15 Jun 2016 20:59:14 +0000 (16:59 -0400)] 
Docs: document new --default-output option of create command

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoImplement --default-output option of create command
Jérémie Galarneau [Wed, 15 Jun 2016 20:59:51 +0000 (16:59 -0400)] 
Implement --default-output option of create command

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoDocs: document create command --default-name option
Jérémie Galarneau [Wed, 15 Jun 2016 20:57:27 +0000 (16:57 -0400)] 
Docs: document create command --default-name option

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoImplement create command --default-name option
Jérémie Galarneau [Wed, 15 Jun 2016 20:58:54 +0000 (16:58 -0400)] 
Implement create command --default-name option

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix format and variable name create.c
Jonathan Rajotte [Thu, 9 Jun 2016 15:15:59 +0000 (11:15 -0400)] 
Fix format and variable name create.c

7 years agoFix: generate a full output configuration node
Jonathan Rajotte [Mon, 4 Jul 2016 19:29:56 +0000 (15:29 -0400)] 
Fix: generate a full output configuration node

The lttng save --omit-output does not remove the destination node but the full
output node. Make sure to create a full one.

7 years agoFix: memory management in create.c
Jonathan Rajotte [Thu, 9 Jun 2016 15:14:22 +0000 (11:14 -0400)] 
Fix: memory management in create.c

7 years agoFix: use temporary data for return of asprintf
Jonathan Rajotte [Thu, 9 Jun 2016 15:13:09 +0000 (11:13 -0400)] 
Fix: use temporary data for return of asprintf

7 years agoFix session-config: mem leak and uninitialized ret value
Jonathan Rajotte [Thu, 9 Jun 2016 15:10:50 +0000 (11:10 -0400)] 
Fix session-config: mem leak and uninitialized ret value

7 years agoCreate template: Allow empty destination and name
Jonathan Rajotte [Wed, 8 Jun 2016 01:50:52 +0000 (21:50 -0400)] 
Create template: Allow empty destination and name

Allow template with empty name and no destination so create generate them.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
7 years agoTest: template on create session
Jonathan Rajotte [Wed, 8 Jun 2016 01:46:42 +0000 (21:46 -0400)] 
Test: template on create session

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
7 years agoMan: create --template-path
Jonathan Rajotte [Tue, 28 Jun 2016 19:05:09 +0000 (15:05 -0400)] 
Man: create --template-path

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
7 years agoFix: use named enums
Jonathan Rajotte [Tue, 28 Jun 2016 19:45:25 +0000 (15:45 -0400)] 
Fix: use named enums

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
7 years agoFix: check return of parse_template
Jonathan Rajotte [Tue, 28 Jun 2016 22:23:00 +0000 (18:23 -0400)] 
Fix: check return of parse_template

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
7 years agoFix: check return value of config_document_replace_element
Jonathan Rajotte [Wed, 29 Jun 2016 15:07:27 +0000 (11:07 -0400)] 
Fix: check return value of config_document_replace_element

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
7 years agoCreate commands template feature.
Jonathan Rajotte [Tue, 28 Jun 2016 19:36:00 +0000 (15:36 -0400)] 
Create commands template feature.

Introduce a new option the create command: --template-path.

The template-path option take a path to a specific template file that follow the
saved sessions schema definition (src/common/config/session.xsd).

Other "create" options are still effective except the mode options for now.

Regular options have priority on the template values and overwrite the
values found in the template.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
7 years agoAllow optional snapshot name and max_size
Jonathan Rajotte [Mon, 4 Jul 2016 19:25:54 +0000 (15:25 -0400)] 
Allow optional snapshot name and max_size

Generate a default name and give the default max size if not defined.

7 years agoFix: missing goto error on null pointer
Jonathan Rajotte [Wed, 29 Jun 2016 15:29:08 +0000 (11:29 -0400)] 
Fix: missing goto error on null pointer

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
7 years agoConfig: utility functions for direct configurations element manipulations
Jonathan Rajotte [Tue, 28 Jun 2016 19:30:27 +0000 (15:30 -0400)] 
Config: utility functions for direct configurations element manipulations

Introduce two new config struct: config_document and config_element.

config_document represent an instance of a complete configuration (xmlDoc).
config_element represent an instance of a sub configuration element (xmlNode).

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
7 years agoAdd error code related to templates handling
Jonathan Rajotte [Mon, 27 Jun 2016 19:08:10 +0000 (15:08 -0400)] 
Add error code related to templates handling

7 years agoDoc: via -> using
Jonathan Rajotte [Tue, 28 Jun 2016 19:56:16 +0000 (15:56 -0400)] 
Doc: via -> using

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
7 years agoFix: clear error message
Jonathan Rajotte [Tue, 28 Jun 2016 19:55:35 +0000 (15:55 -0400)] 
Fix: clear error message

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
7 years agoFix error message on asprintf
Jonathan Rajotte [Tue, 28 Jun 2016 20:24:59 +0000 (16:24 -0400)] 
Fix error message on asprintf

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
7 years agoFix whitespace
Jonathan Rajotte [Tue, 28 Jun 2016 20:24:39 +0000 (16:24 -0400)] 
Fix whitespace

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
7 years agoFix: make sure ctrl & data url are set for post creation configuration
Jonathan Rajotte [Tue, 28 Jun 2016 20:16:54 +0000 (16:16 -0400)] 
Fix: make sure ctrl & data url are set for post creation configuration

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
7 years agoFix: comment for errors propagation
Jonathan Rajotte [Tue, 28 Jun 2016 20:11:07 +0000 (16:11 -0400)] 
Fix: comment for errors propagation

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
7 years agoFix: use -1 for unknown values of enums
Jonathan Rajotte [Tue, 28 Jun 2016 19:42:50 +0000 (15:42 -0400)] 
Fix: use -1 for unknown values of enums

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
7 years agorefactor: split create_session in 4 functions
Jonathan Rajotte [Wed, 8 Jun 2016 02:02:05 +0000 (22:02 -0400)] 
refactor: split create_session in 4 functions

validate_command: checks for invalid options configuration
create_session_basic: responsible for session creation and configuration
generate_output: responsible of outputting the info to the user

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
7 years agoDocs: document new save command options (--omit-name/--omit-output)
Jérémie Galarneau [Tue, 14 Jun 2016 22:14:49 +0000 (18:14 -0400)] 
Docs: document new save command options (--omit-name/--omit-output)

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoHonor omit_name and omit_output options in sessiond save command
Jérémie Galarneau [Tue, 14 Jun 2016 18:53:56 +0000 (14:53 -0400)] 
Honor omit_name and omit_output options in sessiond save command

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoAllow nameless sessions in session.xsd
Jérémie Galarneau [Tue, 14 Jun 2016 18:53:37 +0000 (14:53 -0400)] 
Allow nameless sessions in session.xsd

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoAdd --omit-name and --omit-output options to the save command
Jérémie Galarneau [Tue, 14 Jun 2016 16:42:01 +0000 (12:42 -0400)] 
Add --omit-name and --omit-output options to the save command

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>
7 years agoAdd name omission and output omission on save to lttng-ctl
Jérémie Galarneau [Tue, 14 Jun 2016 16:36:07 +0000 (12:36 -0400)] 
Add name omission and output omission on save to lttng-ctl

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoExpress overwrite attribute as a byte in communication protocol
Jérémie Galarneau [Tue, 14 Jun 2016 16:30:37 +0000 (12:30 -0400)] 
Express overwrite attribute as a byte in communication protocol

There is no need for 4 bytes to express a boolean state.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoAssert that a valid clean-up pipe exists on ht_cleanup_push
Jérémie Galarneau [Tue, 14 Jun 2016 16:29:24 +0000 (12:29 -0400)] 
Assert that a valid clean-up pipe exists on ht_cleanup_push

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: do not refer to objects as .o
Michael Jeanson [Thu, 9 Jun 2016 19:11:33 +0000 (15:11 -0400)] 
Fix: do not refer to objects as .o

The extension of object files is platform dependant,
use $(OBJEXT) instead of .o when referring to objects.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: do not link against libtool .o objects
Michael Jeanson [Thu, 9 Jun 2016 19:11:32 +0000 (15:11 -0400)] 
Fix: do not link against libtool .o objects

We should not link against libtool objects directly
since they have different names in static or shared
only build. Instead link on the full .la

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: Define MANPATH in config.h
Michael Jeanson [Thu, 9 Jun 2016 19:11:31 +0000 (15:11 -0400)] 
Fix: Define MANPATH in config.h

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTests: Make warn_processes.sh more portable
Michael Jeanson [Thu, 9 Jun 2016 16:21:31 +0000 (12:21 -0400)] 
Tests: Make warn_processes.sh more portable

Options to pgrep aren't standardised across coreutils
implementations, use a more common option.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: add missing script to dist
Michael Jeanson [Thu, 9 Jun 2016 16:21:30 +0000 (12:21 -0400)] 
Fix: add missing script to dist

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: leak of UST app hash tables
Jérémie Galarneau [Thu, 9 Jun 2016 20:14:28 +0000 (16:14 -0400)] 
Fix: leak of UST app hash tables

The ht_cleanup thread is shut down before the queue of rcu
callbacks is emptied by the rcu_barrier(). Since callbacks added
by call_rcu can push hash tables through the ht_cleanup pipe, we run
into cases where the clean-up thread has been shutdown and
hash tables pushed through the clean-up pipe are leaked.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: leak of reply buffer on data pending check
Jérémie Galarneau [Wed, 8 Jun 2016 20:42:27 +0000 (16:42 -0400)] 
Fix: leak of reply buffer on data pending check

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: call xmlCleanupParser to free global libxml2 allocations
Jérémie Galarneau [Wed, 8 Jun 2016 17:31:13 +0000 (13:31 -0400)] 
Fix: call xmlCleanupParser to free global libxml2 allocations

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: missing "void" parameter of lib constructor and destructor
Jérémie Galarneau [Wed, 8 Jun 2016 17:28:38 +0000 (13:28 -0400)] 
Fix: missing "void" parameter of lib constructor and destructor

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoDocs: fix comment typos in lttng-sessiond's main.c
Jérémie Galarneau [Fri, 3 Jun 2016 18:11:44 +0000 (14:11 -0400)] 
Docs: fix comment typos in lttng-sessiond's main.c

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: lttng-relayd allow binding of privileged ports for non-root users
Jérémie Galarneau [Fri, 3 Jun 2016 18:05:21 +0000 (14:05 -0400)] 
Fix: lttng-relayd allow binding of privileged ports for non-root users

Non-root users could use authbind to bind to low-numbered ports.
Moreover, the check was inverted; !getuid() will only be true
for the root user.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agorelayd: optimize receive throughput
Mathieu Desnoyers [Thu, 2 Jun 2016 20:27:36 +0000 (22:27 +0200)] 
relayd: optimize receive throughput

For channels configured with large sub-buffer size, the relayd copies
the entire trace sub-buffer (trace packet) into a large buffer, and then
copies the large buffer to disk. It is inefficient from a point of view
of cache locality.

Use a 64k buffer on the stack instead, and move the data piece-wise.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoClean-up: harmonize kernctl API error checking
Jérémie Galarneau [Thu, 2 Jun 2016 10:13:48 +0000 (06:13 -0400)] 
Clean-up: harmonize kernctl API error checking

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoIntroduce LTTNG_IOCTL_CHECK and LTTNG_IOCTL_NO_CHECK macros
Jérémie Galarneau [Thu, 2 Jun 2016 21:36:03 +0000 (17:36 -0400)] 
Introduce LTTNG_IOCTL_CHECK and LTTNG_IOCTL_NO_CHECK macros

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: enforce assumption that lttng-modules ioctl() return <= 0
Jérémie Galarneau [Thu, 2 Jun 2016 09:56:28 +0000 (05:56 -0400)] 
Fix: enforce assumption that lttng-modules ioctl() return <= 0

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: reduce scope of kconsumer consumed_pos and produced_pos
Jérémie Galarneau [Thu, 2 Jun 2016 09:19:50 +0000 (05:19 -0400)] 
Fix: reduce scope of kconsumer consumed_pos and produced_pos

The consumed_pos and produced_pos accesses are protected by the
stream mutex, which is fine as-is. However, consumed_pos is
passed to consumer_get_consume_start_pos() and is flagged by
Coverity as a possible use of a "stale" consumed_pos.

From an analyzer's standpoint, this makes sense since
both lttng_kconsumer_get_produced_snapshot() and
lttng_kconsumer_get_consumed_snapshot() could leave their output
parameter uninitialized and return 0 since they both  assume that
ioctl() will set errno if ret != 0.

IOCTL(3P) specifies that errno is only set if ret < 0.

A bug in lttng-modules could cause ioctl() to return a positive
value, leaving the errno variable unset. In such a case,
both functions would return 0, leaving the positions uninitialized.

A follow-up fix enforces this assumption (ret never > 0) as part
of the kernctl API.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoDocs: document safety of consumer_thread_is_ready access
Jérémie Galarneau [Thu, 2 Jun 2016 09:03:26 +0000 (05:03 -0400)] 
Docs: document safety of consumer_thread_is_ready access

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoClean-up: unused ret values in thread_manage_health
Jérémie Galarneau [Thu, 2 Jun 2016 08:38:43 +0000 (04:38 -0400)] 
Clean-up: unused ret values in thread_manage_health

Reported by Coverity as:
CID 1243014 (#1 of 15): Unused value (UNUSED_VALUE)

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoClean-up: remove dead code in sessiond's set_option()
Jérémie Galarneau [Thu, 2 Jun 2016 08:18:36 +0000 (04:18 -0400)] 
Clean-up: remove dead code in sessiond's set_option()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: set the logger level to prevent unexpected level inheritance
Jonathan Rajotte [Thu, 26 May 2016 22:14:37 +0000 (18:14 -0400)] 
Fix: set the logger level to prevent unexpected level inheritance

BSF and other jars can ship with an embedded log4j.properties
file. This causes problem when launching an application with a general
class path (e.g /usr/share/java/*) since log4j will look for a
configuration file in all loaded jars. If any contains a directive for
the root logger, it will affect any logger with no level that are
directly under the root logger. This can result in an unexpected
behaviour (e.g no events triggered etc.).

Link: https://issues.apache.org/jira/browse/BSF-24
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTypo: Stoping -> Stopping
Michael Jeanson [Tue, 24 May 2016 18:28:46 +0000 (14:28 -0400)] 
Typo: Stoping -> Stopping

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTypo: occured -> occurred
Michael Jeanson [Tue, 24 May 2016 18:28:45 +0000 (14:28 -0400)] 
Typo: occured -> occurred

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: only perform lttng_consumer_sync_trace_file() in local mode
Jérémie Galarneau [Thu, 19 May 2016 22:48:16 +0000 (18:48 -0400)] 
Fix: only perform lttng_consumer_sync_trace_file() in local mode

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoMake lttng_consumer_sync_trace_file static
Jérémie Galarneau [Thu, 19 May 2016 22:47:54 +0000 (18:47 -0400)] 
Make lttng_consumer_sync_trace_file static

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: don't negate posix_fadvise return value to check error
Jérémie Galarneau [Thu, 19 May 2016 22:24:20 +0000 (18:24 -0400)] 
Fix: don't negate posix_fadvise return value to check error

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix Solaris 10 build: use lttng_strnlen() wrapper
Jérémie Galarneau [Thu, 19 May 2016 22:16:48 +0000 (18:16 -0400)] 
Fix Solaris 10 build: use lttng_strnlen() wrapper

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoRename lttng_error_type to lttng_error_level
Jérémie Galarneau [Thu, 19 May 2016 18:20:08 +0000 (14:20 -0400)] 
Rename lttng_error_type to lttng_error_level

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoCleanup error.h __lttng_print() used for message printing
Mathieu Desnoyers [Thu, 19 May 2016 15:57:45 +0000 (11:57 -0400)] 
Cleanup error.h __lttng_print() used for message printing

The loglevels have never really been a mask, and it is useless to try to
use them as masks, because the compiler statically knows the value of
the loglevel requested, and can therefore optimise away all the logic.

This takes care of Coverity warning about mixed bitwise and boolean
logic, which was technically correct, but more complex than needed.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoUpdate coding style document for macro style
Mathieu Desnoyers [Thu, 19 May 2016 15:57:44 +0000 (11:57 -0400)] 
Update coding style document for macro style

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: coding style document has erroneous semicolon at end of macro
Mathieu Desnoyers [Thu, 19 May 2016 15:57:43 +0000 (11:57 -0400)] 
Fix: coding style document has erroneous semicolon at end of macro

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: add missing semicolons after MSG, DBG, ERR print macros
Mathieu Desnoyers [Thu, 19 May 2016 15:57:42 +0000 (11:57 -0400)] 
Fix: add missing semicolons after MSG, DBG, ERR print macros

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTests: inverted condition in test_kernel_data
Jérémie Galarneau [Thu, 19 May 2016 05:35:44 +0000 (01:35 -0400)] 
Tests: inverted condition in test_kernel_data

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoOOT build fix: asciidoc.conf is now a source file
Jérémie Galarneau [Thu, 19 May 2016 05:26:11 +0000 (01:26 -0400)] 
OOT build fix: asciidoc.conf is now a source file

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agolttng-create(1): use attributes for default ports
Philippe Proulx [Thu, 19 May 2016 02:59:12 +0000 (22:59 -0400)] 
lttng-create(1): use attributes for default ports

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agolttng-create(1): add xrefs to creation mode definitions
Philippe Proulx [Thu, 19 May 2016 02:16:50 +0000 (22:16 -0400)] 
lttng-create(1): add xrefs to creation mode definitions

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agolttng-create(1): use the correct DATAPORT/CTRLPORT variables
Philippe Proulx [Thu, 19 May 2016 02:01:53 +0000 (22:01 -0400)] 
lttng-create(1): use the correct DATAPORT/CTRLPORT variables

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agolttng-create(1): use def list for net protocols
Philippe Proulx [Thu, 19 May 2016 02:01:08 +0000 (22:01 -0400)] 
lttng-create(1): use def list for net protocols

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agolttng-create(1): add relay mode
Philippe Proulx [Wed, 18 May 2016 00:57:20 +0000 (20:57 -0400)] 
lttng-create(1): add relay mode

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agodoc/man: put AsciiDoc attributes in their own file
Philippe Proulx [Tue, 17 May 2016 23:30:39 +0000 (19:30 -0400)] 
doc/man: put AsciiDoc attributes in their own file

This facilitates the generation of man pages using another
asciidoc.conf file, but keeping the same attributes, without
having to split the generated configuration file.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agotest: UST tracing destroy flush behavior with tracefile rotation
Mathieu Desnoyers [Wed, 18 May 2016 18:04:19 +0000 (14:04 -0400)] 
test: UST tracing destroy flush behavior with tracefile rotation

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agotest: kernel tracing destroy flush behavior with tracefile rotation
Mathieu Desnoyers [Wed, 18 May 2016 18:04:18 +0000 (14:04 -0400)] 
test: kernel tracing destroy flush behavior with tracefile rotation

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agoAdd environment variable to allow abort on error
Mathieu Desnoyers [Wed, 18 May 2016 18:04:17 +0000 (14:04 -0400)] 
Add environment variable to allow abort on error

The new environment variable LTTNG_ABORT_ON_ERROR allows each
lttng-tools program to call abort() on PERROR() and ERR() after the
error message has been printed to stderr.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: ust-consumer: flush empty packets on snapshot channel
Mathieu Desnoyers [Wed, 18 May 2016 18:04:13 +0000 (14:04 -0400)] 
Fix: ust-consumer: flush empty packets on snapshot channel

Snapshot operation on a non-stopped stream should use a "final" flush to
ensure empty packets are flushed, so we gather timestamps at the moment
where the snapshot is taken. This is important for streams that have a
low amount of activity, which might be on an empty packet when the
snapshot is triggered.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: WARN() should print as WARN level, not ERR
Mathieu Desnoyers [Wed, 18 May 2016 18:04:16 +0000 (14:04 -0400)] 
Fix: WARN() should print as WARN level, not ERR

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: error.h: add missing parenthesis around macro parameter
Mathieu Desnoyers [Wed, 18 May 2016 18:04:15 +0000 (14:04 -0400)] 
Fix: error.h: add missing parenthesis around macro parameter

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: bogus mask on error.h PRINT types
Mathieu Desnoyers [Wed, 18 May 2016 18:04:14 +0000 (14:04 -0400)] 
Fix: bogus mask on error.h PRINT types

PRINT_ERR maps to 0x1, PRINT_WARN maps to 0x2, which is fine so far to
use as masks, but PRINT_BUG maps to 0x3, which is the same as both
PRINT_ERR and PRINT_WARN, and does not make sense to use in masks with
__lttng_print:

  (type & (PRINT_WARN | PRINT_ERR | PRINT_BUG))

Fix this by ensuring PRINT_BUG has its own mask, and express all
constants as shifts to eliminate the risk of re-introducing a similar
bug in the future.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: kernel tracing: flush after stop
Mathieu Desnoyers [Wed, 18 May 2016 18:04:12 +0000 (14:04 -0400)] 
Fix: kernel tracing: flush after stop

We should flush the last packet after stop, not before. Otherwise, we
may end up with events written immediately after the flush, which
defeats the purpose of flushing.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: UST should not generate packet at destroy after stop
Mathieu Desnoyers [Wed, 18 May 2016 18:04:11 +0000 (14:04 -0400)] 
Fix: UST should not generate packet at destroy after stop

In the following scenario:
- create, enable events (ust),
- start
- ...
- stop (await for data_pending to complete)
- destroy
- rm the trace directory

We would expect that the "rm" operation would not conflict with the
consumer daemon trying to output data into the trace files, since the
"stop" operation ensured that there was no data_pending.

However, the "destroy" operation currently generates an extra packet
after the data_pending check (the "on_stream_hangup"). This causes the
consumer daemon to try to perform trace file rotation concurrently with
the trace directory removal in the scenario above, which triggers
errors. The main reason why this empty packet is generated by "destroy"
is to deal with trace start/stop scenario which would otherwise generate
a completely empty stream.

Therefore, introduce the concept of a "quiescent stream". It is
initialized at false on stream creation (first packet is empty). When
tracing is started, it is set to false (for cases of start/stop/start).
When tracing is stopped, if the stream is not quiescent, perform a
"final" flush (which will generate an empty packet if the current packet
was empty), and set quiescent to true.  On "destroy" stream and on
application hangup: if the stream is not quiescent, perform a "final"
flush, and set the quiescent state to true.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTests: remove flaky '*' kernel wildcard test
Jérémie Galarneau [Wed, 18 May 2016 22:35:45 +0000 (18:35 -0400)] 
Tests: remove flaky '*' kernel wildcard test

The test case for '*', which enables all events, is flaky by its
nature since buffers may be filled by other kernel events preventing
the test script from finding the test event (it is often discarded).

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: bad file descriptors on close after rotation error
Mathieu Desnoyers [Wed, 18 May 2016 18:04:10 +0000 (14:04 -0400)] 
Fix: bad file descriptors on close after rotation error

Ensure we don't try to close output stream file descriptors twice when a
trace file rotation error occurs (once at tracefile rotation, once when
closing the stream). Set the fd value to -1 after the first close to
ensure we don't try to close it again.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.043916 seconds and 5 git commands to generate.