David Goulet [Wed, 1 Feb 2012 23:29:02 +0000 (18:29 -0500)]
Fix wording in lttng cli usage
Fix cherry picked from Daniel U. Thibault
<daniel.thibault@drdc-rddc.gc.ca> patches.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 1 Feb 2012 23:19:20 +0000 (18:19 -0500)]
Fix enable channel usage and add enable event error msg
Channel options were missing details to the usage text.
Also, add an error message if an event option is passed to user-space
that is not supported.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 1 Feb 2012 23:09:11 +0000 (18:09 -0500)]
Improve error handling of lttng cli
Most of the commands were not returning a valid error code to the user.
Add "UST invalid context" lttcomm code and enforce "-t TYPE" for
add-context command.
Change error message for enable/disable event/channel in order to make
it standard for those commands and more meaningful to the user.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 1 Feb 2012 20:56:31 +0000 (15:56 -0500)]
Don't spawen session daemon on version command
Signed-off-by: David Goulet <dgoulet@efficios.com>
Thibault, Daniel [Wed, 1 Feb 2012 18:59:50 +0000 (13:59 -0500)]
Fix return value and mem leak for all commands
Add poptFreeContext(), send --help to stdout and default return value to
CMD_SUCCESS
Also fix some return values for list.c
Signed-off-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Wed, 1 Feb 2012 19:39:49 +0000 (14:39 -0500)]
Fix loglevel handling in test case (API change) and lttng command
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 1 Feb 2012 19:01:28 +0000 (14:01 -0500)]
Revert "Revert "Update loglevel ABI""
This reverts commit
69892bbba677a6695b216046d586e58bfa0f82c9.
Revert of revert, need to go forward for ABI change.
Will fix problems in a following commit.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
David Goulet [Wed, 1 Feb 2012 18:43:05 +0000 (13:43 -0500)]
Revert "Update loglevel ABI"
Segfault on lttng enable-event when no loglevel is specified.
UST tests failed.
This implementation forces a loglevel to each event which is fine
however the default level is never set when no loglevel is specified.
The internal UST ABI/API (used when lttng-ust is disabled) was not
updated also making it fail when disablin the lttng-ust support.
This broke too much stuff in lttng-tools so the commit is reverted and
test must pass before commiting it again.
lttng-ust HEAD will *NOT* work with lttng-tools head so stay on commit
939950af98d044a3b0632cad5293f91cb1493ef8 for UST.
This reverts commit
dad47fc4c65ec0acbfedc676895833b465d25cd6.
Signed-off-by: David Goulet <dgoulet@efficios.com>
Thibault, Daniel [Tue, 31 Jan 2012 19:32:56 +0000 (14:32 -0500)]
Fix memory leak in create command
Signed-off-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Thibault, Daniel [Tue, 31 Jan 2012 17:31:02 +0000 (12:31 -0500)]
Harmonise lttng.h and lttng-ctl.c documentation
Fix comments alignment.
Signed-off-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Tue, 31 Jan 2012 22:18:54 +0000 (17:18 -0500)]
Update loglevel ABI
Loglevels are now an attribute part of an event, rather than an event
per se.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
David Goulet [Tue, 31 Jan 2012 15:47:54 +0000 (10:47 -0500)]
Use lttng-consumerd of the code tree for tests
Better use the consumer daemon in tree that we just built and not the
one installed on the system that might be quite old ;)
Signed-off-by: David Goulet <dgoulet@efficios.com>
Thibault, Daniel [Mon, 30 Jan 2012 21:58:22 +0000 (16:58 -0500)]
Fixing memory leaks in add-context command
Besides enforcing the return values and outputting --help to stdout, the
problem lay with the instances of struct ctx_type *type being created
but not assigned to the doubly-linked list under various error
conditions.
Signed-off-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Thibault, Daniel [Mon, 30 Jan 2012 21:26:34 +0000 (16:26 -0500)]
Rewrites lttng-ctl's set_session_daemon_path
This fifth patch rewrites lttng-ctl's set_session_daemon_path() to avoid
duplicating snippets of code. It also fixes the snprintf return value
test so the code works with both GNU C < 2.1 and >= 2.1. With GNU C <
2.1, snprintf returns -1 if the target buffer is too small; with GNU C
>= 2.1, snprintf returns the required size (excluding the closing null)
under the same conditions.
Signed-off-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 30 Jan 2012 21:29:13 +0000 (16:29 -0500)]
Fix lttng list usage
Signed-off-by: David Goulet <dgoulet@efficios.com>
Thibault, Daniel [Fri, 27 Jan 2012 19:33:07 +0000 (14:33 -0500)]
Document and enforce return values
In config_read_session_name(), moved the malloc to the beginning, to
avoid the fscanf() loop from trying to write to a NULL
In config_add_session_name(), dealt with another snprintf() occurrence
Signed-off-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Thibault, Daniel [Mon, 30 Jan 2012 21:04:40 +0000 (16:04 -0500)]
Simplify create_session of lttng create command
Signed-off-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Thibault, Daniel [Mon, 30 Jan 2012 20:58:08 +0000 (15:58 -0500)]
Document return values
Fix one return values that would return an -ENOMEM instead of a -1 on
error.
Signed-off-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Thibault, Daniel [Mon, 30 Jan 2012 20:27:16 +0000 (15:27 -0500)]
Catching up on misc. string and comment fixes
Signed-off-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 30 Jan 2012 18:27:11 +0000 (13:27 -0500)]
Add GNU Gold requirement to README
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 30 Jan 2012 18:16:47 +0000 (13:16 -0500)]
Fix tests Makefile options
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 30 Jan 2012 18:13:36 +0000 (13:13 -0500)]
Remove useless variable
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 30 Jan 2012 16:45:45 +0000 (11:45 -0500)]
Fix UST add-context test
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 30 Jan 2012 16:40:45 +0000 (11:40 -0500)]
Improve lttng add-context message output
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 30 Jan 2012 16:38:03 +0000 (11:38 -0500)]
Fix UST context on global update
Contexts were not added to the application upon registration.
Improve error handling on add context for event and channel.
Fix add_ust_ctx_* to lookup the context before adding it to the hash
table.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 30 Jan 2012 16:37:53 +0000 (11:37 -0500)]
Fix unhandled return value
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Mon, 30 Jan 2012 13:30:53 +0000 (08:30 -0500)]
Add kernel work-around for boot_id
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lkml.org/lkml/2012/1/29/180
Mathieu Desnoyers [Mon, 30 Jan 2012 13:05:21 +0000 (08:05 -0500)]
Define MAP_STACK to 0 if not defined by the architecture
This is just a hint anyway, currently no-op.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
David Goulet [Fri, 27 Jan 2012 21:39:17 +0000 (16:39 -0500)]
Don't iterate on events when adding context to channel
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Fri, 27 Jan 2012 21:38:17 +0000 (16:38 -0500)]
Fix context mapping for UST and kernel
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
David Goulet [Fri, 27 Jan 2012 17:43:54 +0000 (12:43 -0500)]
Add CMD_WARNING error code
The CMD_WARNING is returned if at least one command went wrong and at
least one succeeded. This shoudl tell the user that there is an error
message on stderr but the rest of the command went well.
One use case for that is the multiple -t of add_context. If one of them
fails, this code is returned.
This error code is added at the end of the enum so the previous CMD code
are not changed.
Also, if the tracer (-k/-u) is not specified, CMD_ERROR is returned
instead of CMD_UNDEFINED which makes way more sense.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 27 Jan 2012 16:08:23 +0000 (11:08 -0500)]
Fix comments and usage output
Multiple fixes to comments in lttng and lttng-consumerd.
Adds --list-commands as an arguments to ignore when auto spawning the
session daemon from lttng cli.
Usage of the consumerd now output on a stream and usage is set to stdout
when asked with --help.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 27 Jan 2012 15:37:45 +0000 (10:37 -0500)]
Fix comments and enforce expected return values
Improve calibrate and add_context usage() printout. Document and enforce
the expected return values for the cmd_calibrate/cmd_addcontext chain of
functions.
Fix add_context usage()
Add documentation in liblttng-ctl.
Signed-off-by: Daniel Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 27 Jan 2012 15:22:33 +0000 (10:22 -0500)]
Improve lttng.c usage()
Signed-off-by: Daniel Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Wed, 25 Jan 2012 14:39:28 +0000 (09:39 -0500)]
Fix lttng sessiond spawn wait race
If the child is scheduled before the parent, using "pause()" in the
parent could be executed after the signal has been handled: that's
entirely racy. Use a proper signal handler and flag to handle this
racelessly.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 25 Jan 2012 14:37:39 +0000 (09:37 -0500)]
Fix sessiond needed checks
- strncmp should compare up to and _include_ the \0 (was off by one).
Instead of 2 for "-h", it should be 3. Use "sizeof("-h")" instead of
hardcoding 3.
- strncmp logic was reversed for the --list-options check.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
David Goulet [Tue, 24 Jan 2012 22:43:54 +0000 (17:43 -0500)]
Remove default defines from lttng.h
They were not use in lttng.h and of no use for the user also. They are
all moved to common/defaults.h.
Signed-off-by: David Goulet <dgoulet@efficios.com>
Simon Marchi [Tue, 24 Jan 2012 22:00:52 +0000 (17:00 -0500)]
Fix comment of cmd_create
Another victim of copy paste.
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Daniel Thibault [Tue, 24 Jan 2012 22:32:47 +0000 (17:32 -0500)]
Fix file descriptor leak and typo in conf.c
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 24 Jan 2012 19:49:05 +0000 (14:49 -0500)]
Rename env var to standard LTTNG_ prefix
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 24 Jan 2012 18:53:16 +0000 (13:53 -0500)]
Fix typo in lttng cli comments
Signed-off-by: David Goulet <dgoulet@efficios.com>
Yannick Brosseau [Tue, 24 Jan 2012 18:44:01 +0000 (13:44 -0500)]
Use correct variable in list bash autocompletion
Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
David Goulet [Tue, 24 Jan 2012 18:36:40 +0000 (13:36 -0500)]
Add kernel requirements
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 24 Jan 2012 18:04:05 +0000 (13:04 -0500)]
Remove useless COPYING file
Fix typo in LICENSE
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 24 Jan 2012 17:30:45 +0000 (12:30 -0500)]
First import of extras/ with lttng bash completion
Creation of the extras/ directory. Will mostly contains third part
scripts or tools not core to the project.
Adds the lttng bash completion script which can be copied to
/etc/bash_completion.d/lttng for first and second level command auto
completion.
Thanks to Simon Marchi for this contributions!
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Simon Marchi [Tue, 24 Jan 2012 16:28:04 +0000 (11:28 -0500)]
Add a '--list-options' option to each command.
This is intended to be used for programmable Bash completion.
Modified from previous version:
- Changed '\0' to 0 to match current coding style.
Changes made by David Goulet:
- Check args for --list-options in lttng cli to stop auto execution of
the session daemon.
- Adds --list-options to all help. (Hidding command is bad :P)
- Fix uninitialized ret value in enable channel
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 24 Jan 2012 16:49:49 +0000 (11:49 -0500)]
Check kernel version for tests
Test using the session daemon must be done on a kernel version 2.6.27 or
higher for lttng-tools and lttng-ust requirements. Before starting a
session daemon, tests validate the kernel version and stop them if the
kernel is too old.
This is *really* important for launchpad build system which compile and
run our tests on 2.6.24 kernel.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 24 Jan 2012 15:17:30 +0000 (10:17 -0500)]
Add MSG_WAITALL to recvmsg of sessiond-comm
Get the complete message on receive. We do not handle receiving split
data with the lttcomm_recv_unix_sock which is *not* good but for now we
will simply add this flag since every call should block anyway and does
not require any other funky flags.
This issue was detected with the kernel events listing failing by
sending half of the data half the time.
Reported-by: Daniel Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 23 Jan 2012 23:08:42 +0000 (18:08 -0500)]
Implement UST calibrate and change default
Calibrate now works for UST (even if ust does not implement it now).
Only --function is exposed since it's the only one implemented and also
becomes the default.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 23 Jan 2012 22:51:01 +0000 (17:51 -0500)]
Update lttng ust ABI/API copy
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 23 Jan 2012 21:55:40 +0000 (16:55 -0500)]
Change not implemented error to undefined.
Aiming to a stable release, "not implemented" message are not a good
idea for user to see.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 23 Jan 2012 21:42:30 +0000 (16:42 -0500)]
Disable lttng ust domain not implemented
Keep them in lttng.h to retain values for future development.
Also fix define alignment in lttng.h
Note that at this commit, "Not implemented" error is still returned.
This will be fix to "Unknown command" in next commit.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 23 Jan 2012 20:35:14 +0000 (15:35 -0500)]
Update version to 2.0-pre18
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 23 Jan 2012 20:25:55 +0000 (15:25 -0500)]
Update TODO list
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 23 Jan 2012 19:12:46 +0000 (14:12 -0500)]
Change SIGCHLD to SIGUSR1 when lttng waiting on sessiond
Using lttng cli, if the session daemon dies after exec(), a SIGCHLD is
returned. It was catched but not handled to cleanly quit and inform the
user that the session daemon failed.
We now use SIGUSR1 to signal the lttng cli that the session daemon is
ready to receive command.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 23 Jan 2012 18:31:16 +0000 (13:31 -0500)]
Fix kernel version to only test major version
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 23 Jan 2012 17:01:35 +0000 (12:01 -0500)]
Add UST version validation
Upon registration of an UST app, we now check the version compatibility
with the session daemon and set a compatible bit. Only the major version
is validated since major version bump implies ABI/API breakage.
For now, every action on the application list check the app compatible
bit before executing it. We are too close from a stable release so hard
*not standard* check is done across the map for ust-app. The downside is
that the client will not get informed of any incompatible app upon any
action on the tracer using lttng cli.
If the version is NOT compatible, the register done is sent and the app
is kept in the registry. We can't close the socket or deny the
registration because if the env. var LTTNG_UST_REGISTER_TIMEOUT=-1 is
set on the app side, infinite loop will occur and possibly stall the
app.
New sessiond comm. version error added but not use at this commit.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Sun, 22 Jan 2012 21:23:38 +0000 (16:23 -0500)]
Update lttng kernel modules names
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Sun, 22 Jan 2012 21:11:11 +0000 (16:11 -0500)]
Add kernel module version validation
The session daemon now checks if the kernel modules are compatible
whenever it tries to load them.
Introduce modprobe.c/.h and kern-modules.h that contains the lttng
modules information and function to load/remove them. Also add a call to
kernel.c for kernel version validation.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Sun, 22 Jan 2012 21:10:03 +0000 (16:10 -0500)]
New sessiond comm error for kernel version
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Sun, 22 Jan 2012 21:09:24 +0000 (16:09 -0500)]
Add missing string.h header for strerror_r()
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 20 Jan 2012 22:06:11 +0000 (17:06 -0500)]
Fix missing headers in Makefiles
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 20 Jan 2012 22:02:29 +0000 (17:02 -0500)]
Update README
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 20 Jan 2012 21:57:25 +0000 (16:57 -0500)]
Move all default values to defaults.h
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 20 Jan 2012 21:43:59 +0000 (16:43 -0500)]
Rename lttngerr.h to error.h
Also add this header in common.h.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 20 Jan 2012 21:30:23 +0000 (16:30 -0500)]
Split and remove lttng-share header file
This header is split into two files: defaults.h and macros.h.
A third header is introduce here which is common.h including runas.h and
macros.h which are part of the common library. Since the defaults.h
contains only defaults values, it seems ok to keep it seperate from the
common library having only macros and function calls.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 20 Jan 2012 20:54:18 +0000 (15:54 -0500)]
Fix DBG message grammatical error
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 20 Jan 2012 20:51:04 +0000 (15:51 -0500)]
Move compat to common and create an internal lib
libcompat is the name of the new lib.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 20 Jan 2012 20:44:44 +0000 (15:44 -0500)]
Rename cmd.h for command.h
Also move utils.h and conf.h inside the command.h because every lttng
cli commands are using those headers.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 20 Jan 2012 20:37:52 +0000 (15:37 -0500)]
Add missing headers for make dist
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 20 Jan 2012 20:07:15 +0000 (15:07 -0500)]
Fix off-by-one and double list size instead of steady increment
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 20 Jan 2012 18:17:16 +0000 (13:17 -0500)]
Complete change of the source directory tree
For the sake of clearness and awesomeness :P, this change was needed for
better semantic across the code and better organization of source files.
src/
--> Contains source files of the project
bin/
--> Contains every binaries this git tree builds (lttng,
lttng-sessiond and lttng-consumerd).
lib/
--> Contains exported libraries (lttng-ctl).
common/
--> Contains shared code for the entire project. (internal
libraries mostly)
Every internal headers are moved from include/ to src/common. The
include directory only contains exported public headers now
(lttng/lttng.h). The -I$(top_srcdir)/src is also added for all
Makefiles.
The consumerd APIs are not exported anymore. The reason is that the
consumer will get completely re-engineered in the next months. It's our
safety net for the APIs breakage of the coming year concerning the
consumerd library.
Renaming is done also on some internal libraries to follow the naming
convention. The public library liblttngctl is renamed to liblttng-ctl
making it linkable now with "-llttng-ctl" deprecating the old
"-llttngctl".
No code is changed with this commit except #include statements
added/removed/renamed. This is why there is yet files and internal API
calls that does not follow the naming convention (Ex: lttngerr.h,
lttng-share.h in src/common).
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 19 Jan 2012 19:12:39 +0000 (14:12 -0500)]
Update version to 2.0-pre17
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 19 Jan 2012 19:06:43 +0000 (14:06 -0500)]
Fix missing files for make dist
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 19 Jan 2012 18:43:57 +0000 (13:43 -0500)]
Don't init kernel tracer if not root (UID=0)
No point of trying to init kernel tracer if the session daemon is not
root. At this time, only UID=0 can load kernel modules and interact with
the lttng kernel tracer.
Reported-by: Daniel Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 18 Jan 2012 17:21:42 +0000 (12:21 -0500)]
Fix strncmp for the help option check
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 17 Jan 2012 22:05:10 +0000 (17:05 -0500)]
Fix double free and out of order delete session
Failing to create metadata, the data structure was freed but the pointer
was not set to NULL. When deleting the metadata of that session (that
has failed), the pointer was not NULL creating a "valid" pointer for the
check and creating a double free error. This failure happens when the
session daemon reached the maximum number of open files.
Also, on destroy trace, the ust app session was freed and deref. just
after creating an invalid pointer access.
Finally, set the started flag of a ust app session to 0 when stopping
the session.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 17 Jan 2012 22:03:57 +0000 (17:03 -0500)]
Don't start session daemon with --help on the cli
Any --help or -h will not spawned anymore a session daemon when used
with lttng cli.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 17 Jan 2012 21:20:18 +0000 (16:20 -0500)]
Fix UST tests if lttng-ust is not available
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 17 Jan 2012 20:51:58 +0000 (15:51 -0500)]
Fix code syntax
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 17 Jan 2012 18:38:48 +0000 (13:38 -0500)]
Add UST test ust-nprocesses
Simple to test that launches 100 instrumented applications and validate
that they are all registered to the session daemon.
After that, one event is enabled, tracing starts/stops and finally the
tracing session gets destroyed.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 17 Jan 2012 18:37:56 +0000 (13:37 -0500)]
Make MSG() print on stdout instead of stderr
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 16 Jan 2012 22:25:49 +0000 (17:25 -0500)]
Add UST test for n events using validation
ust-nevents tests an instrumented application generating 100 events and
validating that those events are found using babeltrace (need to be
installed).
Adds the tests/utils.sh which is a family of function used to interact
with lttng cli. There is also a trace_matches function which uses
babeltrace to find string patterns.
Also, the session daemon is spawned at the beginning of runall.sh and
killed at the end. This means that all tests are done on a single
session daemon instance. Thus, session name across tests have to be
unique! From now on, each test should use the file name as a unique
identifier for the session name.
Finally, fixed the session name for all tests. At this commit, "make
check" or "sudo make check" should pass.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 16 Jan 2012 18:12:02 +0000 (13:12 -0500)]
Add UST validation test for data structure
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 16 Jan 2012 17:15:18 +0000 (12:15 -0500)]
Fix runas namespace
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 16 Jan 2012 17:00:24 +0000 (12:00 -0500)]
Move runas.h to common/ directory
Simply put to improve semantic over the code includes and knowing that
runas.h comes from the common library.
It's arguable to do this across the code base for all internal
libraries. This should be discuss at least for the code tree
consistency.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 16 Jan 2012 16:54:20 +0000 (11:54 -0500)]
Add UST test binaries to gitignore
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 16 Jan 2012 16:08:35 +0000 (11:08 -0500)]
Add two basic tests for UST global domain
They test basic functionnality of UST meaning creating
channel/session/event, enabling/disabling, start/stop and destroy the
session.
Those two tests *does not* use UST instrumented application. They only
test support and communication between lttng cli and session daemon.
Integrated with "make check"
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Fri, 13 Jan 2012 21:18:27 +0000 (16:18 -0500)]
Remove CLONE_VM flag
Makes debugging with GDB impossible. We'll have to revisit the actual
performance impact of not having CLONE_VM in place eventually.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Yannick Brosseau [Fri, 13 Jan 2012 15:23:49 +0000 (10:23 -0500)]
Remove stringify and add quotes directly in the configure
Some part of the path where the same as some defined variable and
the resulting string conversion gave the wrong result.
Remove the whole stringify function, since its use can be misleading
Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Alexandre Montplaisir [Thu, 12 Jan 2012 22:50:36 +0000 (17:50 -0500)]
Add debug output to sessiond's kernel consumer selection
Signed-off-by: Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Alexandre Montplaisir [Thu, 12 Jan 2012 22:50:35 +0000 (17:50 -0500)]
Add libdir and bindir outputs to configure
Signed-off-by: Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Alexandre Montplaisir [Thu, 12 Jan 2012 22:50:34 +0000 (17:50 -0500)]
Add target arch and paths to the configure output
The two eval's are needed to correctly expand the variables in the
default path.
Signed-off-by: Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 13 Jan 2012 18:47:24 +0000 (13:47 -0500)]
Fix multiple error handling for UST tracing
Bad error handling was making event and channel out of sync between
trace ust and ust app data structure.
This makes the session daemon way more stable for the case the sessiond
and/or UST tracer reach the maximum number of open files.
Fix memory leaks upon error when creating a session/channel/event.
Fix out of order add unique channel node to hash table.
Finally, fix some debug/error statements.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 13 Jan 2012 15:10:58 +0000 (10:10 -0500)]
Merge branch 'master' of git://git.lttng.org/lttng-tools
Mathieu Desnoyers [Thu, 12 Jan 2012 22:49:31 +0000 (17:49 -0500)]
Fix incorrect error message for stop trace
Reported-by: Tan Dung Le Tran <tan.dung.le.tran@ericsson.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 12 Jan 2012 19:39:23 +0000 (14:39 -0500)]
Fix ht default size test
in the line:
size != 0 ? : (size = DEFAULT_HT_SIZE);
we should notice that the lack of ( ) around "size != 0" leads to the
following behavior: the compiler will try to evaluate
"0 ? : (size = DEFAULT_HT_SIZE)"
and compare it to size, which is not the expected behavior.
Use a standard "if (cond)" test instead. The ? : expression is not
needed here anyway, it just complicates the code.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 12 Jan 2012 19:30:04 +0000 (14:30 -0500)]
UST consumer: close shm fd after mapping it
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 12 Jan 2012 18:51:08 +0000 (13:51 -0500)]
Update lttng-ust-abi.h local copy
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 12 Jan 2012 18:47:09 +0000 (13:47 -0500)]
Remove unneeded fields assignments (should not use those UST-internal fields)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.042494 seconds and 4 git commands to generate.