David Goulet [Tue, 27 Nov 2012 18:51:45 +0000 (13:51 -0500)]
Fix: run health test only if root
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Mon, 26 Nov 2012 20:58:08 +0000 (15:58 -0500)]
Clarify empty string/NULL filter errors
Fixes #404
Reported-by: Jesus Garcia <jesus.garcia@ericsson.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 22 Nov 2012 19:45:28 +0000 (14:45 -0500)]
Fix: add missing padding for UST filter
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 22 Nov 2012 19:11:15 +0000 (14:11 -0500)]
Update version to v2.1.0-rc8
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 22 Nov 2012 19:04:09 +0000 (14:04 -0500)]
Fix: Uninit. variable in lttng view
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 22 Nov 2012 16:54:50 +0000 (11:54 -0500)]
Add already enabled UST event error code
Return this error if the event is already enabled when found during an
enable event command.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 22 Nov 2012 15:22:09 +0000 (10:22 -0500)]
lttng.h API update: set filter becomes enable event with filter
The lttng_set_event_filter() is changed to
lttng_enable_event_with_filter() taking the same arguments. The lttng UI
now only uses this call. Note that the original lttng_enable_event() is
still available but will set the filter to NULL.
This is done since now UST allows to enable the same event with
different filters or/and loglevels. So, the events are still hashed by
name but matched by the name/filter/loglevel triplet. In order to add an
event to the hash table, those three attributes are needed at the
creation time thus adding this API call which takes them all at once.
There is some fixes in the match functions and filter setting from the
previous commit that were needed to make the overlap.sh tests works.
The loglevel_match function is removed because it is now only done in
the hash table match function which will eventually get merged making a
single loglevel match call site hence this function becomes useless.
Furthermore, the filter.c/.h are no longer required since the filter is
now added at event creation and CAN NOT be set after.
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 21 Nov 2012 17:28:03 +0000 (12:28 -0500)]
Change the UST event hash table match function
The event are now matched, when looked up, with the name/filter/loglevel
triplet since the UST tracer now allows us to enable the same event with
different filters or/and loglevels.
The disable command however only takes the event name so for now it
disable all events matching that name which is why we still hash by
event name.
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 19 Nov 2012 19:02:23 +0000 (14:02 -0500)]
Pass lttng_event struct to the set_filter API call
This is the first commit which aims at changing the event hash table key
from the single event name to event_name/filter/loglevel triplet.
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 20 Nov 2012 18:33:23 +0000 (13:33 -0500)]
Adding context to an event is no longer possible
The UST tracer does not allow to add context to an event so we've
removed that.
It is completely removed from the lttng UI so it's not possible either
to add one to the kernel. The "event_name" of lttng_add_context is now
ignored.
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 16 Nov 2012 18:38:11 +0000 (13:38 -0500)]
Add UST overlap tests
Tests the overlap of event names, wildcards, loglevels and filters.
Not added yet to the make check since this depends on lttng-ust 2.1 not
yet released.
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 16 Nov 2012 20:14:47 +0000 (15:14 -0500)]
Add filter sequence number to UST
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 14 Nov 2012 20:10:48 +0000 (15:10 -0500)]
Fix: Typo from a previous patch in an assert()
Typo got in with commit:
49c336c1679295a31b92223dca05feccfe3e3464
Fixes #399
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 14 Nov 2012 18:42:44 +0000 (13:42 -0500)]
Fix: Warn if session is running with lttng view
Fixes #156
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 14 Nov 2012 18:26:02 +0000 (13:26 -0500)]
Fix: Add bash requirement to README for make check
Fixes #387
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 14 Nov 2012 17:40:32 +0000 (12:40 -0500)]
Fix: add the notion of domain to lttng.1 man page
Fixes #194
Signed-off-by: David Goulet <dgoulet@efficios.com>
Woegerer, Paul [Wed, 14 Nov 2012 12:55:59 +0000 (13:55 +0100)]
Enable additional kernel probes
http://lists.lttng.org/pipermail/lttng-dev/2012-November/019046.html
Commit id in lttng-modules:
b283666ff19841a28b0448c6a867beb2f809f11a
Signed-off-by: Paul Woegerer <Paul_Woegerer@mentor.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 13 Nov 2012 20:32:33 +0000 (15:32 -0500)]
Update CodingStyle
Signed-off-by: David Goulet <dgoulet@efficios.com>
Simon Marchi [Tue, 13 Nov 2012 19:28:43 +0000 (14:28 -0500)]
Use the new functions for default subbuf sizes
Use the functions added by the previous commit. All the occurences of
the previous defines were replaced.
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Simon Marchi [Tue, 13 Nov 2012 19:28:42 +0000 (14:28 -0500)]
Add default subbuf sizes getter functions
This patch adds functions to retrieve defaults subbuf sizes. It uses the
DEFAULT_*_SUBBUF_SIZE defines from defaults.h but also make sure that
the values are at least as big as the page size.
The functions are defined as static inline in defaults.h.
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Simon Marchi [Tue, 13 Nov 2012 19:28:41 +0000 (14:28 -0500)]
Add max() and min() macro in common
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 13 Nov 2012 18:44:38 +0000 (13:44 -0500)]
Update version to v2.1.0-rc7
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 13 Nov 2012 18:44:02 +0000 (13:44 -0500)]
Fix: remove temporary directory for valid filters test
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 9 Nov 2012 20:28:06 +0000 (15:28 -0500)]
Fix: Add pointer check when freeing poll events
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 9 Nov 2012 20:23:48 +0000 (15:23 -0500)]
Fix: FD leak on thread error
Also, don't spawn the kernel thread if not root and the no-kernel option
is set.
Fixes #316
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 9 Nov 2012 18:52:39 +0000 (13:52 -0500)]
Fix: Wrong fd used by kernel_wait_quiescent
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 9 Nov 2012 18:37:25 +0000 (13:37 -0500)]
Support new lttng-ust error code
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 9 Nov 2012 18:36:02 +0000 (13:36 -0500)]
Fix: Don't set filter if enable event fails
Furthermore, the session daemon now returns an already exist error if
the event is enabled twice. Since we can now set filter, it's misleading
the user to tell him/her that the event was enabled but the filter
failed and than disabling the already enabled event by a previous
command.
Fixes #363 #364
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 9 Nov 2012 16:36:51 +0000 (11:36 -0500)]
Fix: Wrong data port when listing session
Fixes #377
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 8 Nov 2012 19:08:28 +0000 (14:08 -0500)]
Fix: Enable event after start command
Refer to the bug tracker for more information on this bug. In a
nutshell, it was not possible to enable channel/event after a start
command has been issued (for both kernel and UST).
Note that it is still NOT possible to enable a channel after a start but
the use case here was the following:
$ lttng create
$ lttng start
$ lttng enable-event -a -u (or -k)
The first starts does NOT create a kernel or UST session so the
following enable event creates the session for the given domain but
failed to start the session after.
https://bugs.lttng.org/issues/346
https://bugs.lttng.org/issues/394
Fixes #346 #394
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Thu, 8 Nov 2012 19:19:51 +0000 (14:19 -0500)]
Fix: Teardown of thread_manage_clients on failure of listen/create_poll
Currently, if the call to lttcomm_listen_unix_sock or
create_thread_poll_set fails, the error handling and thread teardown
code path is triggered via a jump to an error label. This error handling
path closes the sockets that were used and cleanup the poll set. If the
listen fails, the poll set will tentatively be cleaned even though it
has never been initialized.
This patch add 2 labels to differentiate the error handling paths needed
in case of failure of lttcomm_listen_unix_sock or
create_thread_poll_set.
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 1 Nov 2012 15:24:22 +0000 (11:24 -0400)]
Add a timeout to UST application socket
By default, a 5 seconds timeout is set on every UST application socket
just after the accept() for both recv and send operation.
This value can be changed through a new environment variable (seconds)
of the session daemon.
This is the first step to fix bug386 where a stopped application can
stalls indefinitely the session daemon when a new command is sent.
The bug 386 is also fixed with the lttng-ust commit:
7bc53e94a229963972aa78880b361b1510fdd268
Fixes #386
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 7 Nov 2012 20:32:13 +0000 (15:32 -0500)]
Revert "Fix cross-compile"
This reverts commit
5692e22beeb7119d68055d6450b924972b5f20d0.
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Wed, 7 Nov 2012 20:13:21 +0000 (15:13 -0500)]
Fix cross-compile
configure.ac should use --target, not --host to get the target info we
want to compile for. --host is for the host that does the build.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 6 Nov 2012 20:55:58 +0000 (15:55 -0500)]
Fix: Consumerd error socket connect race
Fixes #366
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 31 Oct 2012 19:12:00 +0000 (15:12 -0400)]
Fix: Set CLOEXEC flag on every created sockets
Every new socket created by an accept() in the session daemon is set
with the CLOEXEC flag so when the consumer is spawned we don't leak.
Fixes #367
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 6 Nov 2012 15:18:26 +0000 (10:18 -0500)]
Remove consumer poll timeout in data thread
This was originally used to stop any poll() after a grace period when a
session daemon dies in case of weird stuck fd(s).
However, things have changed a bit especially on the UST tracer side
where all stream handles are now cleaned up if the session daemon socket
hang up which than release every stream on the consumer and finally
quits gracefully.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 6 Nov 2012 20:21:18 +0000 (15:21 -0500)]
Fix: RCU hash table seed
Remove the dangerous static value 0x42UL. Use time(NULL) value to set
the new lttng_ht_seed variable when the hash table library constructor
is called.
Fixes #388
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Tue, 6 Nov 2012 18:32:05 +0000 (13:32 -0500)]
Fix: Do not install health tests helper libraries
The libraries libhealthexit and libhealthstall should not be installed
on the user system. They are only useful for the health check tests.
Furthermore, when adding libraries to noinst_LTLIBRARIES, libtool will
only build these as static libraries (see [1] for a workaround). This is
fine for most use cases, but for the health tests, we _must_ have shared
libraries (the nature of the tests require LD_PRELOAD), hence we force
the build of a shared object.
Forcing shared object has the unfortunate side-effect of breaking builds
where configure was invoked with "--disable-shared" flag. Instead of
failing badly, detect this flag and skip the health tests altogether.
noinst shared libs:
[1] - https://lists.gnu.org/archive/html/libtool/2008-06/msg00082.html
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 6 Nov 2012 19:35:43 +0000 (14:35 -0500)]
Fix: Create default channel on add-context if none
For both kernel and UST, if no channel exists and an add-context command
is sent, the default channel0 is created and the context(es) are set.
Fixes #391
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Tue, 6 Nov 2012 18:47:17 +0000 (13:47 -0500)]
Support new liblttng-ust-ctl error code
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 6 Nov 2012 14:41:35 +0000 (09:41 -0500)]
Fix: Add EPIPE error handling on buffer splice
Even though this is _not_ documented in splice(2), if the fd_out is a
socket but closed on one end, splice returns a negative value and set
errno to EPIPE. The man page specifies a EBADF but I guess both are
possible (and it is according to the kernel 3.6.2 source).
So, when streaming a kernel session (using splice), if the relayd quits,
a splice on the socket returns an EPIPE.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 5 Nov 2012 22:03:19 +0000 (17:03 -0500)]
Fix: Channel creation error return code was not set
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 5 Nov 2012 21:49:40 +0000 (16:49 -0500)]
Fix: Wrong poll events on UST application socket
The thread manage apps was adding UST sockets to the poll set with the
POLLIN event registered. However, the thread was not handling this event
which could ultimately cause an infinite loop if the application sends
data.
This has been observed with the bug386 when an application is stopped
and a lttng command is sent.
https://bugs.lttng.org/issues/386
Furthermore, a time window between the send and the reply recv of an UST
command was making the app manager loop actively because of a POLLIN
event on the socket caused by the reply from the application which is
finally handled a bit after by the client thread. This was not that
problematic but lead to a lot of repeated debug message and CPU time
lost.
This application thread is *only* handling error event usually triggered
by a close() on the UST socket thus OK to *not* wait for POLLIN/POLLOUT
event.
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Fri, 2 Nov 2012 19:04:02 +0000 (15:04 -0400)]
Fix: Remove dependency to urcu-cds in tools tests
The -lurcu-cds link flag is not mandatory to link any of the tests.
Also, adding this flag can cause multiple symbol definition errors when
linking statically because the libhashtable contains symbol names that
are also present in urcu-cds.
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Fri, 2 Nov 2012 19:03:17 +0000 (15:03 -0400)]
Fix: Missing librt dependency in configure check for lttng-ust-ctl
The lttng-ust-ctl library depends on librt. The AC_CHECK_LIBRARY macro
can't automatically resolve dependents libraries (ala libtool), so any
additionnals dependencies must be manually specified.
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 2 Nov 2012 18:14:26 +0000 (14:14 -0400)]
Fix: Don't append datetime to default session name
The liblttng-ctl was appending the date and time to the "auto" session
if detected. The 'auto' keyword is only used by lttng command line
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 2 Nov 2012 17:45:05 +0000 (13:45 -0400)]
Fix: Deny session creation name 'auto'
This is a reserved keyword for default session(s). Note that this is
only for the lttng command line tool. Using 'auto' is possible with the
API but the current date and time is automatically appended to it for
now so be aware of that.
Fixes #359
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 2 Nov 2012 17:16:29 +0000 (13:16 -0400)]
Fix: Add space for stream name CPU number
Fixes #358
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 2 Nov 2012 16:38:33 +0000 (12:38 -0400)]
Fix: Add output option to enable-channel command
Allow to specify an output mode for the channel (MMAP or SPLICE).
A new error code is introduced to notify the user that the operation is
not supported. Useful for user space tracing which does NOT support
splice mode.
Fixes #335
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 2 Nov 2012 15:31:28 +0000 (11:31 -0400)]
Update version to v2.1.0-rc6
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Wed, 31 Oct 2012 13:00:45 +0000 (09:00 -0400)]
Tests: Add filtering tests for uncovered cases
While investigating the code coverage of the filtering feature, a couple
of possible tests cases were uncovered:
Error tests:
* Strings can't be IR root node
* Unary ! not allowed on string type
* Comparison with string type not allowed
* Logical operator not allowed with string types
* Nesting of binary operator not allowed
Valid tests:
* Cover all left/right operands permutations with
fields ref. and numeric values.
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 1 Nov 2012 20:27:08 +0000 (16:27 -0400)]
Fix: Sync issue when deleting a data stream
A data stream was rescheduled for deletion after a flush on hang up.
Once in a normal read code path, on error, the stream is deleted and
then processed for ERR|HUP error which could also delete again the
stream causing an assert() and a failed trace.
We fix that by setting the local array to NULL for that stream once
deleted and ignoring the stream is subsequent loop if NULL.
Fixes #390
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 1 Nov 2012 17:02:58 +0000 (13:02 -0400)]
Rename data_available to data_pending
This is just a rename and a change of semantic.
The lttng_data_pending returns 0 if _NO_ data is pending meaning that
the buffers are ready to be read safely. A value of 1 means that data is
still pending so the buffers are not ready for any read.
This is the same semantic as lttng_data_available but in reverse order.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 31 Oct 2012 16:39:19 +0000 (12:39 -0400)]
Fix: consumer health state
Fixes #389
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 30 Oct 2012 19:17:06 +0000 (15:17 -0400)]
Fix: Add the ACCOUNTING flag to ht creation and set bucket size to 0
The resize feature does not work well without the accounting :)
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 30 Oct 2012 19:11:18 +0000 (15:11 -0400)]
Fix: Bad return error code handling
Two things here. First, if the tracer dies before we have time to create
the session on it, the returned value (-1) was not handled creating a
segfault on the following loop.
Second, we no longer assert on the application PID hash table delete
return value since we use add_replace on app. registration creating a
possible key reuse for a different node.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 30 Oct 2012 14:39:41 +0000 (10:39 -0400)]
Fix: Use after free() of the rundir string
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 29 Oct 2012 18:49:50 +0000 (14:49 -0400)]
Fix: Cleanup UST app session on ustctl create session error
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 29 Oct 2012 16:02:14 +0000 (12:02 -0400)]
Fix: add missing pthread_join in sessiond
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 17:30:08 +0000 (13:30 -0400)]
Fix: free running directory string
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 17:23:25 +0000 (13:23 -0400)]
Fix: UST app clean list node usage
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 17:12:47 +0000 (13:12 -0400)]
Add liblttng-ctl destructor to cleanup memory
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 17:09:29 +0000 (13:09 -0400)]
Fix: Cleanup URIs on teardown
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 17:04:27 +0000 (13:04 -0400)]
Fix: relayd memleaks
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 16:32:42 +0000 (12:32 -0400)]
Fix: Memory leaks of allocated URIs
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 16:20:41 +0000 (12:20 -0400)]
Fix: consumer output memory leak on creation
The sockets hash table was allocated two times hence losing the first
reference at the second allocation.
Furthermore, when a kernel/ust session is created, a default consumer is
allocated but was lost short after that when the tracing session current
consumer was copied and the pointer was overwritten.
Note that this fixes the memory leak but there is a code logic that
seems wrong when it comes to handle the consumer object trace path and
subdir during the session creation. A comment has been added and it
should be fixed.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 15:48:19 +0000 (11:48 -0400)]
Fix: missing addrlen initialization before accept(2)
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 15:23:15 +0000 (11:23 -0400)]
Fix: relayd trace file padding memleak
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 15:18:12 +0000 (11:18 -0400)]
Fix: Remove useless consumer subdir string concatenation
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 14:33:16 +0000 (10:33 -0400)]
Fix: lttng create allocated path memleak
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 14:28:21 +0000 (10:28 -0400)]
Fix: Cppcheck memleakOnRealloc mistake
Common realloc mistake: "data_buffer" nulled but not freed upon failure.
Common realloc mistake: "tmp" nulled but not freed upon failure
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 25 Oct 2012 19:48:15 +0000 (15:48 -0400)]
Fix: Synchronization issue for data available command
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 25 Oct 2012 19:34:59 +0000 (15:34 -0400)]
Fix: consumer relayd cleanup on disconnect
Improve the resilience of the consumer by cleaning up a relayd object
and all associated streams when a write error is detected on a relayd
socket.
Fixes #385
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Tue, 23 Oct 2012 19:36:41 +0000 (15:36 -0400)]
Fix: Handle the unary bitwise negation operator (~) in the XML printer
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Tue, 23 Oct 2012 19:36:17 +0000 (15:36 -0400)]
Fix: Possible memory leaks when creating filter IR root node
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 24 Oct 2012 16:40:59 +0000 (12:40 -0400)]
Fix: Delete stream on write error in consumer
Whenever a write() error occured, both on network or local trace file,
the consumer thread just died considering the error a fatal one.
This commit fixes that by simply deleting the stream, removing it from
the poll set of the thread and freeing it.
Furthermore, on a write() error, a SIGPIPE is usually raised if the FD
is invalid. The consumer is catching this signal but was initiating a
should exit action thus ultimately cleaning all threads. We now still
catch SIGPIPE but don't set the should quit flag so normal cleanup can
be done by the threads.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 22 Oct 2012 21:24:40 +0000 (17:24 -0400)]
Fix: Error handling when sending relayd sockets to consumer
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 22 Oct 2012 21:18:44 +0000 (17:18 -0400)]
Add stream lock comment for nesting
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 22 Oct 2012 21:16:38 +0000 (17:16 -0400)]
Fix: Mutex and RCU lock nesting in consumer
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 22 Oct 2012 21:15:19 +0000 (17:15 -0400)]
Fix: Uninitialized ret code
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 22 Oct 2012 20:44:51 +0000 (16:44 -0400)]
Fix: Remove bad condition and fix overflow issue
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 22 Oct 2012 20:38:52 +0000 (16:38 -0400)]
Fix: consumerd pthread error flow
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 22 Oct 2012 20:37:10 +0000 (16:37 -0400)]
Fix: Set a single return point and mutex unlock
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 22 Oct 2012 20:34:18 +0000 (16:34 -0400)]
Fix: Remove useless NULL and zero assignment
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 22 Oct 2012 19:32:34 +0000 (15:32 -0400)]
Fix: segfault on create session with two URLs
https://bugs.lttng.org/issues/350
Fixes #350
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 22 Oct 2012 16:32:22 +0000 (12:32 -0400)]
Update version to v2.1.0-rc5
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 22 Oct 2012 16:25:45 +0000 (12:25 -0400)]
Fix: Add missing header to makefile
Signed-off-by: David Goulet <dgoulet@efficios.com>
Julien Desfossez [Wed, 17 Oct 2012 00:44:13 +0000 (20:44 -0400)]
Fix: Remove network stream ID ABI calls
This patch removes some experimental kernel ABI calls that were not
supposed to get merged. The kernel support for these calls has never
been introduced in lttng-modules.
I'm not sure how it happened, but it seems that this code got introduced
along with the commit
00e2e675d54dc726a7c8f8887c889cc8ef022003
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Tue, 16 Oct 2012 18:33:23 +0000 (14:33 -0400)]
Tests: Add filtering tests to configure
Add filtering folder to top-level Makefile.am. Also add a runall script
to run all filtering tests.
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Tue, 16 Oct 2012 18:33:22 +0000 (14:33 -0400)]
Tests: Add a test for valid filters
This test validate that for a given filter the expected trace output is
conform to the expected filter behavior.
This test rely on the babelstats utility. With the help of this script,
we can verify that the expected minimum and maximum values on fields of
interest are within the expected ranges.
For example, given 100 iterations on a tracepoint with the field
'intfield', with values starting from 0 and incrementing on each
iteration, and the filter expression 'intfield < 4', we would expect
that the min-max range lie within [0,3].
Thus, if the babelstat computed range does not match the expected range,
this could potentially indicate failure in the filtering mechanism.
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Tue, 16 Oct 2012 18:33:21 +0000 (14:33 -0400)]
Tests: Add a trace statistics utility
The babelstats script output statistics on fields values for
a particular tracepoint. At the moment, the script only show
minimum and maximum value for each fields of a particular
tracepoint.
The trace must be in the babeltrace text format. It can be
passed via stdin.
The script output this format:
field_name min max
Sample usage:
> babeltrace sometracedir | babelstats.pl --tracepoint tp:tptest
_seqfield1_length 4 4
seqfield2 "test" "test"
stringfield2 "\*" "\*"
floatfield 2222 2222
netintfieldhex 0x0 0x63
_seqfield2_length 4 4
longfield 0 99
netintfield 0 99
intfield2 0x0 0x63
intfield 0 99
stringfield "test" "test"
doublefield 2 2
arrfield2 "test" "test"
Use case:
This script could be useful to validate that fields values
are within some predefined expected ranges.
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Tue, 16 Oct 2012 18:33:20 +0000 (14:33 -0400)]
Tests: Add a test for invalid filters
This test validate that an invalid filter (unmatched parenthesis,
field dereferences, unsupported ops, etc.) are correctly flagged
as such.
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Tue, 16 Oct 2012 18:33:19 +0000 (14:33 -0400)]
Tests: Add an unsupported operators filtering test
This test validate that filters with unsupported operators are
correctly flagged and that an enable event with these filters
properly fails.
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 17 Oct 2012 17:40:49 +0000 (13:40 -0400)]
Wait for data availability when stopping a session
The lttng_stop_tracing now waits by default for data availability. A
status output is added in the library on stdout.
A no wait version is added to the API and the option no-wait is added to
the lttng command line for the stop command.
Also good to note that if a second stop_tracing call is done on an
already stopped session, the call will wait for data availability before
returning if the stop command on the session daemon returned an already
stopped error code.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 19 Oct 2012 16:48:45 +0000 (12:48 -0400)]
Relayd data available command support
Add the data available support on the relayd side and use it if the
tracing session is streaming on the network.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 17 Oct 2012 16:05:42 +0000 (12:05 -0400)]
Lib lttng-ctl data available command support
New API call lttng_data_available that returns 0 if the data is NOT
available for reading or else 1 if it it.
The session daemon supports the call and uses the consumer data
available feature.
Note that there is still no support for this command on the relayd side
at this commit.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 16 Oct 2012 20:42:40 +0000 (16:42 -0400)]
Consumer daemon data available command support
Only the UST and kernel consumer daemon supports the data available
command thus it's not yet implemented on the session daemon.
Once implemented in the liblttng-ctl and session daemon, the commit will
explain the purpose of this command.
This is mostly to separate commits so we don't push a 2000 liners
upstream.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 16 Oct 2012 19:06:12 +0000 (15:06 -0400)]
Support the add operation of urcu hash table
This add operation supports redundant keys in the table.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 16 Oct 2012 18:08:08 +0000 (14:08 -0400)]
Add data structure for the data available command
The new stream hash table indexed by session id is added. The per
consumer stream mutex used for the synchronization between threads
accessing the stream which will be indexed in two hash tables.
Also, the data available command is added to both UST and kernel
consumer but for now returns ENOSYS. Just set the skeleton for the
implementation.
Finally, the session id is added to the trace-kernel (where it already
exists for UST) so it could be used later on for the data available
command.
This session id is also added in the consumer data structure for the
same purpose.
Signed-off-by: David Goulet <dgoulet@efficios.com>
This page took 0.043642 seconds and 4 git commands to generate.