[lttng-dev] [PATCH lttng-tools] Fix: Proper teardown of thread_manage_clients on failure of listen/create_poll

2012-11-06 Thread Christian Babeux
will tentatively be cleaned even though it has never been initialized. This patch add 2 labels to differentiate the error handling paths needed in case of failure of lttcomm_listen_unix_sock or create_thread_poll_set. Signed-off-by: Christian Babeux christian.bab...@efficios.com --- src/bin/lttng

[lttng-dev] [PATCH lttng-ust] Fix: Conditionnally disable tests requiring shared libs support

2012-11-05 Thread Christian Babeux
and toggle the NO_SHARED Automake variable. Thus, the tests that require explicit shared library support can be skipped when the NO_SHARED variable is true. Signed-off-by: Christian Babeux christian.bab...@efficios.com --- configure.ac | 2 ++ tests/demo/Makefile.am | 5 + 2 files changed, 7

[lttng-dev] [PATCH lttng-tools] Add return code to the testpoint mechanism

2012-11-05 Thread Christian Babeux
failure cases and trigger the appropriate response (error handling, thread teardown, etc.). Signed-off-by: Christian Babeux christian.bab...@efficios.com --- src/bin/lttng-sessiond/main.c | 36 ++-- src/common/testpoint/testpoint.h | 20 ++-- tests

[lttng-dev] [PATCH lttng-tools] Fix: Do not install health tests helper libraries

2012-11-05 Thread Christian Babeux
The libraries libhealthexit and libhealthstall should not be installed on the user system. They are only useful for the health check tests. Signed-off-by: Christian Babeux christian.bab...@efficios.com --- tests/tools/health/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

[lttng-dev] [PATCH lttng-tools] Fix: Missing librt dependency in configure check for lttng-ust-ctl

2012-11-02 Thread Christian Babeux
The lttng-ust-ctl library depends on librt. The AC_CHECK_LIBRARY macro can't automatically resolve dependents libraries (ala libtool), so any additionnals dependencies must be manually specified. Signed-off-by: Christian Babeux christian.bab...@efficios.com --- configure.ac | 2 +- 1 file

[lttng-dev] [PATCH lttng-tools] Fix: Remove dependency to urcu-cds in tools tests

2012-11-02 Thread Christian Babeux
The -lurcu-cds link flag is not mandatory to link any of the tests. Also, adding this flag can cause multiple symbol definition errors when linking statically because the libhashtable contains symbol names that are also present in urcu-cds. Signed-off-by: Christian Babeux christian.bab

[lttng-dev] [PATCH lttng-tools] Fix: Possible memory leaks when creating filter IR root node

2012-10-23 Thread Christian Babeux
Signed-off-by: Christian Babeux christian.bab...@efficios.com --- src/lib/lttng-ctl/filter/filter-visitor-generate-ir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/lttng-ctl/filter/filter-visitor-generate-ir.c b/src/lib/lttng-ctl/filter/filter-visitor-generate-ir.c index

[lttng-dev] [PATCH lttng-tools] Fix: Handle the unary bitwise negation operator (~) in the XML printer

2012-10-23 Thread Christian Babeux
Signed-off-by: Christian Babeux christian.bab...@efficios.com --- src/lib/lttng-ctl/filter/filter-visitor-xml.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/lttng-ctl/filter/filter-visitor-xml.c b/src/lib/lttng-ctl/filter/filter-visitor-xml.c index 90a336d..1d14f2e 100644

[lttng-dev] [PATCH lttng-ust] Fix: Fix self-assign warning on struct ustfork_clone_info init

2012-10-23 Thread Christian Babeux
Use the proper field designator syntax (C99) to initialize the ustfork_clone_info struct. Signed-off-by: Christian Babeux christian.bab...@efficios.com --- liblttng-ust-fork/ustfork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 = 100755 liblttng-ust-fork/ustfork.c

[lttng-dev] [PATCH lttng-tools 1/5] Tests: Add an unsupported operators filtering test

2012-10-16 Thread Christian Babeux
This test validate that filters with unsupported operators are correctly flagged and that an enable event with these filters properly fails. Signed-off-by: Christian Babeux christian.bab...@efficios.com --- tests/tools/filtering/Makefile.am | 2 + tests/tools/filtering/unsupported-ops

[lttng-dev] [PATCH lttng-tools 4/5] Tests: Add a test for valid filters

2012-10-16 Thread Christian Babeux
the expected range, this could potentially indicate failure in the filtering mechanism. Signed-off-by: Christian Babeux christian.bab...@efficios.com --- tests/tools/filtering/Makefile.am | 20 +- tests/tools/filtering/gen-ust-events.c | 59 + tests/tools/filtering/tp.c | 15

[lttng-dev] [PATCH lttng-tools 5/5] Tests: Add filtering tests to configure

2012-10-16 Thread Christian Babeux
Add filtering folder to top-level Makefile.am. Also add a runall script to run all filtering tests. Signed-off-by: Christian Babeux christian.bab...@efficios.com --- configure.ac | 1 + tests/tools/Makefile.am | 2 +- tests/tools/filtering/Makefile.am | 4

Re: [lttng-dev] [PATCH lttng-tools 4/5] Tests: Add health check thread stall test

2012-10-02 Thread Christian Babeux
Hi, Please disregard this patch because it's missing the env_val declaration. A v2 will soon follow. Thank you, Christian On Thu, Sep 27, 2012 at 2:23 PM, Christian Babeux christian.bab...@efficios.com wrote: This test trigger a code stall in a specified thread using the testpoint mechanism

Re: [lttng-dev] [PATCH lttng-tools 3/5] Tests: Add health check thread exit test

2012-10-02 Thread Christian Babeux
Hi, Please disregard this patch because it's missing the env_val declaration. A v2 will soon follow. Thank you, Christian On Thu, Sep 27, 2012 at 2:23 PM, Christian Babeux christian.bab...@efficios.com wrote: This test trigger a failure in a specified thread using the recently introduced

[lttng-dev] [PATCH v2 lttng-tools 3/5] Tests: Add health check thread exit test

2012-10-02 Thread Christian Babeux
select the thread to be killed by enabling a specific environment variable. With this test we ensure that each thread can be succesfully terminated and that the health check feature properly detect a failure. Signed-off-by: Christian Babeux christian.bab...@efficios.com --- tests/tools/health

[lttng-dev] [PATCH v2 lttng-tools 1/5] Add testpoints in lttng-sessiond to instrument every threads

2012-10-02 Thread Christian Babeux
of the thread and thus can be used to stall the processing of the thread. Signed-off-by: Christian Babeux christian.bab...@efficios.com --- src/bin/lttng-sessiond/Makefile.am | 3 ++- src/bin/lttng-sessiond/main.c | 28 2 files changed, 30 insertions(+), 1 deletion

[lttng-dev] [PATCH v2 lttng-tools 2/5] Tests: Add a health check utility program

2012-10-02 Thread Christian Babeux
is encoded to indicate which thread has failed. Signed-off-by: Christian Babeux christian.bab...@efficios.com --- tests/tools/health/Makefile.am| 20 +++ tests/tools/health/health_check.c | 73 +++ 2 files changed, 93 insertions(+) create mode 100644

[lttng-dev] [PATCH v2 lttng-tools 5/5] Tests: Add health check tests to configure

2012-10-02 Thread Christian Babeux
Add health folder to top-level tests Makefile.am. Also add a runall script to run all health check tests. Signed-off-by: Christian Babeux christian.bab...@efficios.com --- configure.ac | 1 + tests/tools/Makefile.am | 2 +- tests/tools/health/runall | 28

[lttng-dev] [PATCH lttng-tools 4/5] Tests: Add health check thread stall test

2012-09-27 Thread Christian Babeux
variable. The test ensure the threads can be succesfully stalled and that the health check feature is able to properly detect stalling in non-polling cases. Signed-off-by: Christian Babeux christian.bab...@efficios.com --- tests/tools/health/Makefile.am | 6 +- tests/tools/health

[lttng-dev] [PATCH lttng-tools] Tests: Add high throughput with bandwidth limits test

2012-09-25 Thread Christian Babeux
a timeout in the sessiond. Signed-off-by: Christian Babeux christian.bab...@efficios.com --- tests/tools/streaming/high_through_limits | 185 ++ tests/tools/streaming/runall | 2 +- 2 files changed, 186 insertions(+), 1 deletion(-) create mode 100755

[lttng-dev] [PATCH v2 lttng-tools 0/4] Tests cleanup

2012-09-24 Thread Christian Babeux
TEST_DESC string. 4/4: No changes Thanks, Christian Babeux (4): Tests: Add a check for color support when printing status Tests: Add helper functions for printing status and test banner Tests: Cleanup redundant code and use printing helper functions Tests: Rename helper functions to have

[lttng-dev] [PATCH v2 lttng-tools 1/4] Tests: Add a check for color support when printing status

2012-09-24 Thread Christian Babeux
When printing the status of test is OK or FAIL, check if stdout is attached to a terminal device. This way the output is not cluttered with useless escape characters. Some use cases where we don't want colors: $ ./sometest | less $ ./sometest a.log Signed-off-by: Christian Babeux christian.bab

Re: [lttng-dev] unable to detect library format (unsupported architecture (armv7l)

2012-09-24 Thread Christian Babeux
Hi Meher, The change that you applied to your lttng-ust configure.ac should look like this: diff --git a/configure.ac b/configure.ac index ea73243..efb16d4 100644 --- a/configure.ac +++ b/configure.ac @@ -209,6 +209,7 @@ changequote([,])dnl s390) LIBFORMAT=elf32-s390;

[lttng-dev] [PATCH lttng-tools 1/4] Tests: Add a check for color support when printing status

2012-09-20 Thread Christian Babeux
When printing the status of test is OK or FAIL, check if stdout is attached to a terminal device. This way the output is not cluttered with useless escape characters. Some use cases where we don't want colors: $ ./sometest | less $ ./sometest a.log Signed-off-by: Christian Babeux christian.bab

[lttng-dev] [PATCH lttng-tools 2/4] Tests: Add helper functions for printing status and test banner

2012-09-20 Thread Christian Babeux
FAIL Signed-off-by: Christian Babeux christian.bab...@efficios.com --- tests/utils.sh | 33 + 1 file changed, 33 insertions(+) diff --git a/tests/utils.sh b/tests/utils.sh index 42b18e3..2670de3 100644 --- a/tests/utils.sh +++ b/tests/utils.sh @@ -25,6

[lttng-dev] [PATCH lttng-tools 3/4] Tests: Cleanup redundant code and use printing helper functions

2012-09-20 Thread Christian Babeux
Signed-off-by: Christian Babeux christian.bab...@efficios.com --- tests/kernel/run-kernel-tests.sh| 7 +++-- tests/tools/streaming/run-kernel| 13 tests/tools/streaming/run-ust | 5 ++-- tests/tools/streaming/uri_switch| 6 ++-- tests/ust/before-after/run

[lttng-dev] [PATCH lttng-tools 4/4] Tests: Rename helper functions to have consistent names

2012-09-20 Thread Christian Babeux
- start_lttng_sessiond stop_sessiond - stop_lttng_sessiond start_tracing - start_lttng_tracing stop_tracing - stop_lttng_tracing Signed-off-by: Christian Babeux christian.bab...@efficios.com --- tests/kernel/run-kernel-tests.sh| 6 +++--- tests/tools/streaming/run-kernel| 16

[lttng-dev] [PATCH lttng-tools] Fix: Mismatch of field name between latest lttng-ust abi and lttng-tools

2012-09-17 Thread Christian Babeux
The written field of the lttng_event_field and lttng_ust_field_iter structures has been renamed to nowrite in the upstream version of lttng-ust. Signed-off-by: Christian Babeux christian.bab...@efficios.com --- include/lttng/lttng.h | 2 +- src/bin/lttng-sessiond/lttng-ust-abi.h

[lttng-dev] [PATCH RFC v3 lttng-tools] New testpoint mechanism to instrument LTTng binaries for testing purpose

2012-09-14 Thread Christian Babeux
an additionnal test per testpoint on a global variable. This performance 'hit' should be acceptable for production use. The testpoint mechanism should be *always on*. It can be explicitly disabled via CFLAGS=-DNTESTPOINT in a way similar to NDEBUG and assert(). Signed-off-by: Christian Babeux christian.bab

[lttng-dev] [PATCH RFC v2 lttng-tools] Testpoint mechanism

2012-09-13 Thread Christian Babeux
instead of defining likely/unlikely. - Style and comments fixes. Thanks, Christian Babeux (1): New testpoint mechanism to instrument LTTng binaries for testing purpose configure.ac | 1 + src/common/Makefile.am | 2 +- src/common/testpoint/Makefile.am | 6

[lttng-dev] [PATCH RFC v2 lttng-tools] New testpoint mechanism to instrument LTTng binaries for testing purpose

2012-09-13 Thread Christian Babeux
an additionnal test per testpoint on a global variable. This performance 'hit' should be acceptable for production use. The testpoint mechanism should be *always on*. It can be explicitly disabled via CFLAGS=-DNTESTPOINT in a way similar to NDEBUG and assert(). Signed-off-by: Christian Babeux christian.bab

[lttng-dev] [PATCH RFC lttng-tools] New testpoint mechanism to instrument LTTng binaries for testing purpose

2012-09-11 Thread Christian Babeux
an additionnal test per testpoint on a global variable. This performance 'hit' should be acceptable for production use. The testpoint mechanism should be *always on*. It can be explicitly disabled via CFLAGS=-DNTESTPOINT in a way similar to NDEBUG and assert(). Signed-off-by: Christian Babeux christian.bab

Re: [lttng-dev] [PATCH RFC lttng-tools] Testpoint mechanism

2012-09-11 Thread Christian Babeux
Hi Yannick, I'm not sure I understand the goal of this feature. Can you explain more? This testpoint mechanism is not a LTTng feature per se. Think of it has a facility to inject code in order to test different portions of the LTTng codebase. Maybe an example will make things more clear:

Re: [lttng-dev] [commit for review] Fix recent filter regressions

2012-09-10 Thread Christian Babeux
Looks good to me! Acked-by: Christian Babeux christian.bab...@efficios.com On Mon, Sep 10, 2012 at 11:08 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: * Mathieu Desnoyers (mathieu.desnoy...@efficios.com) wrote: Hi! Please review this patch from my pull queue for lttng-tools

[lttng-dev] [PATCH v3 lttng-tools] Fix: Accept bytecode of length 65536 bytes

2012-09-06 Thread Christian Babeux
, but this should be a reasonable compromise since the filtering feature has not been released yet. Signed-off-by: Christian Babeux christian.bab...@efficios.com --- src/bin/lttng-sessiond/lttng-ust-abi.h | 6 +++--- src/bin/lttng-sessiond/main.c | 2

[lttng-dev] [PATCH v2 lttng-ust] Fix: Filter ABI changes to support FILTER_BYTECODE_MAX_LEN (65536)

2012-09-06 Thread Christian Babeux
v2 Changelog: - Add a check when receiving data on the reloc_offset to ensure it lies within the data. Christian Babeux (1): Fix: Accept bytecode of length 65536 bytes include/lttng/ust-abi.h | 4 ++-- include/ust-comm.h| 4 ++-- liblttng-ust/lttng-ust-comm.c | 8

[lttng-dev] [PATCH v2 lttng-ust] Fix: Accept bytecode of length 65536 bytes

2012-09-06 Thread Christian Babeux
, but this should be a reasonable compromise since the filtering feature has not been released yet. Signed-off-by: Christian Babeux christian.bab...@efficios.com --- include/lttng/ust-abi.h | 4 ++-- include/ust-comm.h| 4 ++-- liblttng-ust/lttng-ust-comm.c | 8 3 files

[lttng-dev] [PATCH v2 lttng-tools] Filter allocation and large bytecode fixes

2012-09-04 Thread Christian Babeux
- Respin. Support 65536 bytes bytecode len + filter ABI changes. 3/3 - Already merged. Thanks, Christian Babeux (1): Fix: Accept bytecode of length 65536 bytes src/bin/lttng-sessiond/lttng-ust-abi.h | 6 +++--- src/common/sessiond-comm/sessiond-comm.h| 6

[lttng-dev] [PATCH lttng-ust] Fix: Filter ABI changes to support FILTER_BYTECODE_MAX_LEN (65536)

2012-09-04 Thread Christian Babeux
compromise since the filtering feature has not been released yet. Signed-off-by: Christian Babeux christian.bab...@efficios.com --- include/lttng/ust-abi.h | 4 ++-- include/ust-comm.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/lttng/ust-abi.h b/include

[lttng-dev] [PATCH lttng-tools] Filter: Notify the user when a filter is already enabled on event(s)

2012-08-23 Thread Christian Babeux
Signed-off-by: Christian Babeux christian.bab...@efficios.com --- src/bin/lttng/commands/enable_events.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/bin/lttng/commands/enable_events.c b/src/bin/lttng/commands/enable_events.c index a2c8a68

[lttng-dev] [PATCH lttng-tools 1/2] Fix: Invalid free on session_name when destroying session

2012-08-15 Thread Christian Babeux
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. Signed-off-by: Christian Babeux christian.bab...@efficios.com --- src

[lttng-dev] [PATCH lttng-tools 2/2] Cleanup: Remove unused get_default_session_name() function

2012-08-15 Thread Christian Babeux
Signed-off-by: Christian Babeux christian.bab...@efficios.com --- src/bin/lttng/commands/destroy.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/src/bin/lttng/commands/destroy.c b/src/bin/lttng/commands/destroy.c index 7b7ea0e..cdc2c53 100644 --- a/src/bin/lttng/commands

[lttng-dev] [PATCH lttng-tools 0/2] relayd IPv6 fixes

2012-08-10 Thread Christian Babeux
not supported by protocol error when calling bind(). Thanks, Christian Christian Babeux (2): Fix: Off by one in lttcomm_sock_domain enum Fix: Wrong domain used when initializing IPv6 sockets src/common/sessiond-comm/inet6.c | 2 +- src/common/sessiond-comm/sessiond-comm.h | 4 ++-- 2 files

[lttng-dev] [PATCH lttng-tools 2/2] Fix: Wrong domain used when initializing IPv6 sockets

2012-08-10 Thread Christian Babeux
Signed-off-by: Christian Babeux christian.bab...@efficios.com --- src/common/sessiond-comm/inet6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/sessiond-comm/inet6.c b/src/common/sessiond-comm/inet6.c index 0d96c31..98aba04 100644 --- a/src/common/sessiond-comm

Re: [lttng-dev] [PATCH lttng-tools 2/2] Fix: Missing libs dependencies in configure check for lttng-ust-ctl

2012-08-09 Thread Christian Babeux
Hi Mathieu, not sure I understand why all the changes you are doing are needed. What happens if you just do: - [AC_MSG_ERROR([Cannot find LTTng-UST. Use [LDFLAGS]=-Ldir to specify its location, or specify --disable-lttng-ust to build lttng-tools without LTTng-UST support.])]

[lttng-dev] [PATCH lttng-tools 1/2] Fix: Libtool fails to find dependent libraries when cross-compiling lttng-tools

2012-08-03 Thread Christian Babeux
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 Signed-off-by: Christian Babeux christian.bab

[lttng-dev] [PATCH lttng-tools 0/2] Configure fixes for cross-compilation

2012-08-03 Thread Christian Babeux
}) in the other-lib-case of AC_CHECK_LIB. Thanks, Christian Christian Babeux (2): Fix: Libtool fails to find dependent libraries when cross-compiling lttng-tools Fix: Missing libs dependencies in configure check for lttng-ust-ctl configure.ac | 38 +- 1 file

[lttng-dev] [PATCH lttng-tools 2/2] Fix: Missing libs dependencies in configure check for lttng-ust-ctl

2012-08-03 Thread Christian Babeux
. Signed-off-by: Christian Babeux christian.bab...@efficios.com --- configure.ac | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 3a023cd..e4b9eb1 100644 --- a/configure.ac +++ b/configure.ac @@ -138,13 +138,16 @@ AC_ARG_ENABLE(lttng

[lttng-dev] [PATCH v2 lttng-ust] Fix: Libtool fails to find dependent libraries when cross-compiling lttng-ust

2012-08-02 Thread Christian Babeux
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 Fixes: #321 Signed-off-by: Christian Babeux

[lttng-dev] lttng-ust, libtool and cross-compilation

2012-07-30 Thread Christian Babeux
Hi all, When cross-compiling lttng-ust, some users might encounter an issue regarding missing libraries like this one: /usr/lib/gcc/powerpc-linux-gnu/4.4.5/../../../../powerpc-linux-gnu/bin/ld: warning: liblttng-ust-tracepoint.so.0, needed by ../../liblttng-ust/.libs/liblttng-ust.so, not found

[lttng-dev] [PATCH lttng-tools] Fix: relayd relay_cmd_pipe/thread_quit_pipe should be closed on exit/error.

2012-07-20 Thread Christian Babeux
Use the utils functions found in common/utils.h on pipes operations (open/close). Signed-off-by: Christian Babeux christian.bab...@efficios.com --- src/bin/lttng-relayd/main.c | 57 +++-- 1 file changed, 14 insertions(+), 43 deletions(-) diff --git a/src

[lttng-dev] [RFC PATCH lttng-tools] relayd pipes and error handling

2012-07-17 Thread Christian Babeux
Hi, The current relayd employ two set of pipes for command relaying and thread quit signalling. The relay_cmd_pipe pipes are never closed. Also, the thread_quit_pipe pipes are not closed in some error cases (fail to parse args, fail to daemonize, etc.). Here is a proposed way to cleanup and

<    1   2