lttng-tools.git
10 years agoUpdate version to v2.5.0-rc2 v2.5.0-rc2
David Goulet [Fri, 27 Jun 2014 14:38:10 +0000 (10:38 -0400)] 
Update version to v2.5.0-rc2

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTest: add JUL disable event tests
David Goulet [Wed, 18 Jun 2014 13:11:19 +0000 (09:11 -0400)] 
Test: add JUL disable event tests

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: disable JUL event on UST side
David Goulet [Tue, 17 Jun 2014 19:42:39 +0000 (15:42 -0400)] 
Fix: disable JUL event on UST side

With the new root logger patch in liblttng-ust-jul, we have to disable
the JUL logger on the UST tracer side for the multi session support.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: add test UST perf to extra dist
David Goulet [Fri, 27 Jun 2014 14:18:48 +0000 (10:18 -0400)] 
Fix: add test UST perf to extra dist

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: accept override flag even without a load path
David Goulet [Thu, 26 Jun 2014 17:56:13 +0000 (13:56 -0400)] 
Fix: accept override flag even without a load path

Part of the bug #807 have been fixed also by the previous commit.

Fixes #807

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: bad error code path when loading session
David Goulet [Thu, 26 Jun 2014 17:32:39 +0000 (13:32 -0400)] 
Fix: bad error code path when loading session

Fixes #810

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: set session in output mode if URL are set afterwards
David Goulet [Wed, 25 Jun 2014 20:35:54 +0000 (16:35 -0400)] 
Fix: set session in output mode if URL are set afterwards

Fixes #809

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: add a kernel context list to the channel
David Goulet [Wed, 25 Jun 2014 19:42:15 +0000 (15:42 -0400)] 
Fix: add a kernel context list to the channel

The internal state of the session daemon was recording only one context
per channel thus overwriting the previous one if multiple context were
added causing a memory leak.

This commit adds a list inside a kernel channel which keeps track of all
context added. It also fixes the save command that now saves all of
them.

Fixes #205

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: Add vpid, vppid and vtid info in add-context help
Francis Deslauriers [Thu, 19 Jun 2014 02:19:40 +0000 (22:19 -0400)] 
Fix: Add vpid, vppid and vtid info in add-context help

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: wrong behavior of save command when no session name is provided
Jonathan Rajotte Julien [Tue, 17 Jun 2014 19:59:41 +0000 (15:59 -0400)] 
Fix: wrong behavior of save command when no session name is provided

No session name and no option --all should default to --all.

Signed-off-by: Jonathan Rajotte Julien <jonathan.r.julien@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: missing context type string in save for ust context
Jonathan Rajotte Julien [Mon, 9 Jun 2014 19:45:39 +0000 (15:45 -0400)] 
Fix: missing context type string in save for ust context

Return string for LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER was missing and
caused an error on save when a context of PERF_THREAD_COUNTER type was
present (Error: Invalid parameter).

Fixes #804

Signed-off-by: Jonathan Rajotte Julien <jonathan.r.julien@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: wrong casting of return value
Jonathan Rajotte Julien [Mon, 9 Jun 2014 15:40:36 +0000 (11:40 -0400)] 
Fix: wrong casting of return value

The function uri_parse_str_urls return a ssize_t and the return was
casted to a size_t. This caused the following error checking to fail as
-1 was interpreted as 18446744073709551615.

Fixes #803

Signed-off-by: Jonathan Rajotte Julien <jonathan.r.julien@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: add dependency to libcommon for python binding
Paul Woegerer [Thu, 5 Jun 2014 10:39:48 +0000 (12:39 +0200)] 
Fix: add dependency to libcommon for python binding

This patch adds the missing dependency to libcommon that contains the
definition of log_add_time.

Signed-off-by: Paul Woegerer <paul_woegerer@mentor.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: remove the default GIT_VERSION
Raphaël Beamonte [Tue, 3 Jun 2014 18:30:09 +0000 (14:30 -0400)] 
Fix: remove the default GIT_VERSION

This is to allow different version control other than git.

Tested-by: Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoUpdate version to v2.5.0-rc1 v2.5.0-rc1
David Goulet [Wed, 28 May 2014 15:21:36 +0000 (11:21 -0400)] 
Update version to v2.5.0-rc1

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd missing test files to EXTRA_DIST
David Goulet [Wed, 28 May 2014 15:04:09 +0000 (11:04 -0400)] 
Add missing test files to EXTRA_DIST

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd hidden attribute to some common functions
David Goulet [Wed, 28 May 2014 14:56:12 +0000 (10:56 -0400)] 
Add hidden attribute to some common functions

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd the load session API call
David Goulet [Wed, 28 May 2014 14:52:16 +0000 (10:52 -0400)] 
Add the load session API call

Introduce lttng_load_session(attr) and some setter/getter for the
attribute object.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: alignment problems on targets not supporting unaligned access.
Fredrik Markström [Fri, 16 May 2014 01:10:07 +0000 (09:10 +0800)] 
Fix: alignment problems on targets not supporting unaligned access.

Accessing floats, doubles and 64 bit int at unaligned addresses is not
supported on all configurations of arm processors and if it is it's
emulated and slow. This patch replaces direct assignments with memcpy.

Signed-off-by: Fredrik Markström <fredrik.markstrom@gmail.com>
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd gen-ust-tracef binary to gitignore
David Goulet [Tue, 27 May 2014 20:34:01 +0000 (16:34 -0400)] 
Add gen-ust-tracef binary to gitignore

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoImplement test_event_tracef
Mathieu Desnoyers [Tue, 27 May 2014 20:25:26 +0000 (16:25 -0400)] 
Implement test_event_tracef

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoImplement tracef test application "gen-ust-tracef"
Mathieu Desnoyers [Tue, 27 May 2014 20:25:25 +0000 (16:25 -0400)] 
Implement tracef test application "gen-ust-tracef"

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: out of tree build
David Goulet [Tue, 27 May 2014 14:55:42 +0000 (10:55 -0400)] 
Fix: out of tree build

Reported-by: Daniel Olivier <daniel.olivier@ericsson.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoList session event loglevel for the JUL domain
David Goulet [Mon, 26 May 2014 18:52:58 +0000 (14:52 -0400)] 
List session event loglevel for the JUL domain

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: possible use after free in consumer
David Goulet [Mon, 26 May 2014 18:12:23 +0000 (14:12 -0400)] 
Fix: possible use after free in consumer

Fixes the coverity issue 1019959.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: man page typo
David Goulet [Mon, 26 May 2014 18:06:10 +0000 (14:06 -0400)] 
Fix: man page typo

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoRemove deprecated API from lttng.h
David Goulet [Thu, 22 May 2014 19:22:53 +0000 (15:22 -0400)] 
Remove deprecated API from lttng.h

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoSplit lttng.h into several files
David Goulet [Thu, 22 May 2014 19:20:03 +0000 (15:20 -0400)] 
Split lttng.h into several files

This does NOT break backward compatibility since lttng.h includes every
possible ABI/API.

Fixes #78

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: improve and update lttng.h comments
David Goulet [Thu, 22 May 2014 17:25:24 +0000 (13:25 -0400)] 
Fix: improve and update lttng.h comments

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTest: add JUL filtering test
David Goulet [Mon, 26 May 2014 18:02:04 +0000 (14:02 -0400)] 
Test: add JUL filtering test

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: JUL filtering for event *
David Goulet [Mon, 26 May 2014 18:01:14 +0000 (14:01 -0400)] 
Fix: JUL filtering for event *

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: don't send consumer error to sessiond in teardown
David Goulet [Fri, 23 May 2014 19:04:23 +0000 (15:04 -0400)] 
Fix: don't send consumer error to sessiond in teardown

At that point, the control socket has been closed thus the session
daemon is aware that the consumer died. The consumer exit reason is not
even handled by the session daemon.

In the case of the session daemon tearing down, the consumer should
avoid trying to send data on a potentially closed socket.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoDon't print time and pid/tid in ERR() and WARN()
David Goulet [Fri, 23 May 2014 18:36:33 +0000 (14:36 -0400)] 
Don't print time and pid/tid in ERR() and WARN()

The lttng command line uses these two macros to print information to the
user. With the time and pid/tid, it is not really user friendly and
useful for the user.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: saturate verbosity level to 3
David Goulet [Fri, 23 May 2014 18:25:06 +0000 (14:25 -0400)] 
Fix: saturate verbosity level to 3

Fixes #748

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoRemove the --consumerd-only from the configure
David Goulet [Fri, 23 May 2014 18:20:43 +0000 (14:20 -0400)] 
Remove the --consumerd-only from the configure

Fixes #712

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: deny overwrite mode and num subbuf less than 2
David Goulet [Fri, 23 May 2014 14:32:09 +0000 (10:32 -0400)] 
Fix: deny overwrite mode and num subbuf less than 2

Also fixed in UST and modules with commit:

(modules) 5140d2b3070f211e6d8a0ad7cb0a190e8b6f3e28
(ust) 3d8e9399b2fb9000b3b55e488a7d04184b5bb56e

Fixes #793

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: add missing lib rt link for clock_gettime
David Goulet [Fri, 23 May 2014 14:08:00 +0000 (10:08 -0400)] 
Fix: add missing lib rt link for clock_gettime

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoRevert "Remove --no-output option from the command line"
David Goulet [Thu, 22 May 2014 21:32:48 +0000 (17:32 -0400)] 
Revert "Remove --no-output option from the command line"

This reverts commit bb2b749bfdced63e744f660aaab28bc12669b6dc.

This affected too many tests that use that option but should not. A
better tested commit will replace this one soon.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoRemove --no-output option from the command line
David Goulet [Thu, 22 May 2014 21:05:48 +0000 (17:05 -0400)] 
Remove --no-output option from the command line

Fixes #792

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd timestamp to log
David Goulet [Thu, 22 May 2014 20:59:30 +0000 (16:59 -0400)] 
Add timestamp to log

Also, the ERR() and WARN() now have the timestamp and the PID
information.

Fixes #519

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd max-size to snapshot list output
David Goulet [Thu, 22 May 2014 19:53:07 +0000 (15:53 -0400)] 
Add max-size to snapshot list output

Fixes #635

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd live timer and tracefile count/size to list
David Goulet [Thu, 22 May 2014 19:43:47 +0000 (15:43 -0400)] 
Add live timer and tracefile count/size to list

The live timer interval is session wide where the trace file count/size
is per channel.

Fixes #642

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: remove bad option in enable channel --help
David Goulet [Thu, 22 May 2014 14:56:30 +0000 (10:56 -0400)] 
Fix: remove bad option in enable channel --help

Fixes #776

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: Tests with racy event validation
Christian Babeux [Wed, 21 May 2014 19:19:22 +0000 (15:19 -0400)] 
Fix: Tests with racy event validation

Similar to d7ee608c00feacea3cfd5a740df64e5215347cb9, make sure that the
event validation scheme is not racy. If we need to wait for applications
to complete simply start them in foreground or use the built-in 'wait'
command in bash to wait for applications started in background.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoDoc: document tracefile max size discarded event limitation
Mathieu Desnoyers [Wed, 21 May 2014 16:10:24 +0000 (12:10 -0400)] 
Doc: document tracefile max size discarded event limitation

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: implicit conversion from enumeration
David Goulet [Wed, 21 May 2014 17:52:52 +0000 (13:52 -0400)] 
Fix: implicit conversion from enumeration

Fixes #759

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: clarify man page lttng.1
David Goulet [Wed, 21 May 2014 15:41:46 +0000 (11:41 -0400)] 
Fix: clarify man page lttng.1

Fixes #689

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: disable-event/channel return error if no domain
David Goulet [Wed, 21 May 2014 16:09:15 +0000 (12:09 -0400)] 
Fix: disable-event/channel return error if no domain

The disable-event/channel command now check for a UST/kernel session
before trying to disable the object. If none exists, it returns an error
without creating a domain.

Fixes #638

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: Tests should set the LTTNG_SESSION_CONFIG_XSD_PATH variable
Jérémie Galarneau [Wed, 14 May 2014 20:52:22 +0000 (16:52 -0400)] 
Fix: Tests should set the LTTNG_SESSION_CONFIG_XSD_PATH variable

Tests should set the LTTNG_SESSION_CONFIG_XSD_PATH environment
variable to use the in-tree session configuration schema.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoConfigurable kernel module probes support
Jan Glauber [Wed, 14 May 2014 14:26:32 +0000 (16:26 +0200)] 
Configurable kernel module probes support

Create a kernel module probes list and use it to load the specified
probes. The probes are selectable by the --kmod-probes command line
option to lttng-sessiond or the LTTNG_KMOD_PROBES environment variable.
If neither is set all probes are loaded so the current behaviour is not
changed.

Signed-off-by: Jan Glauber <jan.glauber@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoRemove required parameter from module parameters
Jan Glauber [Wed, 14 May 2014 14:26:31 +0000 (16:26 +0200)] 
Remove required parameter from module parameters

Remove the per module required parameter by adding another list
for optional core modules, so we have:

- required core modules
- optional core modules
- optional probe modules

Signed-off-by: Jan Glauber <jan.glauber@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoSeperate probe modules from control modules
Jan Glauber [Wed, 14 May 2014 14:26:30 +0000 (16:26 +0200)] 
Seperate probe modules from control modules

Move all control modules to the control list and make a seperate
probes list.

Signed-off-by: Jan Glauber <jan.glauber@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoUse common functions for module loading and unloading
Jan Glauber [Wed, 14 May 2014 14:26:29 +0000 (16:26 +0200)] 
Use common functions for module loading and unloading

Module loading (and unloading) is identical for control and data modules
so use common funtions to avoid code duplication.

Signed-off-by: Jan Glauber <jan.glauber@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoDocs: Add a section documenting lttng-sessiond's -l/--load option
Jérémie Galarneau [Wed, 14 May 2014 17:46:06 +0000 (13:46 -0400)] 
Docs: Add a section documenting lttng-sessiond's -l/--load option

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: Copy-pasted PERROR messages may be misleading
Jérémie Galarneau [Wed, 14 May 2014 15:32:10 +0000 (11:32 -0400)] 
Fix: Copy-pasted PERROR messages may be misleading

Some PERRORs in lttng-sessiond's pthread_create's error handling
code indicate the wrong thread name which may be misleading
during debugging.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: incorrect printf format
David Goulet [Wed, 14 May 2014 15:30:16 +0000 (11:30 -0400)] 
Fix: incorrect printf format

Fixes #777

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: handle ENOENT when creating a kernel event
David Goulet [Wed, 14 May 2014 15:27:00 +0000 (11:27 -0400)] 
Fix: handle ENOENT when creating a kernel event

The kernel tracer returns ENOENT if an event is not found thus warn the
user of that.

Fixes #761

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: load all possible path for sessiond conf file
David Goulet [Wed, 14 May 2014 15:01:43 +0000 (11:01 -0400)] 
Fix: load all possible path for sessiond conf file

The session daemon now tries to load the system wide conf. file, user
local and finally the command line.

Fixes #709

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: add missing packed attribute to comm. struct.
David Goulet [Wed, 14 May 2014 13:28:15 +0000 (09:28 -0400)] 
Fix: add missing packed attribute to comm. struct.

Fixes #707

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd git commit id to the version if it's not a tag
Raphaël Beamonte [Wed, 11 Dec 2013 16:39:41 +0000 (11:39 -0500)] 
Add git commit id to the version if it's not a tag

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoMan: Add load and save sections to the lttng.1 man page
Jérémie Galarneau [Tue, 13 May 2014 16:14:10 +0000 (12:14 -0400)] 
Man: Add load and save sections to the lttng.1 man page

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd a -l/--load option to the session-daemon
Jérémie Galarneau [Thu, 8 May 2014 16:02:52 +0000 (12:02 -0400)] 
Add a -l/--load option to the session-daemon

This option makes it possible to set a PATH from which session
configurations are loaded by the session daemon on startup.

Usage: lttng-sessiond -l PATH

The session configuration file found at PATH, or all those present in it
if it is a directory, will be loaded.

All sessions found under the user's session configuration directory and
under the system session configuration directory are now loaded by
default.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: uncomment rm trace path statement in test
David Goulet [Mon, 12 May 2014 15:50:40 +0000 (11:50 -0400)] 
Fix: uncomment rm trace path statement in test

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: Ressource leak, missing fclose
Jérémie Galarneau [Thu, 8 May 2014 21:06:22 +0000 (17:06 -0400)] 
Fix: Ressource leak, missing fclose

Fixes coverity issue 1139536.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: Possible out-of-bounds read
Jérémie Galarneau [Thu, 8 May 2014 21:05:55 +0000 (17:05 -0400)] 
Fix: Possible out-of-bounds read

Fixes coverity issue 1191757.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoPrint an error message when a session fails to load
Jérémie Galarneau [Thu, 8 May 2014 16:13:05 +0000 (12:13 -0400)] 
Print an error message when a session fails to load

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: Don't report an error if no sessions are found with default options
Jérémie Galarneau [Thu, 8 May 2014 16:12:28 +0000 (12:12 -0400)] 
Fix: Don't report an error if no sessions are found with default options

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: move JUL filter creation to a function
David Goulet [Wed, 7 May 2014 18:12:13 +0000 (14:12 -0400)] 
Fix: move JUL filter creation to a function

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: JUL filtering done on the UST level
David Goulet [Wed, 7 May 2014 17:53:36 +0000 (13:53 -0400)] 
Fix: JUL filtering done on the UST level

This is to support enabling all events with different loglevels in two
different sessions.

For this, if any loglevel have been defined, the 'int_loglevel' filter
is added to the UST event. The liblttng-ust-jul library has been
modified to stop filtering loglevel in the agent.

This commit adds two tests, one for a back to back session that are
destroyed and a second one for multi loglevel session.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: Don't output to stdout from lttng-ctl
Jérémie Galarneau [Wed, 7 May 2014 18:27:45 +0000 (14:27 -0400)] 
Fix: Don't output to stdout from lttng-ctl

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: session.xsd is already present in dist_xml_DATA
Jérémie Galarneau [Tue, 6 May 2014 19:27:14 +0000 (15:27 -0400)] 
Fix: session.xsd is already present in dist_xml_DATA

There is no need to include session.xsd as part of xml_DATA since
dist_xml_DATA will already ensure it is part of the dist target and
installed.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: add missing source file for make dist
David Goulet [Mon, 5 May 2014 19:39:43 +0000 (15:39 -0400)] 
Fix: add missing source file for make dist

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: Don't include the binary in the live test's EXTRA_DIST
Jérémie Galarneau [Mon, 5 May 2014 19:21:18 +0000 (15:21 -0400)] 
Fix: Don't include the binary in the live test's EXTRA_DIST

Adding the binary in EXTRA_DIST causes the "dist" target to fail
with a "No rule to make target libtap.la" error.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix: Out of tree build fails in libconfig
Jérémie Galarneau [Mon, 5 May 2014 14:41:46 +0000 (10:41 -0400)] 
Fix: Out of tree build fails in libconfig

libconfig_la_CPPFLAGS should also include the top-level AM_CPPFLAGS.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: add JUL filter to UST event on logger_name
David Goulet [Tue, 15 Apr 2014 19:05:42 +0000 (15:05 -0400)] 
Fix: add JUL filter to UST event on logger_name

This is to avoid having the JUL event copied in each sessions. See
ticket description for more details.

To achieve this, JUL filtering has been added to fix that bug.

Fixes #773

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd UST perf test in make check on x86
Julien Desfossez [Mon, 17 Mar 2014 20:15:26 +0000 (16:15 -0400)] 
Add UST perf test in make check on x86

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTest for UST perf counters
Julien Desfossez [Mon, 17 Mar 2014 01:59:16 +0000 (21:59 -0400)] 
Test for UST perf counters

Works both in physical and virtual machines.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: rename of perf counter context
Julien Desfossez [Mon, 17 Mar 2014 01:59:15 +0000 (21:59 -0400)] 
Fix: rename of perf counter context

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoImplement LTTng-UST perf counters support
Mathieu Desnoyers [Mon, 17 Feb 2014 01:00:31 +0000 (20:00 -0500)] 
Implement LTTng-UST perf counters support

Introduce perf:cpu:* and perf:thread:* performance monitoring counter
contexts. perf:cpu: is used for kernel tracing, and perf:thread: is used
for UST. perf:* is kept for backward compatibility, but not shown in
lttng add-context --help anymore.

Example usages of performance counters have been adapted to this new
interface.

For the lttng.h API We introduce LTTNG_EVENT_CONTEXT_PERF_CPU_COUNTER
and LTTNG_EVENT_CONTEXT_PERF_THREAD_COUNTER as the API counterparts of
the new command line options. LTTNG_EVENT_CONTEXT_PERF_COUNTER is kept
for backward compatibility.

For ABIs with the tracers, introduce the new
LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER to support this new UST feature.
Rename LTTNG_KERNEL_CONTEXT_PERF_COUNTER to
LTTNG_KERNEL_CONTEXT_PERF_CPU_COUNTER, following the same change in
lttng-modules (keeping the same enum entry value).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoBackported to glibc 2.8
Jesper Derehag [Thu, 24 Apr 2014 08:22:50 +0000 (10:22 +0200)] 
Backported to glibc 2.8

This patch enables lttng-tools to run on top of glibc 2.8.
Overall it fixes 2 things:
1. No support for epoll_create1(..) and EPOLL_CLOEXEC.
2. No support for htobe/betoh

For 1, we revert back to epoll_create() and then sets CLOEXEC through
fcntl instead.

For 2, we define htobe/betoh as part of the compat/endian.h and make
sure that any users of those functions actually include compat/endian.h
instead of implicit include of system endian.h

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tested-by: Jesper Derehag <jderehag@hotmail.com>
Signed-off-by: Jesper Derehag <jderehag@hotmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoClarify limitations of the --syscall flag with enable-event command
Christian Babeux [Wed, 16 Apr 2014 16:26:25 +0000 (12:26 -0400)] 
Clarify limitations of the --syscall flag with enable-event command

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: Racy event validation in tests
Christian Babeux [Fri, 18 Apr 2014 17:10:09 +0000 (13:10 -0400)] 
Fix: Racy event validation in tests

This pattern is fundamentally racy:

$TESTAPP_BIN $NR_ITER $NR_USEC_WAIT >/dev/null 2>&1 &

[...]

while [ -n "$(pidof $TESTAPP_BIN)" ]; do
   sleep 1
done
pass "Wait for application end"

[...]

tracing_teardown

validate_trace $EXACT_EVENT_COUNT

It is possible that the check for "pidof $TESTAPP_BIN" occurs _before_
the execve() of the applications (starting the applications in background
with & is basically a clone() + execve()). The consequence is that the check
succeed, never waiting for any applications to finish and then the tracing
sessions are prematurely teared down. Thus the resulting trace contains only
some events. We then validate for a fixed number of events and thus the test
fails caused by this racy scheduling situation.

The fix is to start the applications in foreground instead of background.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoUse the in-tree session.xsd in test_load
Jérémie Galarneau [Fri, 11 Apr 2014 03:58:03 +0000 (23:58 -0400)] 
Use the in-tree session.xsd in test_load

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoOverride the session.xsd path with an ENV. variable
Jérémie Galarneau [Mon, 14 Apr 2014 16:10:44 +0000 (12:10 -0400)] 
Override the session.xsd path with an ENV. variable

The LTTNG_SESSION_CONFIG_XSD_PATH environment variable can be used to
specify a path which contains the session configuration schema. This
will allow save-load tests to be ran without installing the XSD on the
system.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: replace 1 for true in libxml checking
Jonathan Rajotte [Mon, 14 Apr 2014 14:42:38 +0000 (10:42 -0400)] 
Fix: replace 1 for true in libxml checking

Initial bug on ./configure:
checking for libxml - version >= 2.7.6... yes (version 2.9.1)
./configure: line 5137: 1: command not found

Signed-off-by: Jonathan Rajotte <jonathan.r.julien@gmail.com>
10 years agoFix: rework utils_parse_size_suffix
Simon Marchi [Thu, 10 Apr 2014 15:30:19 +0000 (11:30 -0400)] 
Fix: rework utils_parse_size_suffix

Ok, so there are a lot of problems with this function (sorry :|). Taking
the regex road is probably to complicated for nothing, so here is a
version without regexes.

I added many test cases as suggested by Sandeep Chaudhary and Daniel
Thibault. I tested on both Intel 32 and 64 bits.

Fixes #633

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: XML declaration must be at beginning of XSD file
Christian Babeux [Thu, 10 Apr 2014 21:16:39 +0000 (17:16 -0400)] 
Fix: XML declaration must be at beginning of XSD file

Move down license information to fix the parser error :
XML declaration allowed only at the start of the document

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd MIT license header to session.xsd
Jérémie Galarneau [Mon, 7 Apr 2014 15:47:37 +0000 (11:47 -0400)] 
Add MIT license header to session.xsd

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoInsert V4L2 instrumentation module on session start
Wade Farnsworth [Fri, 28 Mar 2014 20:09:59 +0000 (13:09 -0700)] 
Insert V4L2 instrumentation module on session start

Requires V4L2 instrumentation patch for lttng-modules.

Signed-off-by: Wade Farnsworth <wade_farnsworth@mentor.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoUpdate ChangeLog with 2.4.1 release
David Goulet [Wed, 9 Apr 2014 18:20:54 +0000 (14:20 -0400)] 
Update ChangeLog with 2.4.1 release

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: don't delete stream from connection recv list
David Goulet [Thu, 3 Apr 2014 17:14:00 +0000 (13:14 -0400)] 
Fix: don't delete stream from connection recv list

We don't need to delete them from the list during a connection destroy
because it's only a reference to the stream that might be valid or not
during the connection destroy. There is no need at all to access the
stream's pointer at that point.

Commit cd2ef1ef1d54ced9e4d0d03b865bb7fc6a905f80 did not fixed the full
issue so this should fix the use after free race for good.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: misc spelling errors
Michael Jeanson [Fri, 4 Apr 2014 14:23:36 +0000 (10:23 -0400)] 
Fix: misc spelling errors

Signed-off-by: Michael Jeanson <mjeanson@ubuntu.com>
10 years agoFix: don't quiet the consumer if opt_quiet is not set
David Goulet [Wed, 2 Apr 2014 19:07:21 +0000 (15:07 -0400)] 
Fix: don't quiet the consumer if opt_quiet is not set

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: use after free of a relayd stream
David Goulet [Wed, 2 Apr 2014 14:31:34 +0000 (10:31 -0400)] 
Fix: use after free of a relayd stream

A race could occur with a stream destruction and a control connection
being destroyed emptying its recv_list. A freed stream could still be in
the list thus having a use after free during the connection destroy.

That was triggering undefined behavior from infinite looping to
segmentation faults.

We've observed this issue on high load stress test. A relayd received
all the stream but NOT the streams sent command which empty the list.
This can happen if a start tracing never occured or failed on the
application side thus the close stream command is sent to the relayd
freeing the stream before it is removed from that list.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: don't print stream name in error message
David Goulet [Tue, 1 Apr 2014 15:36:13 +0000 (11:36 -0400)] 
Fix: don't print stream name in error message

The stream received, in per UID, is actually a temporary stream object
that only contains the UST object data which is the relevant part for
UST to use.

Thus on error the name was random data thus print the valid handle
descriptor instead of invalid data.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: take session list lock when listing tp
David Goulet [Fri, 28 Mar 2014 13:58:03 +0000 (09:58 -0400)] 
Fix: take session list lock when listing tp

This is important since the list tracepoints command access the
application socket to ask the application for its TPs. The session list
lock protects the ordering of message for those sockets.

This was triggering out of order message between the session daemon and
an application thus triggering undefined behavior.

Fixes #774

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: add consumer wake up pipe to avoid race
David Goulet [Wed, 19 Mar 2014 18:34:27 +0000 (14:34 -0400)] 
Fix: add consumer wake up pipe to avoid race

UST application will notify the wait_fd pipe for every subbuffer that it
writes and ready to be consumed. However, on *high* load systems, this
1:1 property can fail if the pipe gets filled up. For performance
reason, UST will ignore this error and continue since it can't wait for
the pipe to clear up.

This triggers a race condition where we have *one* wake up on the UST
pipe for potentially multiple subbuffers. A data pending command will
wait forever on streams that still has data but the data thread could'nt
consumed them because of this 1:n possible race. Using the stop command
without waiting would mean a memory/fd leak of the stream.

Thus, we add a consumer wake up pipe here that notifies the data thread
if there is still data to be read after a successful read subbuffer
call. With this, we end up handling the residual buffers if any since
the data thread is always notified when there is still data to be read.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: don't spawn relayd if URL is provided
David Goulet [Fri, 28 Mar 2014 17:19:47 +0000 (13:19 -0400)] 
Fix: don't spawn relayd if URL is provided

In the lttng command line tool, relayd should only be spawned for the
default use case which is no URL provided.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: update test to use correct lttng load option
David Goulet [Wed, 26 Mar 2014 15:31:36 +0000 (11:31 -0400)] 
Fix: update test to use correct lttng load option

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: allow loading session file with -i option
David Goulet [Wed, 26 Mar 2014 15:31:23 +0000 (11:31 -0400)] 
Fix: allow loading session file with -i option

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