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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
JP Ikaheimonen [Thu, 14 Nov 2013 09:31:09 +0000 (11:31 +0200)]
Add unit tests for enabling events with exclusions
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>
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
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.
JP Ikaheimonen [Tue, 5 Nov 2013 13:36:29 +0000 (15:36 +0200)]
Add exclusion names to diagnostic printouts
JP Ikaheimonen [Tue, 5 Nov 2013 12:09:03 +0000 (14:09 +0200)]
Detect and report exclusion option errors
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.
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.
JP Ikaheimonen [Tue, 5 Nov 2013 09:42:55 +0000 (11:42 +0200)]
Add usage for --exclude option
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.
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.
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.
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().
JP Ikaheimonen [Tue, 5 Nov 2013 06:10:55 +0000 (08:10 +0200)]
Copy exclusion data in shadow_copy_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.
JP Ikaheimonen [Mon, 4 Nov 2013 14:22:01 +0000 (16:22 +0200)]
Free exclusion data when ust_app_event is deleted
JP Ikaheimonen [Mon, 4 Nov 2013 14:19:49 +0000 (16:19 +0200)]
Copy event exclusion data in add_unique_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.
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.
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.
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().
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
JP Ikaheimonen [Mon, 4 Nov 2013 13:27:07 +0000 (15:27 +0200)]
Copy exclusion data in add_unique_ust_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
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
JP Ikaheimonen [Mon, 4 Nov 2013 13:00:30 +0000 (15:00 +0200)]
Add exclusion matching logic to trace_ust_ht_match_event
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.
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()
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().
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.
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Mathieu Desnoyers [Mon, 11 Nov 2013 14:56:37 +0000 (09:56 -0500)]
Revert "Fix: remove the rundir at the end of the cleanup"
This reverts commit
43c5442ea57aca20701fd49fba1e3456d48cc7b2.
We cannot remove the toplevel lttng rundir when sessiond exits, now that
it is also used by relayd.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 11 Nov 2013 14:52:13 +0000 (09:52 -0500)]
Revert "Fix: remove relayd rundir on cleanup"
This reverts commit
3f28e5619d0a5c2aacef18251b3263bd632199da.
When there are multiple relayd in parallel, we don't want to have a
teardown vs startup race where the directory is removed just after its
supposed creation.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
David Goulet [Fri, 8 Nov 2013 18:55:10 +0000 (13:55 -0500)]
Fix: remove relayd rundir on cleanup
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 7 Nov 2013 23:36:57 +0000 (18:36 -0500)]
Doc: update lttng.1 man page with JUL options
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 6 Nov 2013 22:18:16 +0000 (17:18 -0500)]
Statically linked lttng-ctl to live test
Signed-off-by: David Goulet <dgoulet@efficios.com>
Julien Desfossez [Wed, 16 Oct 2013 18:21:02 +0000 (14:21 -0400)]
Implement live viewer SEEK_LAST
When attaching to a live session, the viewer can now specify that it
wants to only receive the new packets instead of receiving the trace
from the beginning.
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Julien Desfossez [Wed, 6 Nov 2013 16:38:52 +0000 (11:38 -0500)]
Live unit test
The actual test :
- connect to the relayd on localhost
- list the sessions (should find only one)
- attach to the first session
- receive all the streams
- get all the metadata
- get one index per stream
- get one data packet
Then the session is stopped, destroyed and the daemons killed.
Two tests are also added just to for the lttng commands with a --live
session.
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Julien Desfossez [Wed, 6 Nov 2013 16:38:51 +0000 (11:38 -0500)]
Live: send the number of streams in list_sessions
This allows the viewer to quickly know if a session is really active or
just created and idle. Before this patch, we had to attach to a session
to discover the number of streams active in that session.
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 6 Nov 2013 18:29:07 +0000 (13:29 -0500)]
Fix: remove the rundir at the end of the cleanup
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 6 Nov 2013 18:25:20 +0000 (13:25 -0500)]
Write TCP JUL port in the lttng's rundir
The default name is jul.port and this file will be read by the JavaAgent
at init time so it can connect to a custom port without recompiling the
Java application or modifying the Java application with a sessiond port
option.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 6 Nov 2013 15:49:43 +0000 (10:49 -0500)]
Fix: application SIGBUS when starting in parallel with sessiond
There is a race between application startup and sessiond startup, where there
is an intermediate state where applications can SIGBUS if they see a zero-sized
shm, if the shm has been created, but not ftruncated yet.
On the sessiond side, we need to ensure that the shared memory is writeable by
applications as long as its size is 0, which allow applications to perform
ftruncate and extend its size.
On the UST side, another commit needs to ensure that UST can read the shared
memory file descriptor with a read() system call before they try accessing it
through a memory map (which triggers the SIGBUS if the access goes beyond the
file size)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 4 Nov 2013 21:34:38 +0000 (16:34 -0500)]
Fix: Uninitialized scalar variable
Fix coverity issue
1099611.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 4 Nov 2013 21:24:25 +0000 (16:24 -0500)]
Fix: missing LTTNG_OK return value for snapshot
After a successful kernel snapshot, the ret = LTTNG_OK was missing thus
returning 0 to the caller which was expecting LTTNG_OK.
Also, this patch fixes the live_timer_interval check at start that CAN
be -1 thus not trying to start it.
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 4 Nov 2013 20:47:17 +0000 (15:47 -0500)]
Fix: ressource leak in error path
Fix coverity issue
1107347.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 4 Nov 2013 20:45:04 +0000 (15:45 -0500)]
Fix: bad copy paste in enable-channel command
Fix coverity issue
1125546.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 4 Nov 2013 19:26:04 +0000 (14:26 -0500)]
Fix: fix misleading comment
Fixes #655
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 4 Nov 2013 19:17:20 +0000 (14:17 -0500)]
Fix: don't enable if param overflows when rounded up
Fixes #641
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 4 Nov 2013 18:43:32 +0000 (13:43 -0500)]
Fix: add default name in snapshot add-output msg
Fixes #634
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 4 Nov 2013 18:19:06 +0000 (13:19 -0500)]
Fix: arguments in the wrong order for fd-limit
This is related to a bug we've been seeing with a very HIGH load of
applications registering at the same time where the get/put counters get
out of sync. exhausting the fd pool quite rapidely even though there was
no fd leak.
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Jérémie Galarneau [Wed, 23 Oct 2013 16:08:47 +0000 (12:08 -0400)]
Fix: Some corrections to the lttng man page
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 17 Oct 2013 19:39:44 +0000 (15:39 -0400)]
Fix: use after free in jul_list_events
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 16 Oct 2013 19:42:52 +0000 (15:42 -0400)]
Fix: memory leak in error path in JUL list
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 16 Oct 2013 15:41:36 +0000 (11:41 -0400)]
Fix: JUL domain support with --disable-lttng-ust
Signed-off-by: David Goulet <dgoulet@efficios.com>
This page took 0.044938 seconds and 4 git commands to generate.