lttng-tools.git
10 years agoFix: possible use after free
David Goulet [Thu, 5 Dec 2013 22:05:40 +0000 (17:05 -0500)] 
Fix: possible use after free

Fixes coverity issue 1135328 and 1135329

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: remove unused code in session daemon
David Goulet [Tue, 3 Dec 2013 19:33:24 +0000 (14:33 -0500)] 
Fix: remove unused code in session daemon

This also removes unused data structure in an unit test.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: string format with unsigned value
David Goulet [Tue, 3 Dec 2013 16:54:00 +0000 (11:54 -0500)] 
Fix: string format with unsigned value

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: remove useless assert
David Goulet [Tue, 3 Dec 2013 16:45:44 +0000 (11:45 -0500)] 
Fix: remove useless assert

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: bad logical check of error codes
David Goulet [Tue, 3 Dec 2013 16:35:31 +0000 (11:35 -0500)] 
Fix: bad logical check of error codes

Fixes #701

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: resource leak in enable-event command
David Goulet [Thu, 28 Nov 2013 21:02:14 +0000 (16:02 -0500)] 
Fix: resource leak in enable-event command

Fix coverity issue 1129187.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: unchecked return value in ust app delete
David Goulet [Thu, 28 Nov 2013 20:55:05 +0000 (15:55 -0500)] 
Fix: unchecked return value in ust app delete

Fix coverity issue 1132897.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: dereference after null check in UST registry
David Goulet [Thu, 28 Nov 2013 20:52:25 +0000 (15:52 -0500)] 
Fix: dereference after null check in UST registry

Fix coverity issue 1132896.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: Resource leak in ust registry
David Goulet [Thu, 28 Nov 2013 20:40:44 +0000 (15:40 -0500)] 
Fix: Resource leak in ust registry

Fix coverity issue 1019918.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: backported from urcu commit 92af1a30
David Goulet [Thu, 28 Nov 2013 19:55:07 +0000 (14:55 -0500)] 
Fix: backported from urcu commit 92af1a30

commit 92af1a30ca6a70945b167c31631c8598a626c71a
Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date:   Thu Nov 28 18:41:13 2013 +0100

    Fix undefined NULL pointer arithmetic

    Clang 3.3 with -O2 optimisations is especially picky about arithmetic
    on NULL pointers. This undefined behavior is turned into optimized out
    NULL checks by clang 3.3. Fix the undefined behavior by checking against
    the pointer directly, without going back and forth around NULL with
    pointer arithmetic.

Reported-by: Zifei Tong <soariez@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTests: fix racy tests and misleading output messages
David Goulet [Thu, 28 Nov 2013 19:48:59 +0000 (14:48 -0500)] 
Tests: fix racy tests and misleading output messages

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTests: fix bad argument parsing in test app
David Goulet [Thu, 28 Nov 2013 19:47:50 +0000 (14:47 -0500)] 
Tests: fix bad argument parsing in test app

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: remove assert on fd in the read/write layer
David Goulet [Thu, 28 Nov 2013 18:25:25 +0000 (13:25 -0500)] 
Fix: remove assert on fd in the read/write layer

It is possible that an invalid fd is passed to read or write. This can
happen for instance if the endpoint of the transport (ex: relayd) dies
out while actively trying to send data. It is OK to let an invalid fd
where the syscall will return the right value along with errno being
populated with the corresponding code.

Acked-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: missing lock/unlock when sending index
David Goulet [Thu, 28 Nov 2013 18:22:26 +0000 (13:22 -0500)] 
Fix: missing lock/unlock when sending index

This was creating out of order messages between the relayd and the
consumer leading to undesired behaviour for the tracing session being
streamed.

Acked-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: update back the metadata len sent on failure
David Goulet [Thu, 28 Nov 2013 18:20:15 +0000 (13:20 -0500)] 
Fix: update back the metadata len sent on failure

Acked-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: don't fail on push metadata if no channel
David Goulet [Thu, 28 Nov 2013 18:08:10 +0000 (13:08 -0500)] 
Fix: don't fail on push metadata if no channel

The comments in the code explains it well but in a nutshell, this is an
acceptable race between the creation of the metadata on the consumer
side and the push metadata from the session daemon for that channel.

This race is resolved by either having the consumer requesting metadata
or the session is stopped which will in both situation push the metadata
to the consumer.

Without that fix, the session daemon flags the registry's metadata to be
"closed" which usually indicates that the consumer is not responding
leading to the consumer thread exiting in the session daemon.

Acked-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoRename LTTng index in CTF index
Julien Desfossez [Mon, 25 Nov 2013 20:32:38 +0000 (15:32 -0500)] 
Rename LTTng index in CTF index

Also the magic becomes a uint32_t instead of 6 chars for more aligned
reads.

Apart from the CTF magic changes, this patch only renames stuff so no
behaviour is changed.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: set the enable all event command type
David Goulet [Tue, 26 Nov 2013 15:10:20 +0000 (10:10 -0500)] 
Fix: set the enable all event command type

This was removed by mistake with the exclusion patch set.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: implicit conversion of enum types in sessiond
David Goulet [Mon, 25 Nov 2013 20:06:13 +0000 (15:06 -0500)] 
Fix: implicit conversion of enum types in sessiond

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: implicit conversion of enum types in consumer
David Goulet [Mon, 25 Nov 2013 19:16:39 +0000 (14:16 -0500)] 
Fix: implicit conversion of enum types in consumer

This actually remove the use of LTTNG_ERR* code in the sessiond/consumer
protocol since it should NOT be used and some comparison of enum
(lttng_error_code vs lttcomm_return_code) were broken and dangerous.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: comparison of unsigned enum expression >= 0
David Goulet [Mon, 25 Nov 2013 19:15:51 +0000 (14:15 -0500)] 
Fix: comparison of unsigned enum expression >= 0

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: comparison of unsigned value agains < 0
David Goulet [Mon, 25 Nov 2013 19:15:17 +0000 (14:15 -0500)] 
Fix: comparison of unsigned value agains < 0

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: create a fast and a long UST snapshot test
David Goulet [Mon, 25 Nov 2013 19:55:57 +0000 (14:55 -0500)] 
Fix: create a fast and a long UST snapshot test

The fast one does 10 snapshots where the long one keeps the 1000
original value. The make check only executes the fast one.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTests: fix racy UST snapshot post mortem test
David Goulet [Mon, 25 Nov 2013 17:56:03 +0000 (12:56 -0500)] 
Tests: fix racy UST snapshot post mortem test

Fixes #666

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTests: remove useless sleep when spawning sessiond
David Goulet [Mon, 25 Nov 2013 16:33:59 +0000 (11:33 -0500)] 
Tests: remove useless sleep when spawning sessiond

The new daemonize scheme returns to the parent only when the session
daemon is ready to operate thus the sleep that was used to wait for the
session deamon to bootstrap is no longer needed.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd travis-ci configuration file
David Goulet [Mon, 25 Nov 2013 18:14:55 +0000 (13:14 -0500)] 
Add travis-ci configuration file

Contributed-by: Zifei Tong <soariez@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd libuuid as dependency in README
Zifei Tong [Mon, 25 Nov 2013 12:40:41 +0000 (20:40 +0800)] 
Add libuuid as dependency in README

Signed-off-by: Zifei Tong <soariez@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTests: add valid test cases to test_utils_expand_path
Raphaël Beamonte [Sat, 23 Nov 2013 22:32:28 +0000 (17:32 -0500)] 
Tests: add valid test cases to test_utils_expand_path

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTests: add symlink tests for test_utils_expand_path
Raphaël Beamonte [Sat, 23 Nov 2013 22:32:27 +0000 (17:32 -0500)] 
Tests: add symlink tests for test_utils_expand_path

These new test cases allows to test the utils_expand_path
function with an existing tree using symlinks. It allows
to verify the right behavior of the function in complex
situation.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
10 years agoFix: utils_expand_path now works for paths that ends with '/.' or '/..'
Raphaël Beamonte [Sat, 23 Nov 2013 22:32:26 +0000 (17:32 -0500)] 
Fix: utils_expand_path now works for paths that ends with '/.' or '/..'

Cases where the path given ended with '/.' or '/..' were not handled
properly using the utils_expand_path function and the resulting path
was still showing this end part. This fix aims to treat that last
part and 'expand' it as expected.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
10 years agoFix: comment indentation
Raphaël Beamonte [Sat, 23 Nov 2013 22:32:25 +0000 (17:32 -0500)] 
Fix: comment indentation

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd missing copyright to utils.c
Raphaël Beamonte [Sat, 23 Nov 2013 22:32:24 +0000 (17:32 -0500)] 
Add missing copyright to utils.c

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: use non block waitpid to lookup child state
David Goulet [Thu, 21 Nov 2013 18:02:40 +0000 (13:02 -0500)] 
Fix: use non block waitpid to lookup child state

When daemonizing the session daemon, if the child fails *before* it
could set the recv_child_signal variable that indicates the parent to
exit, the parent process gets in an infinite loop never returning.

This commit fixes that by adding a non blocking waitpid() that monitors
the status of the child so it can exit if the child failed.

Acked-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoUpdate version to v2.4.0-rc1 v2.4.0-rc1
David Goulet [Fri, 15 Nov 2013 16:33:52 +0000 (11:33 -0500)] 
Update version to v2.4.0-rc1

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: add missing header file to build system
David Goulet [Fri, 15 Nov 2013 16:03:29 +0000 (11:03 -0500)] 
Fix: add missing header file to build system

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoRemove the utils_resolve_relative function that is not useful anymore
Raphaël Beamonte [Fri, 15 Nov 2013 00:58:35 +0000 (19:58 -0500)] 
Remove the utils_resolve_relative function that is not useful anymore

As all of the work is now done in utils_partial_realpath and
utils_expand_path, utils_resolve_relative is not necessary
anymore and should be deleted from the sources.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoChange the utils_expand_path function to use utils_partial_realpath
Raphaël Beamonte [Fri, 15 Nov 2013 00:58:34 +0000 (19:58 -0500)] 
Change the utils_expand_path function to use utils_partial_realpath

As most of the resolve-related work can now be done using
utils_partial_realpath, the utils_expand_path function can
call it and concentrate on resolving the relative paths in
the middle of a path string, such as '/./' and '/../'.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoIntroduce a new utils_partial_realpath function
Raphaël Beamonte [Fri, 15 Nov 2013 00:58:33 +0000 (19:58 -0500)] 
Introduce a new utils_partial_realpath function

This new utils function allows to resolve partially the paths
using realpath. As realpath(3) is not available to use for
unexistent paths, this function that allows to resolve partially
existent paths can be used in cases we don't know if the path
fully exists. It first resolves the existent part using
realpath(3) and then concatenate the unexistent part to it.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTests: move invalid tests in test_utils_expand_path that should be valid
Raphaël Beamonte [Fri, 15 Nov 2013 00:58:32 +0000 (19:58 -0500)] 
Tests: move invalid tests in test_utils_expand_path that should be valid

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTests: add a check in test_utils_expand_path to avoid segfault if result is NULL
Raphaël Beamonte [Fri, 15 Nov 2013 00:58:31 +0000 (19:58 -0500)] 
Tests: add a check in test_utils_expand_path to avoid segfault if result is NULL

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix end condition on rotate with live reading
Julien Desfossez [Fri, 15 Nov 2013 02:30:26 +0000 (21:30 -0500)] 
Fix end condition on rotate with live reading

We need to know what is the last tracefile to read on live with
tracefile_count.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoProtect the abort_flag on reset and always close on rotate
Julien Desfossez [Fri, 15 Nov 2013 01:49:57 +0000 (20:49 -0500)] 
Protect the abort_flag on reset and always close on rotate

Fixes CID 1128897 and a case where the read_fd might not be closed when
the abort flag is set.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd exclusion regression test
David Goulet [Thu, 14 Nov 2013 20:37:01 +0000 (15:37 -0500)] 
Add exclusion regression test

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoRemove ENABLE_EVENT_* values and fix enable filtering
David Goulet [Thu, 14 Nov 2013 19:50:26 +0000 (14:50 -0500)] 
Remove ENABLE_EVENT_* values and fix enable filtering

Since every enable event values are now mapped to the same code path,
only use one for the three of them.

This commit also fixes the check for the maximum bytecode length.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd documentation about the --exclude option
JP Ikaheimonen [Thu, 14 Nov 2013 10:48:28 +0000 (12:48 +0200)] 
Add documentation about the --exclude option

Update the man page with the information about the --exclude option
for the enable-event command.

10 years agoAdd unit tests for enabling events with exclusions
JP Ikaheimonen [Thu, 14 Nov 2013 09:31:09 +0000 (11:31 +0200)] 
Add unit tests for enabling events with exclusions

10 years agoAdd error check for zmalloc
JP Ikaheimonen [Thu, 14 Nov 2013 08:24:33 +0000 (10:24 +0200)] 
Add error check for zmalloc

Report if zmalloc fails in shadow_copy_event.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd ust event exclusion UST ABI to internal copy
JP Ikaheimonen [Thu, 14 Nov 2013 07:19:35 +0000 (09:19 +0200)] 
Add ust event exclusion UST ABI to internal copy

Add definition of structure lttng_ust_event_exclusion to our
internal copy of UST ABI definitions

10 years agoWhen listing events, show exclusions if they exist
JP Ikaheimonen [Tue, 5 Nov 2013 14:50:30 +0000 (16:50 +0200)] 
When listing events, show exclusions if they exist

Add "[has exclusions]" to the printout of an event, if that
event has exclusions added.

10 years agoAdd exclusion names to diagnostic printouts
JP Ikaheimonen [Tue, 5 Nov 2013 13:36:29 +0000 (15:36 +0200)] 
Add exclusion names to diagnostic printouts

10 years agoDetect and report exclusion option errors
JP Ikaheimonen [Tue, 5 Nov 2013 12:09:03 +0000 (14:09 +0200)] 
Detect and report exclusion option errors

10 years agoParse exclusions and forward them to the control handler
JP Ikaheimonen [Tue, 5 Nov 2013 11:38:00 +0000 (13:38 +0200)] 
Parse exclusions and forward them to the control handler

For the enable-event command, parse the given exclusions,
and send them to the control handler.

10 years agoAdd a function to check for legal exclusions
JP Ikaheimonen [Tue, 5 Nov 2013 10:14:20 +0000 (12:14 +0200)] 
Add a function to check for legal exclusions

Add a function check_exclusion_subsets() that checks the event name
against a given list of exclusion names. Report warnings and/or errors
if an exclusion is not a proper subset of the event.

Return a newly allocated list of newly allocated exclusion name strings,
the count of items in that list, and an error code.

10 years agoAdd usage for --exclude option
JP Ikaheimonen [Tue, 5 Nov 2013 09:42:55 +0000 (11:42 +0200)] 
Add usage for --exclude option

10 years agoAdd -exclude option to enable-event command
JP Ikaheimonen [Tue, 5 Nov 2013 09:36:23 +0000 (11:36 +0200)] 
Add -exclude option to enable-event command

Add new option --exclude (shortcut -x) for enable-event command.

10 years agoCollate lttng_enable_event* code
JP Ikaheimonen [Tue, 5 Nov 2013 09:04:20 +0000 (11:04 +0200)] 
Collate lttng_enable_event* code

Because the function lttng_enable_event_with_exclusions() can also
handle the duties of lttng_enable_event and lttng_enable_event_with_filter
as special cases, there's no need to have the same code duplicated in
each function. Let the other two functions fall the generic function
lttng_enable_event_with_exclusions() instead.

10 years agoSend enable-event commands with exclusion data
JP Ikaheimonen [Tue, 5 Nov 2013 08:14:05 +0000 (10:14 +0200)] 
Send enable-event commands with exclusion data

Create new function lttng_enable_event_with_exclusions().
This function deals with the various permutations of data that are
possible to accompany the enable-event command:
- all events / some events
- no filter / a filter
- no exclusions / some exclusions

The function generates the appropriate command structures and data
and sends it to the session.

10 years agoSet event exclusions in the target when event is created
JP Ikaheimonen [Tue, 5 Nov 2013 06:23:06 +0000 (08:23 +0200)] 
Set event exclusions in the target when event is created

Add a new function set_ust_event_exclusion() that calls the target-side
function that sets the exclusions to an event and reports possible errors.
Call set_ust_event_exclusion() in create_ust_event().

10 years agoCopy exclusion data in shadow_copy_event
JP Ikaheimonen [Tue, 5 Nov 2013 06:10:55 +0000 (08:10 +0200)] 
Copy exclusion data in shadow_copy_event

10 years agoAdd exclusion data to find_ust_app_event
JP Ikaheimonen [Mon, 4 Nov 2013 14:35:51 +0000 (16:35 +0200)] 
Add exclusion data to find_ust_app_event

Add exclusion data to the prototype of find_ust_app_event
and to wherever it is called.

10 years agoFree exclusion data when ust_app_event is deleted
JP Ikaheimonen [Mon, 4 Nov 2013 14:22:01 +0000 (16:22 +0200)] 
Free exclusion data when ust_app_event is deleted

10 years agoCopy event exclusion data in add_unique_ust_app_event
JP Ikaheimonen [Mon, 4 Nov 2013 14:19:49 +0000 (16:19 +0200)] 
Copy event exclusion data in add_unique_ust_app_event

10 years agoCompare also exclusions in ht_match_ust_app_event
JP Ikaheimonen [Mon, 4 Nov 2013 14:17:11 +0000 (16:17 +0200)] 
Compare also exclusions in ht_match_ust_app_event

In ht_match_ust_app_event, one of the matching criteria is
that the exclusions must match also. Add the code that checks if
exclusions match.

10 years agoAdd exclusion data to ust_app_event structure
JP Ikaheimonen [Mon, 4 Nov 2013 14:10:51 +0000 (16:10 +0200)] 
Add exclusion data to ust_app_event structure

Add exclusion data to ust_app_event and ust_app_ht_key
data structures.

10 years agoCollate handling of LTTNG_ENABLE_EVENT_WITH_FILTER
JP Ikaheimonen [Mon, 4 Nov 2013 14:00:26 +0000 (16:00 +0200)] 
Collate handling of LTTNG_ENABLE_EVENT_WITH_FILTER

Because the handling of LTTNG_ENABLE_EVENT_WITH_EXCLUSION can
now handle commands of type LTTNG_ENABLE_EVENT_WITH_FILTER,
there's no reason to have the same code appear twice.

Remove the code for LTTNG_ENABLE_EVENT_WITH_FILTER and use the
same code as is used for LTTNG_ENABLE_EVENT_WITH_EXCLUSION.

10 years agoAdd handling of LTTNG_ENABLE_EVENT_WITH_EXCLUSION
JP Ikaheimonen [Mon, 4 Nov 2013 13:55:51 +0000 (15:55 +0200)] 
Add handling of LTTNG_ENABLE_EVENT_WITH_EXCLUSION

Add handling of the command LTTNG_ENABLE_EVENT_WITH_EXCLUSION.
The handling of the command is the same as command LTTNG_ENABLE_EVENT,
as the new command is just an extension.

If the command data shows that exclusions and/or filter data will
be following the command structure, read those from the incoming
socket, then forward the filter and exclusion data to
cmd_enable_event().

10 years agoAdd new error codes for exclusion processing
JP Ikaheimonen [Mon, 4 Nov 2013 13:32:11 +0000 (15:32 +0200)] 
Add new error codes for exclusion processing

Add new error codes LTTNG_ERR_EXCLUSION_INVAL and LTTNG_ERR_EXCLUSION_NOMEM

10 years agoCopy exclusion data in add_unique_ust_event.
JP Ikaheimonen [Mon, 4 Nov 2013 13:27:07 +0000 (15:27 +0200)] 
Copy exclusion data in add_unique_ust_event.

10 years agoAdd exclusion data to trace_ust_find_event
JP Ikaheimonen [Mon, 4 Nov 2013 13:19:54 +0000 (15:19 +0200)] 
Add exclusion data to trace_ust_find_event

Add exclusion data to prototype of trace_ust_find_event()
Add exclusion data to the key structure in trace_ust_find_event()
Call trace_ust_find_event with exclusion data wherever possible

10 years agoAdd exclusion data to trace_ust_create_event
JP Ikaheimonen [Mon, 4 Nov 2013 13:08:59 +0000 (15:08 +0200)] 
Add exclusion data to trace_ust_create_event

Add exclusion data to the prototype of trace_ust_create_event
Copy exclusion data to the newly created ltt_ust_event structure
Call trace_ust_create_event with exclusion data, wherever possible

10 years agoAdd exclusion matching logic to trace_ust_ht_match_event
JP Ikaheimonen [Mon, 4 Nov 2013 13:00:30 +0000 (15:00 +0200)] 
Add exclusion matching logic to trace_ust_ht_match_event

10 years agoAdd event exclusion data to ltt_ust_event structure
JP Ikaheimonen [Mon, 4 Nov 2013 12:52:25 +0000 (14:52 +0200)] 
Add event exclusion data to ltt_ust_event structure

Add event exclusion data to ltt_ust_event and ltt_ust_ht_key.

10 years agoAdd exclusions to event_ust_enable_tracepoint
JP Ikaheimonen [Mon, 4 Nov 2013 12:47:20 +0000 (14:47 +0200)] 
Add exclusions to event_ust_enable_tracepoint

Add exclusion data to prototype of event_ust_enable_tracepoint()

10 years agoAdd exclusion data to cmd_enable_event
JP Ikaheimonen [Mon, 4 Nov 2013 12:36:05 +0000 (14:36 +0200)] 
Add exclusion data to cmd_enable_event

Add exclusion data to the prototype of cmd_enable_event().

10 years agoDefine a structure for event exclusion data
JP Ikaheimonen [Mon, 4 Nov 2013 12:22:25 +0000 (14:22 +0200)] 
Define a structure for event exclusion data

Define a structure that holds the event exclusion data. The last
data item is a flexible array that contains a variable number
of exclusion names.

10 years agoAdd exclusion data to enable-command
JP Ikaheimonen [Mon, 4 Nov 2013 11:52:26 +0000 (13:52 +0200)] 
Add exclusion data to enable-command

Add a new command id for enabling events with exclusions.
Add the exclusion data to the enable-event command structure.

10 years agoFix: document relayd live lock nesting
David Goulet [Thu, 14 Nov 2013 18:14:31 +0000 (13:14 -0500)] 
Fix: document relayd live lock nesting

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix concurrency issues while overwriting tracefiles in live
Julien Desfossez [Thu, 14 Nov 2013 17:51:30 +0000 (12:51 -0500)] 
Fix concurrency issues while overwriting tracefiles in live

Introduce a new lock to set the abort_flag in the viewer stream. This
lock is nested inside the tracefile rotation of the writer and is
taken before reading the tracefile in the viewer-side. That way, the
viewer-side has just to check this flag to know if it is safe to read.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTests: Add test_utils_expand_path to unit tests
Raphaël Beamonte [Wed, 13 Nov 2013 05:34:38 +0000 (00:34 -0500)] 
Tests: Add test_utils_expand_path to unit tests

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
10 years agoCorrect the behavior of the utils_expand_path function
Raphaël Beamonte [Wed, 13 Nov 2013 05:34:37 +0000 (00:34 -0500)] 
Correct the behavior of the utils_expand_path function

Even if the utils_expand_path function was intended to allow to
use unexistent directory paths, it was in fact only working for
some kind of arguments. Paths like "foo", "bar/" or "bar/foo"
when the "bar" directory does not exist wasn't working. This
patch introduce a new way to expand paths in this function that
also works properly for these kind of arguments.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
10 years agoTests: Add test_utils_resolve_relative to unit tests
Raphaël Beamonte [Wed, 13 Nov 2013 05:34:36 +0000 (00:34 -0500)] 
Tests: Add test_utils_resolve_relative to unit tests

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
10 years agoIntroduce a new utils_resolve_relative function
Raphaël Beamonte [Wed, 13 Nov 2013 05:34:35 +0000 (00:34 -0500)] 
Introduce a new utils_resolve_relative function

This function aims to resolve relative path such as './' and
'../' in the middle of a path string. This allows to use paths
such as '~/../test' that are received as '/home/x/../test' for
instance.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
10 years agoFix: Warn that kernel loglevels are unsupported
Jérémie Galarneau [Wed, 13 Nov 2013 20:43:58 +0000 (15:43 -0500)] 
Fix: Warn that kernel loglevels are unsupported

Warn the user when the log level option is used when the kernel domain
is selected. Also, don't show the log level in the confirmation message
when kernel events are selected.

Fixes Bug #645

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: unitialized variables in tests
Julien Desfossez [Tue, 12 Nov 2013 22:41:21 +0000 (17:41 -0500)] 
Fix: unitialized variables in tests

Some fields in the structures were not set before being sent. It was OK
in this context because it was useless parameters, but Coverity
complained.

Fixes Coverity 1127092 and 1127091

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoHandle the tracefile_size/count in live
Julien Desfossez [Wed, 13 Nov 2013 16:00:10 +0000 (11:00 -0500)] 
Handle the tracefile_size/count in live

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: don't use daemon() to daemonize
David Goulet [Tue, 12 Nov 2013 17:34:14 +0000 (12:34 -0500)] 
Fix: don't use daemon() to daemonize

This is done because now we can control when the parent should return
from the fork(). With this patch, it only returns when the session
daemon is ready to operate meaning it can receive commands.

The daemonize process for the child mimicks daemon(3) as in it sets the
setsid, chdir to / and dup 0, 1 and 2 into /dev/null.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: bad type of return variable
David Goulet [Tue, 12 Nov 2013 18:41:23 +0000 (13:41 -0500)] 
Fix: bad type of return variable

Fix coverity issue 1128442.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: typo in --sig-parent help
David Goulet [Tue, 12 Nov 2013 14:56:45 +0000 (09:56 -0500)] 
Fix: typo in --sig-parent help

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: Duplicate lttng-sessiond thread creation comments
Jérémie Galarneau [Mon, 11 Nov 2013 20:53:24 +0000 (15:53 -0500)] 
Fix: Duplicate lttng-sessiond thread creation comments

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: Don't dispatch uninitialized hash tables to the ht_cleanup thread
Jérémie Galarneau [Mon, 11 Nov 2013 20:30:08 +0000 (15:30 -0500)] 
Fix: Don't dispatch uninitialized hash tables to the ht_cleanup thread

Some error-handling code paths may call ht_cleanup_push() with NULL hash
tables which will crash the clean-up thread.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: add asserts and remove unused variable
David Goulet [Mon, 11 Nov 2013 19:42:06 +0000 (14:42 -0500)] 
Fix: add asserts and remove unused variable

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoUse lttng_read/lttng_write wrappers
Mathieu Desnoyers [Mon, 11 Nov 2013 19:12:26 +0000 (14:12 -0500)] 
Use lttng_read/lttng_write wrappers

This ensures we deal with EINTR and partial reads in the same way
everywhere.

This also fixes non-null-terminated string bug in
src/common/compat/compat-epoll.c and src/common/sessiond-comm/inet.c.

Also, lttng_pipe_read() and lttng_pipe_write() return values are changed
to simply match those of lttng_read() and lttng_write(). Their
implementation is replaced by the wrappers, except for locking and
checks.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoImplement lttng_read()/lttng_write()
Mathieu Desnoyers [Mon, 11 Nov 2013 17:42:08 +0000 (12:42 -0500)] 
Implement lttng_read()/lttng_write()

Handle EINTR and partial read/write in wrapper functions.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agorelayd live cleanup
Mathieu Desnoyers [Mon, 11 Nov 2013 17:24:02 +0000 (12:24 -0500)] 
relayd live cleanup

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoComment why we cannot rmdir the lttng and relayd rundir
Mathieu Desnoyers [Mon, 11 Nov 2013 15:51:58 +0000 (10:51 -0500)] 
Comment why we cannot rmdir the lttng and relayd rundir

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoRemove jul attach/detach, not needed for now
Mathieu Desnoyers [Mon, 11 Nov 2013 15:42:26 +0000 (10:42 -0500)] 
Remove jul attach/detach, not needed for now

Not needed, and corner cases not covered.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agojul-thread.h: cleanup include guards
Mathieu Desnoyers [Mon, 11 Nov 2013 15:28:56 +0000 (10:28 -0500)] 
jul-thread.h: cleanup include guards

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoCleanup: sessiond jul.c comments and error path
Mathieu Desnoyers [Mon, 11 Nov 2013 15:28:05 +0000 (10:28 -0500)] 
Cleanup: sessiond jul.c comments and error path

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoCleanup: jul.h include guards
Mathieu Desnoyers [Mon, 11 Nov 2013 15:03:46 +0000 (10:03 -0500)] 
Cleanup: jul.h include guards

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: comment not matching code
Mathieu Desnoyers [Mon, 11 Nov 2013 15:02:32 +0000 (10:02 -0500)] 
Fix: comment not matching code

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.04566 seconds and 4 git commands to generate.