David Goulet [Fri, 24 Aug 2012 15:15:29 +0000 (11:15 -0400)]
Install lttng-error.h and include it in lttng.h
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 22 Aug 2012 19:04:52 +0000 (15:04 -0400)]
Add lttng-error.h containing every API err. code
Move all error codes from sessiond-comm.h to lttng-error.h and rename
them changing the prefix LTTCOMM* to the LTTNG_ERR_*.
With this change, the error codes will soon be public in
<lttng/lttng-error.h> that lttng.h will include by default.
This commit also removes a bunch of unused code but does NOT changed the
values so we don't break the 2.0 API.
The lttng_strerror() call uses the new error_get_str function. The
lttcomm_* API now only have internal communication error code such as
the consumerd errors. Those codes must NEVER be exposed to the public
API or, in that case, must be moved to lttng-error.h *without* changing
the current values of the lttng_error_code enum.
The gaps in the lttng_error_code enum found in lttng-error.h can be used
for new error codes but the assigned value are considered immutable for
the 2.x API.
Signed-off-by: David Goulet <dgoulet@efficios.com>
Julien Desfossez [Thu, 23 Aug 2012 17:24:46 +0000 (13:24 -0400)]
Fix: missing hostname context
This context adds the hostname context field for the event(s) selected.
It is particularly useful when tracing a machine with containers (lxc),
that way we can easily distinguish events generated inside a container.
The API is extended but no features nor behaviors are changed.
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 22 Aug 2012 16:41:55 +0000 (12:41 -0400)]
Update version to v2.1.0-rc2
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 22 Aug 2012 16:27:23 +0000 (12:27 -0400)]
Fix: put back 2.0 output text for lttng create cmd
The create command was printing new messages with the changes made from
2.0 to 2.1 which is considered to be an API breakage.
This patch puts back the message output of 2.0 for the lttng create
command.
Reported-by: <bernd.hufmann@ericsson.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 22 Aug 2012 16:12:27 +0000 (12:12 -0400)]
Fix: remove set subdir call that uses bad ptr
When copying a consumer object from the tracing session to a specific
domain session, the original consumer of the session was modified by
appending the session name and datetime once again.
We ended up removing the call since at this stage in the code, the
session name and date is already appended if necessary.
Reported-by: <bernd.hufmann@ericsson.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Wed, 22 Aug 2012 13:34:03 +0000 (09:34 -0400)]
Filter: Handle the unary bitwise not operator (~) with an unsupported op error
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, 21 Aug 2012 16:31:14 +0000 (12:31 -0400)]
Fix: missing mutex unlock on register consumer err
Reported-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 21 Aug 2012 15:51:23 +0000 (11:51 -0400)]
Remove underscore from ifndef of lttng.h
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 21 Aug 2012 15:49:44 +0000 (11:49 -0400)]
Remove unused define in lttng.h
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 21 Aug 2012 15:38:27 +0000 (11:38 -0400)]
Standardize lttng command line usage text
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 20 Aug 2012 21:12:51 +0000 (17:12 -0400)]
Merge duplicate code in consumer for destroy relayd
Kernel and UST were using the same exact code for the DESTROY_RELAYD
command received from the session daemon.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 20 Aug 2012 20:52:07 +0000 (16:52 -0400)]
Merge duplicate code in consumer for add relayd
The kernel and UST consumer were basically using the same exact code
when receiving a ADD_RELAYD command from the session daemon. We have
merge it in one simple function that both uses.
The daemon behavior is NOT altered with this patch.
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Mon, 20 Aug 2012 19:56:06 +0000 (15:56 -0400)]
Fix: Possible buffer overflows in strncat() usage
When using strncat, the size_t n argument must indicate the left over
space remaining in the buffer, *not* the total buffer size. Also, proper
care must be taken for the case where src contains n or more bytes and
thus allow space for the null terminating byte appended to dest (e.g.
strncat() will write n+1 bytes).
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 20 Aug 2012 19:42:10 +0000 (15:42 -0400)]
Move code out of main.c and fix some issues
This is a "code location refactoring". The file main.c was getting a bit
too HUGE so this commit splits the command subsystem of the session
daemon into cmd.c/.h and all helper functions used.
This commit also fixes missing rcu read side lock and the consumer
output hashtable memory leak on destroy.
Minor changes were made to functions call to pass needed variables from
the main.c to the command subsystem.
The behavior was not changed nor altered in any way.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 17 Aug 2012 19:50:00 +0000 (15:50 -0400)]
Update version to v2.1.0-rc1
Bump internal UST major version.
Fix comments and debug output to follow this change.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 17 Aug 2012 19:48:23 +0000 (15:48 -0400)]
Add missing decl. when UST is disabled
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 17 Aug 2012 19:38:05 +0000 (15:38 -0400)]
Add missing scripts to the dist package
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 17 Aug 2012 19:23:09 +0000 (15:23 -0400)]
Fix: UST app major version check
Makes a direct match between the major version of the application and
the one supported by lttng-tools (==).
Note that this version numbering is an internal scheme between UST and
lttng-tools. It has no link whatsoever with the public version of the
toolchain.
The 2.1.0-rc1 release commit will make sure this version corresponds to
the UST rc1.
CC: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 17 Aug 2012 19:03:39 +0000 (15:03 -0400)]
Fix relayd version check and remove unused code
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 17 Aug 2012 18:02:56 +0000 (14:02 -0400)]
Fix lttng view using lttng list sessions
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 17 Aug 2012 17:02:14 +0000 (13:02 -0400)]
Fix comments and help text
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 17 Aug 2012 16:47:16 +0000 (12:47 -0400)]
Fix: lttng list command with network path
With network consumer, the session path was simply NULL or set to the
wrong local filesystem path when a consumer was set to use the network.
This commit adds the support for network path description when a lttng
list command is received.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 16 Aug 2012 20:12:12 +0000 (16:12 -0400)]
Deny register consumer if one exists
Is a LTTNG_REGISTER_CONSUMER command is received and a consumer is
already spawned, the command is denied returning a kernel consumer
error.
CC: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 16 Aug 2012 18:57:13 +0000 (14:57 -0400)]
Fix: Subdirectory handling for lttng and sessiond
The subdirectory creation was not right for a number of scenarios. With
this commit, if the user defines a path (either local or remote), the
session name will NOT be added to the path.
To handle the timestamp creation of the directory, a hidden function was
added to the lttng-ctl (meaning not visible through lttng.h) which takes
the date and time as a string and append it to the URI subdirectory if
none was provided for a network destination. This function is declared
as extern in the lttng client so it could link to it through the
liblttng-ctl (_lttng_create_session_ext).
It allows the timestamp of a session to be created on the client side
and keep the lttng_create_session() behavior intact meaning if a path is
define by the user when using the API directly, the traces are written
in that path without an extra session name directory.
There is one case where the timestamp is generated on the daemon side.
When creating a session with a local filesystem destination and then
switching to a network consumer, at that time the timestamp is
generated.
The real problematic, and why this has been done this way, is because we
can't transfer the timestamp between the client and the session daemon.
The only possible way that could be achieve right now is by parsing the
subdirectory of the URI containing the session name and timestamp
appended. This could be error prone and bring false negative.
CC: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Wed, 15 Aug 2012 16:39:31 +0000 (12:39 -0400)]
Cleanup: Remove unused get_default_session_name()
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 [Wed, 15 Aug 2012 16:39:30 +0000 (12:39 -0400)]
Fix: Invalid free on session_name when destroying session
The session_name should not be free(3) if the user has specified a
session name on the command line. Also, the caller is responsible to
free the allocated string when calling get_session_name(). Handle both
cases gracefully.
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>
Mathieu Desnoyers [Thu, 16 Aug 2012 19:17:11 +0000 (15:17 -0400)]
Fix: 32-bit print format type mismatch warnings
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Thu, 16 Aug 2012 14:51:01 +0000 (10:51 -0400)]
Cleanup: symbols in parser protected -> hidden
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
David Goulet [Thu, 16 Aug 2012 14:46:26 +0000 (10:46 -0400)]
Fix: set kernel consumer output directory
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 15 Aug 2012 20:50:27 +0000 (16:50 -0400)]
Add commented debug lines to test
Useful when a test fails, just uncomment the lines :)
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 15 Aug 2012 20:41:37 +0000 (16:41 -0400)]
Fix: multiple consumer locking problems
First, a lot of rcu_read_unlock() were missing the consumer command
handler which could make a rcu lock and return on error without
unlocking.
Fix goto error path in the consumer.
Fix a missing lock control socket mutex.
Fix memory leaks in a UST session where the consumers output object were
not freed during a destroy command.
Add a relayd sockets sent flag so we don't resend existing sockets to
the consumer during an enable_consumer command.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 15 Aug 2012 15:47:06 +0000 (11:47 -0400)]
Backport HT fixes from urcu upstream
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 15 Aug 2012 15:10:36 +0000 (11:10 -0400)]
Make the configure check for ustctl_set_filter
This function call will be part of the 2.1 release and lttng-tools 2.1
needs lttng-ust-ctl 2.1 for user space tracing to work.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 15 Aug 2012 14:41:46 +0000 (10:41 -0400)]
Fix typos in uri_switch test
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Tue, 14 Aug 2012 22:02:32 +0000 (18:02 -0400)]
New URI switching tests
test_uri_switch_localhost_folder:
Random switching of the ouput folder for streaming on localhost.
test_uri_switch_file_network:
Create a session with a file:// URI and enable the consumer with a
net:// URI.
test_uri_switch_network_file:
Create a session with a net:// URI and enable the consumer with a
file:// URI.
All tests support IPv4 and IPv6 streaming targets.
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 14 Aug 2012 21:14:04 +0000 (17:14 -0400)]
Fix: Possible invalid read on string in set_ip_address()
Acked-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Tue, 14 Aug 2012 20:33:39 +0000 (16:33 -0400)]
Fix: Use Python 2.x for the run-report script
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 14 Aug 2012 21:08:12 +0000 (17:08 -0400)]
Activate streaming tests in make check
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Tue, 14 Aug 2012 20:33:41 +0000 (16:33 -0400)]
Fix: Memory leaks in uri_parsing unit tests.
lttng_uri need to be free'd by calling uri_free().
Add: Unit tests for uri comparison (uri_cmp).
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 7 Aug 2012 19:47:19 +0000 (15:47 -0400)]
Extend API and remove lttng_uri from lttng.h
This is a big commit but actually not adding much.
First, struct lttng_uri is removed from lttng.h and replaced by calls
using string URL. The lttng_set_consumer_url is changed to "_url" taking
an handle, a control and a data string URL. You can find the definition
in proposal doc/proposals/0004-lttng-address-api.txt.
The lttng_create_session_uri is removed and the path from the original
lttng_create_session is now used to either pass a local filesystem full
path or a string URL.
Multiple fixes in uri_parse() also especially for IPv6 where address
MUST be enclosed in brackets [] in the string representation.
The help of lttng create and enable-consumer is updated and improved.
Also, the enable-consumer command can now be used without a domain
switch (-u/-k) so the destination URL is set to the global tracing
session and on both UST and kernel session if there is an existing
consumer.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 14 Aug 2012 20:13:00 +0000 (16:13 -0400)]
Fix: bad file descriptor on close in health check
The new socket used to store the accept() socket was not initialized
making the close() failed if NO health check command was previously
done.
Reported-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 14 Aug 2012 17:12:24 +0000 (13:12 -0400)]
Fix: remove adjustment on written var for metadata
This was generating the following error each time metadata was streamed
over the network.
Error: Error writing to tracefile
The return value was off by 8 bytes which is the header stream id size.
However, the "written" variable is not used in the metadata command to
the relayd so there is no use of updating it to fit the expected len of
the mmap() caller.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 14 Aug 2012 14:30:26 +0000 (10:30 -0400)]
Update proposal 0004-lttng-address-api
Change the lttng_set_consumer_url(...) to use two URL arguments for the
control and data.
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Fri, 3 Aug 2012 20:31:28 +0000 (16:31 -0400)]
Fix: Missing libs dependencies in configure check for lttng-ust-ctl
The lttng-ust-ctl library depends on liburcu-{common,bp,cds}. The
AC_CHECK_LIBRARY macro can't automatically resolve dependents libraries
(ala libtool), so any additionnals dependencies must be manually
specified.
Also, the AC_CHECK_LIB action-if-found case for the lttng-ust-ctl check
is modified to have a similar behavior as the default action, which is
to define HAVE_LIBxxx and append -lxxx to $LIBS, *except* for the later
step. This is to ensure that any future addition of AC_CHECK_LIB after
the one for lttng-ust-ctl will not need to append the liburcu
dependencies or fail unexpectedly.
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 [Fri, 3 Aug 2012 20:31:27 +0000 (16:31 -0400)]
Fix: Libtool fails to find dependent libraries when cross-compiling lttng-tools
This problem arise when cross compiling and linking libraries with
indirect libraries dependencies (such as liblttng-ust). This "bug" is
caused by an upstream modification in the libtool package on Debian
system. The libtool "link_all_deplibs" flag is set to "no" by default
on linux targets (AFAIK, other distros set it to "unknown").
The chosen solution is to detect such cases via the configure script
and automagically patch the libtool.m4 by forcing the "link_all_deplibs"
to "unknown".
This fixup can be disabled with the appropriate configure flag:
./configure --disable-libtool-linkdep-fixup
Sample configure output on affected systems:
checking for occurence(s) of link_all_deplibs = no in
./config/libtool.m4... 3
configure: WARNING: the detected libtool will not link all
dependencies, forcing link_all_deplibs = unknown
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>
Mathieu Desnoyers [Fri, 10 Aug 2012 21:19:53 +0000 (17:19 -0400)]
Fix: protect visibility of filter-parser functions
Some functions share the same name between ctf-parser/lexer and
filter-parser/lexer.
This patch protects the visibility of the functions with the same name
to avoid linkage confusions.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Christian Babeux [Fri, 10 Aug 2012 17:22:52 +0000 (13:22 -0400)]
Fix: Wrong domain used when initializing IPv6 sockets
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Fri, 10 Aug 2012 17:22:51 +0000 (13:22 -0400)]
Fix: Off by one in lttcomm_sock_domain enum
The wrong value is used to lookup the socket creation function in
net_families causing a segfault when using IPv6.
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 7 Aug 2012 16:08:30 +0000 (12:08 -0400)]
Add lttng URL proposal for the public API
Initial import after three round of review on lttng-dev mailing list.
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Tue, 7 Aug 2012 17:40:28 +0000 (13:40 -0400)]
Revert "Cleanup: YYPARSE_PARAM and YYLEX_PARAM are deprecated in bison 2.6"
This reverts commit
9d3e6f62fde8c9ca7335ba12ee4560bc887b41a5.
Still needed for bison 2.5.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 7 Aug 2012 15:23:21 +0000 (11:23 -0400)]
Cleanup: YYPARSE_PARAM and YYLEX_PARAM are deprecated in bison 2.6
See https://lists.gnu.org/archive/html/info-gnu/2012-07/msg00011.html
Reported-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 7 Aug 2012 15:19:52 +0000 (11:19 -0400)]
Filter fix: support bison 2.6
Bison 2.6 generates warnings and errors if filter-ast.h is not included
before filter-parser.h.
Reported-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 7 Aug 2012 14:43:18 +0000 (10:43 -0400)]
Cleanup: Remove misplaced config.h include
config.h should _always_ be included first, before system headers, to
ensure coherent size_t across the file.
We force the config.h inclusion by the compiler, so this is not an issue
(configure.ac: DEFAULT_INCLUDES="-I\$(top_srcdir) -I\$(top_builddir)
-I\$(top_builddir)/src -I\$(top_builddir)/include -include config.h"),
but let's remove this misleading line of code.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 6 Aug 2012 17:57:31 +0000 (13:57 -0400)]
Fix socket lock and PID in register_consumer
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 31 Jul 2012 16:40:01 +0000 (12:40 -0400)]
Add lttng address API proposal. Initial import
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 31 Jul 2012 16:35:39 +0000 (12:35 -0400)]
Divide read subbuffer consumer function
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 30 Jul 2012 16:41:10 +0000 (12:41 -0400)]
Merge mmap/splice fct. for both consumers
Between UST and kernel, there was duplicate portion of code for the mmap
and splice read subbuffer functions.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 26 Jul 2012 18:54:20 +0000 (14:54 -0400)]
Add consumer socket object and relayd commands
This commit adds a consumer_socket object and a lock to access it. This
fixes the possible concurrent access to the consumer(s) socket between
threads in the session daemon.
This also introduce the use of a sequence number during streaming so the
relayd can know when to close the trace file according to the sent
versus the expected sequence number.
Introduce the close_stream command between the consumer and relayd. Upon
a destroy session or a stream that hung up, the consumer now sends the
close stream command indicating the last sequence number. The consumer
never closes the relayd sockets unless a destroy relayd command (new) is
received from the session daemon which occurs on a destroy session
command.
Some fixes here and there but overall the streaming synchronization
issues have been resolved.
Signed-off-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 25 Jul 2012 21:39:12 +0000 (17:39 -0400)]
Fix: relayd metadata size
Trying to see better how the metadata size was handled, I ended up doing
a couple of modifications to the size value sent by the sender: given
that this header contains a size value that should cover both the
metadata packet header size, and the following payload size (this is how
kernel splice sent behaves), I modified kernel/UST mmap to do the same.
I therefore changed the recently updated recv_metadata payload size
calculation to match the encoded size, which should hopefully work for
all kernel splice/mmap and UST mmap cases.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 25 Jul 2012 21:03:47 +0000 (17:03 -0400)]
Minor fix for the UST streaming test
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 25 Jul 2012 20:59:30 +0000 (16:59 -0400)]
Fix: Off by uint64_t in the metadata transfer
This patch also adds a couple of debug output along with this fix.
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Wed, 25 Jul 2012 20:31:02 +0000 (16:31 -0400)]
Fix: consumer relay sender RCU usage
* RCU read-side lock needs to be held across entire usage of the
returned structure pointer, not just the lookup.
* Moving refcount inc/dec to uatomic ops. Theoretically not 100%
required for now, but won't hurt when we move to multithread.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
David Goulet [Wed, 25 Jul 2012 17:21:14 +0000 (13:21 -0400)]
Add comments for the relayd ctrl socket mutex
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 25 Jul 2012 14:57:05 +0000 (10:57 -0400)]
Deactivate streaming tests from make check
The new streaming tests fail so no need to make them global to the check
process until they are fixed for now or we'll cause problem(s) to our
packagers.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 25 Jul 2012 14:21:09 +0000 (10:21 -0400)]
Add unit tests for URIs
Tests uri_parse() using multiple URI strings where some are bad and some
are well formed.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 24 Jul 2012 22:31:58 +0000 (18:31 -0400)]
Add UST and kernel streaming tests
Add four tests for network streaming. For user space, we have two tests
where tracing is started before and after the applications.
For kernel tests, we enable an event before and after the start command.
At this stage, some tests fails which indicates a bug.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 25 Jul 2012 14:18:41 +0000 (10:18 -0400)]
Fix: some error in uri.c were still using printf()
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 24 Jul 2012 19:55:32 +0000 (15:55 -0400)]
Fix: don't install the filter grammar test
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 24 Jul 2012 17:34:37 +0000 (13:34 -0400)]
Add health counter to ust-app.c
Any UST command can take an unknown amount of time to complete
especially with multiple applications and/or sessions even though it's
the correct behavior, the health check must not flag a bad health so
this patch adds a series of health code update to each ustctl actions in
ust-app.c.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 24 Jul 2012 17:37:10 +0000 (13:37 -0400)]
Fix: typo in time_diff() with nsec difference
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Tue, 24 Jul 2012 15:52:36 +0000 (11:52 -0400)]
Add time validation to health check
The health check code does not have a notion of "time flow": therefore,
two consecutive calls to lttng_health_check() might end up returning a
bad state (0) just because there was too little time between the
invocations.
Add some time information to the "last" snapshot, so we can do a time
delta between the current and last snapshot to figure out if we need to
report the thread as stalled or not.
At this point, a thread is considered stalled with a wait time of over
20 seconds.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Mon, 23 Jul 2012 18:00:42 +0000 (14:00 -0400)]
Fix: Multiple health monitoring fixes
* Fix modulo operation bug on
#define HEALTH_IS_IN_CODE(x) (x % HEALTH_POLL_VALUE) which is causing
the check to think it is never within code. (x % 1 always equals 0).
Simplify this by using a simple & on the poll value, and remove the
IS_IN_CODE, using ! on IS_IN_POLL instead (which removes nothing to
clarity).
* Atomic operations should apply to at most "unsigned long" (32-bit on
32-bit arch) rather than uint64_t.
* Separate the "error" condition from the counters. We clearly cannot
use the "0" value as an error on 32-bit counters anymore, because they
can easily wrap.
* Introduce "exit" condition, will be useful for state tracking in the
future. Error and exit conditions implemented as flags.
* Add "APP_MANAGE" in addition to "APP_REG" health check, to monitor the
app registration thread (which was missing, only the app manager
thread was checked, under the name "APP_REG", which was misleading).
* Remove bogus usage of uatomic_xchg() in health_check_state():
It is not needed to update the "last" value, since the last value is
read and written to by a single thread. Moreover, this specific use of
xchg was not exchanging anything: it was just setting the last value
to the "current" one, and doing nothing with the return value.
Whatever was expected to be achieved by using uatomic_xchg() clearly
wasn't.
* Because the health check thread could still be answering a request
concurrently sessiond teardown, we need to ensure that all threads
only set the "error" condition if they reach teardown paths due to an
actual error, not on "normal" teardown condition (thread quit pipe
being closed). Flagging threads as being in error condition upon all
exit paths would lead to false "errors" sent to the client, which we
want to avoid, since the client could then think it needs to kill a
sessiond when the sessiond might be in the process of gracefully
restarting.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Tue, 24 Jul 2012 15:39:19 +0000 (11:39 -0400)]
Fix: relayd typo: lock -> unlock
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 24 Jul 2012 13:08:15 +0000 (09:08 -0400)]
fix: lttng-relayd: use appropriate RCU locking with hash tables
RCU hash tables used in lttng-relayd use the auto-resize feature, which
is performed by concurrent call rcu worker threads. Therefore, we need
to protect the calls to the hash table with appropriate RCU read-side
locking, and use call_rcu to defer memory reclaim.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 24 Jul 2012 03:11:48 +0000 (23:11 -0400)]
lttng-relayd: memory management fixes, with cleanups
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 23 Jul 2012 15:31:34 +0000 (11:31 -0400)]
Fix: relayd and sessiond: dispatch thread exit is shared across threads
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 23 Jul 2012 15:13:40 +0000 (11:13 -0400)]
fix: write EINTR handling
Ensure that we always test for ret < 0 && errno == EINTR for each
write() call.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 23 Jul 2012 15:03:12 +0000 (11:03 -0400)]
relayd: cleanup
Make structure/array definition easier to extend by already placing
comma at the end of lists (this is much more regexp-friendly).
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
David Goulet [Mon, 23 Jul 2012 15:03:08 +0000 (11:03 -0400)]
Code cleanup in the ust/kernel consumer file
Generalize the send relayd socket function call for both UST and kernel.
Refactor code in ust-consumer.c which only moves code around and bring
no changes to the behavior.
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Mon, 23 Jul 2012 14:48:45 +0000 (10:48 -0400)]
lttng-relayd.h: review update
- Change field order to minimize padding.
- ifdef should follow lttng coding style. No _ prefix, because it is
reserved to compiler.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
David Goulet [Mon, 23 Jul 2012 14:07:46 +0000 (10:07 -0400)]
Update README, TODO and CodingStyle
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 23 Jul 2012 13:42:13 +0000 (09:42 -0400)]
Fix and update content of doc/ directory
Add lttng-relayd.8 to the Makefile.am
Create the proposals/ directory which contains pas and current proposals
(RFC) for any features/changes in lttng-tools code tree.
Add the streaming-howto.txt to the dist data.
Rename and update old RFCs and move them to proposals/ directory.
Incidently, remove the dev/ directory.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 23 Jul 2012 12:45:34 +0000 (08:45 -0400)]
Add enable/disable consumer command to bash completion
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Fri, 20 Jul 2012 19:26:47 +0000 (15:26 -0400)]
Fix: relayd pipes should be closed on exit/error
Use the utils functions found in common/utils.h on pipes operations
(open/close).
Acked-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Julien Desfossez [Fri, 20 Jul 2012 16:19:18 +0000 (12:19 -0400)]
Add missing options in help
Patch from Christian to support the --help option and update to the
usage message to show we support -o,--output option.
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 20 Jul 2012 15:37:24 +0000 (11:37 -0400)]
Create utils.c/.h in libcommon
Move function from lttng/utils.h and lttng-session/utils.h in libcommon
so they can be used at large.
Simply link with libcommon and include common/utils.h.
Signed-off-by: David Goulet <dgoulet@efficios.com>
Julien Desfossez [Fri, 20 Jul 2012 13:43:42 +0000 (09:43 -0400)]
man page for lttng-relayd
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Julien Desfossez [Fri, 20 Jul 2012 12:16:07 +0000 (08:16 -0400)]
small fixes on streaming-howto
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
David Goulet [Wed, 18 Jul 2012 16:00:03 +0000 (12:00 -0400)]
Session daemon health check support
This is the first commit for the health check feature of the session
daemon.
Add a lttng_health_check(...) call to the public API and return 0 if
everything is fine or 1 if some health problem for a component was
detected.
Using this API call, you can either choose to test a specific component
such as the client command thread, the consumer thread(s), kernel
thread, application registration thread or all of them at the same time.
This feature is NOT implemented with the lttng command line UI and it is
intended to be like so until a stable version is accepted by the
community.
NOTE: The API could change so be aware of possible changes up to the
2.1-stable release.
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Tue, 17 Jul 2012 23:34:37 +0000 (19:34 -0400)]
Cleanup: rename session list count to "next_uuid"
Clearly explain that this is not a counter, but rather a unique
identifier.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 17 Jul 2012 23:29:29 +0000 (19:29 -0400)]
Fix typo: utils.sh
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 17 Jul 2012 23:27:34 +0000 (19:27 -0400)]
Fix: test: session list count cannot use "count" unique id
Fixes #305
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 17 Jul 2012 19:08:04 +0000 (15:08 -0400)]
Filter: specialize double-s64 binary comparators
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
David Goulet [Tue, 17 Jul 2012 18:03:28 +0000 (14:03 -0400)]
Add streaming howto
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Tue, 17 Jul 2012 17:49:08 +0000 (13:49 -0400)]
Filter: add merge point test
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
David Goulet [Tue, 17 Jul 2012 17:20:35 +0000 (13:20 -0400)]
Update README and add files to gitignore
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Tue, 17 Jul 2012 15:26:54 +0000 (11:26 -0400)]
Document filter (help and manpage)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 17 Jul 2012 05:49:45 +0000 (01:49 -0400)]
Fix: filter: remove dependency on UST bug.h
Fixes #308
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 16 Jul 2012 21:56:59 +0000 (17:56 -0400)]
Filter bytecode: Implement stack-based interpreter
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.044769 seconds and 4 git commands to generate.