lttng-tools.git
7 years agoAdd base contexts to event template template-2
Jonathan Rajotte [Mon, 4 Jul 2016 21:30:47 +0000 (17:30 -0400)] 
Add base contexts to event template

7 years agoAdd support for context in enable-event template
Jonathan Rajotte [Mon, 27 Jun 2016 19:11:20 +0000 (15:11 -0400)] 
Add support for context in enable-event template

7 years agoAdd enable-events templates
Jonathan Rajotte [Mon, 27 Jun 2016 19:35:16 +0000 (15:35 -0400)] 
Add enable-events templates

Templates for the enable-events command can now be found in
$prefix/xml/lttng/templates/event.

7 years agoFix: use 'filter' in mi to comply with save format
Jonathan Rajotte [Mon, 27 Jun 2016 14:43:03 +0000 (10:43 -0400)] 
Fix: use 'filter' in mi to comply with save format

7 years agoDoc: add template-path option to enable-event man
Jonathan Rajotte [Mon, 27 Jun 2016 14:42:22 +0000 (10:42 -0400)] 
Doc: add template-path option to enable-event man

7 years agoAdd --template-path support to enable-event
Jonathan Rajotte [Thu, 23 Jun 2016 21:20:47 +0000 (17:20 -0400)] 
Add --template-path support to enable-event

7 years agoRename loglevel_str_to_value to loglevel_ust_str_to_value
Jonathan Rajotte [Thu, 23 Jun 2016 21:14:48 +0000 (17:14 -0400)] 
Rename loglevel_str_to_value to loglevel_ust_str_to_value

Add a new loglevel_str_to_value that return the loglevel value based on domain
type.

7 years agoTemporary mesure: disable xsd validation config_document_get
Jonathan Rajotte [Thu, 23 Jun 2016 21:12:28 +0000 (17:12 -0400)] 
Temporary mesure: disable xsd validation config_document_get

7 years agoDisable blank element parsing on get_document
Jonathan Rajotte [Thu, 23 Jun 2016 21:10:08 +0000 (17:10 -0400)] 
Disable blank element parsing on get_document

This make sure that when dumping a raw element no blank elements are present.

7 years agoFix error handling for config_document/element
Jonathan Rajotte [Mon, 27 Jun 2016 19:10:09 +0000 (15:10 -0400)] 
Fix error handling for config_document/element

7 years agoAdd session-config api for array and element manipulation
Jonathan Rajotte [Thu, 23 Jun 2016 21:08:49 +0000 (17:08 -0400)] 
Add session-config api for array and element manipulation

7 years agoAdd utility function config_get_loglevel_type_string
Jonathan Rajotte [Wed, 22 Jun 2016 22:44:08 +0000 (18:44 -0400)] 
Add utility function config_get_loglevel_type_string

7 years agoRename get_event_type to config_get_event_type
Jonathan Rajotte [Wed, 22 Jun 2016 22:31:10 +0000 (18:31 -0400)] 
Rename get_event_type to config_get_event_type

7 years agoAdd writer function for raw config_element
Jonathan Rajotte [Wed, 22 Jun 2016 22:28:51 +0000 (18:28 -0400)] 
Add writer function for raw config_element

7 years agoMove get_config_domain_str to session-config
Jonathan Rajotte [Wed, 22 Jun 2016 22:07:40 +0000 (18:07 -0400)] 
Move get_config_domain_str to session-config

rename it to config_get_domaain_str

7 years agoFix: use the config_event_type instead of opt_event_type
Jonathan Rajotte [Thu, 16 Jun 2016 14:04:08 +0000 (10:04 -0400)] 
Fix: use the config_event_type instead of opt_event_type

7 years agoSupport multi domain for enable-event
Jonathan Rajotte [Tue, 14 Jun 2016 21:21:36 +0000 (17:21 -0400)] 
Support multi domain for enable-event

7 years agoEnable multi domain per command
Jonathan Rajotte [Tue, 14 Jun 2016 11:49:22 +0000 (07:49 -0400)] 
Enable multi domain per command

7 years agoMake channel read timer interval optional in session.xsd
Jérémie Galarneau [Thu, 16 Jun 2016 00:26:21 +0000 (20:26 -0400)] 
Make channel read timer interval optional in session.xsd

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoPartial revert: channel name and default output
Jonathan Rajotte [Mon, 27 Jun 2016 21:42:29 +0000 (17:42 -0400)] 
Partial revert: channel name and default output

Since it loops on the attribute the second pass always triggered the name_set
check and directly return as an error.

commit a1dd770
Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Date:   Wed Jun 15 20:26:21 2016 -0400

    Make channel read timer interval optional in session.xsd

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
commit c2623b8
Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Date:   Wed Jun 15 20:25:48 2016 -0400

    Make channel output type optional in session.xsd

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoMake channel output type optional in session.xsd
Jérémie Galarneau [Thu, 16 Jun 2016 00:25:48 +0000 (20:25 -0400)] 
Make channel output type optional in session.xsd

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoMake channel name attribute optional in session.xsd
Jérémie Galarneau [Thu, 16 Jun 2016 00:23:07 +0000 (20:23 -0400)] 
Make channel name attribute optional in session.xsd

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
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>
This page took 0.041637 seconds and 5 git commands to generate.