lttng-ust.git
11 years agoAdd a README.cygwin detailing Cygwin specific build/install instructions cygwin-2.0-experimental
Christian Babeux [Fri, 21 Dec 2012 18:38:22 +0000 (13:38 -0500)] 
Add a README.cygwin detailing Cygwin specific build/install instructions

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCygwin: Unlink shm and wait pipe file
Christian Babeux [Thu, 6 Dec 2012 20:42:48 +0000 (15:42 -0500)] 
Cygwin: Unlink shm and wait pipe file

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCygwin: Fix multiple loaded instances of liblttng-ust-tracepoint due to dlopen
Christian Babeux [Tue, 4 Dec 2012 21:52:41 +0000 (16:52 -0500)] 
Cygwin: Fix multiple loaded instances of liblttng-ust-tracepoint due to dlopen

Multiple instances of the liblttng-ust-tracepoint were present in memory and
caused duplication and incoherence of various data structures (such as the
tracepoints hashtable). This is due to the dlopen(3) of liblttng-ust-tracepoint
in applications that were already linked against liblttng-ust-tracepoint.

This commit introduce a new restriction on application tracing:
the applications must be linked against liblttng-ust-tracepoint.

11 years agoCygwin: Remove weak symbols attributes due to semantic differences
Christian Babeux [Tue, 4 Dec 2012 21:21:40 +0000 (16:21 -0500)] 
Cygwin: Remove weak symbols attributes due to semantic differences

Weak symbols on Cygwin/PE platforms do not have the same semantics
as on Linux/ELF platforms [1].

The __start___tracepoints_ptrs and __stop___tracepoints_ptrs symbols
were NULL and tracepoints were not properly registered due to this
difference.

[1] - http://cygwin.com/ml/cygwin/2010-04/msg00281.html

11 years agoCygwin: Introduce new LTTNG_UST_STREAM_PIPE command to open wakeup pipe
Christian Babeux [Thu, 29 Nov 2012 02:11:27 +0000 (21:11 -0500)] 
Cygwin: Introduce new LTTNG_UST_STREAM_PIPE command to open wakeup pipe

Normally, the userspace tracer open the wakeup pipe, and the resulting
fd is passed to the consumer via the session daemon. Since we can't pass
fds via UNIX socket, the pipe need to be opened separately in the tracer
and in the consumer. The only way to open the write side of a named pipe
*before* the read side without blocking is to open it in read/write mode.
This is supported on Linux, but POSIX leave this behavior undefined [1].

The Cygwin named pipe implementation doesn't seem to allow multiple
readers/writers on a named pipe. Opening a pipe in RW mode in the tracer
and then opening the read side in the consumer won't work because the
consumer will get a "Device or ressource busy" error. Thus arise the need
to open the named pipe read side *before* the write side.

In order to accomplish this task, a new command must be introduced to signal
to the tracer that a specific named pipe should be opened in write mode.

Proper care must be taken to issue this command *after* the named pipe paths
have been sent to the consumer or else the sessiond or tracer will block
indefinitely.

[1] - man 7 fifo

11 years agoCygwin: Generate dummy file descriptors
Christian Babeux [Wed, 28 Nov 2012 22:00:01 +0000 (17:00 -0500)] 
Cygwin: Generate dummy file descriptors

The consumer in LTTng-tools keeps a mapping of the file descriptors
between the sessiond and it's own file descriptors in a hash table.
The fd number is the key used for lookups in the hash table.
Since we can't send the fds to the sessiond on Cygwin, the consumer
fds mapping mechanism is broken.

To fix this, we generate a dummy file descriptor upon reception
of the file paths in the sessiond.

11 years agoCygwin: Pass file paths instead of file descriptors over UNIX sockets
Christian Babeux [Wed, 28 Nov 2012 21:28:22 +0000 (16:28 -0500)] 
Cygwin: Pass file paths instead of file descriptors over UNIX sockets

Cygwin doesn't support file descriptors passing over UNIX sockets [1].
LTTng-ust and LTTng-tools make extensive use of this feature to pass
the shm and the wakeup pipe file descriptor from the userspace tracer
to the session daemon. The sessiond then pass those file descriptors
to the consumer.

To workaround this limitation, we pass the file paths of the shm and the
named wakeup pipe. These paths are relayed by the sessiond to the
consumer. The consumer then needs to open these paths.

The files are created in /tmp/lttng-fds and have the following format:

SHM         : ust-shm-<pid>-<uuid>
Wakeup pipe : ust-wait-<pid>-<uuid>

The libringbuffer has been modified to automatically create these files
on shm creation. Take note that the shm path is actually a symlink
to the shm in /dev/shm. Also, this change introduce an additional dependency
to libuuid in libringbuffer.

[1] - http://cygwin.com/ml/cygwin/2009-10/msg00403.html

11 years agoDisable build of libraries/tests that rely on the RTLD_NEXT GNU extension
Christian Babeux [Wed, 28 Nov 2012 04:42:52 +0000 (23:42 -0500)] 
Disable build of libraries/tests that rely on the RTLD_NEXT GNU extension

The liblttng-ust-fork and liblttng-ust-libc-wrapper rely on the RTLD_NEXT
GNU extension of dlsym(3) to lookup/override symbols in libc. This extension
is not available on Cygwin. Disable building of these libraries for the
moment.

11 years agoMissing defined(__CYGWIN__) around getprocname wrapper
Christian Babeux [Wed, 28 Nov 2012 04:03:19 +0000 (23:03 -0500)] 
Missing defined(__CYGWIN__) around getprocname wrapper

11 years agoTypo: Conflict in lttng-context-vtid. not properly resolved
Christian Babeux [Wed, 28 Nov 2012 04:01:06 +0000 (23:01 -0500)] 
Typo: Conflict in lttng-context-vtid. not properly resolved

The conflict that appeared on commit d9ecffa9ad6203df66b5fa81e8d505c3a9779c16
was not properly resolved.

11 years agoCygwin: sigtimedwait workaround for SIGPIPE handling on wait pipe write
Christian Babeux [Wed, 28 Nov 2012 03:27:56 +0000 (22:27 -0500)] 
Cygwin: sigtimedwait workaround for SIGPIPE handling on wait pipe write

sigtimedwait(3) is not available in Cygwin. To workaround
this limitation, if a SIGPIPE is pending after a write(3),
kill ourselve with SIGPIPE and use sigwaitinfo(3) to wait
on delivery and effectively "discarding" the signal.

11 years agoForce the ld "no-undefined" flag on Cygwin
Christian Babeux [Wed, 28 Nov 2012 01:31:47 +0000 (20:31 -0500)] 
Force the ld "no-undefined" flag on Cygwin

In order to build shared libraries on Cygwin/MinGW/Windows, all
symbols must be defined at link time. Activating the "-no-undefined"
flag will fail the build if it's not the case.

11 years agoFix: liblttng-ust-tracepoint missing symbols when using ld "no-undefined"
Christian Babeux [Tue, 27 Nov 2012 22:16:28 +0000 (17:16 -0500)] 
Fix: liblttng-ust-tracepoint missing symbols when using ld "no-undefined"

When using the LDFLAGS="-Wl,-no-undefined", ld complains about undefined
references to ust_safe_snprintf, patient_write and init_usterr.
The fix is to add the appropriate libraries where those symbols
are defined to the libtool LIBADD flag.

11 years agoendian.h: support cygwin
Mathieu Desnoyers [Thu, 24 May 2012 14:22:56 +0000 (10:22 -0400)] 
endian.h: support cygwin

commit 2928fe5a335193a097da016b80cf046970b8ce36 upstream.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoalign.h: support cygwin page size
Mathieu Desnoyers [Thu, 24 May 2012 14:19:46 +0000 (10:19 -0400)] 
align.h: support cygwin page size

commit 8e3484cf85747d476302a2049dfa9741cc128b32 upstream.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoAdd cygwin support to libringbuffer getcpu.h
Mathieu Desnoyers [Thu, 24 May 2012 14:12:21 +0000 (10:12 -0400)] 
Add cygwin support to libringbuffer getcpu.h

commit 4327cb7d2c9f34fc8d01f8ed92e2a43de7ef14f6 upstream.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agousterr: do not include unused sys/syscall.h
Mathieu Desnoyers [Mon, 5 Mar 2012 17:28:38 +0000 (12:28 -0500)] 
usterr: do not include unused sys/syscall.h

commit cf7b4f7a95b7a4ff78969206944a0ddc77efd6d7 upstream.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoust-endian.h: update warning message
Mathieu Desnoyers [Thu, 23 Feb 2012 12:19:12 +0000 (07:19 -0500)] 
ust-endian.h: update warning message

commit cc3002545ccf27c77325ef0fc5cc091b100fb154 upstream.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoRemove gettid warning
Mathieu Desnoyers [Tue, 21 Feb 2012 16:48:28 +0000 (11:48 -0500)] 
Remove gettid warning

commit d02d8cf80d1d12c9686f3507a6efb978a36831c5 upstream.

Not so important, hides really useful warnings.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoRemove O_LARGEFILE from tests
Mathieu Desnoyers [Tue, 21 Feb 2012 16:40:57 +0000 (11:40 -0500)] 
Remove O_LARGEFILE from tests

commit 5cd198029b32a694091328e73035dcf8bc26045e upstream.

Not portable.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoWrap FLOAT_WORD_ORDER
Mathieu Desnoyers [Tue, 21 Feb 2012 16:31:10 +0000 (11:31 -0500)] 
Wrap FLOAT_WORD_ORDER

commit ad496c21b85087f600271299c9cd2a3ffe00c4c1 upstream.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoust-event.h: use BYTE_ORDER instead of __BYTE_ORDER
Mathieu Desnoyers [Tue, 21 Feb 2012 16:27:50 +0000 (11:27 -0500)] 
ust-event.h: use BYTE_ORDER instead of __BYTE_ORDER

commit 8d1d746f7042216d04c842e09bd6c3b2643d2309 upstream.

available on both Linux and FreeBSD.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoRemove useless const qualifier
Mathieu Desnoyers [Tue, 21 Feb 2012 15:59:56 +0000 (10:59 -0500)] 
Remove useless const qualifier

commit bf24b009e15fdf7c9c5fdf464a2576ce8cd7dfc3 upstream.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoUpdate uuid_create type cast
Mathieu Desnoyers [Tue, 21 Feb 2012 15:58:57 +0000 (10:58 -0500)] 
Update uuid_create type cast

commit 8536db0b17d16e73a6508b1fafadd0550f789345 upstream.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoCast uuid_create parameter
Mathieu Desnoyers [Tue, 21 Feb 2012 15:57:39 +0000 (10:57 -0500)] 
Cast uuid_create parameter

commit ba2d30409189db160e554390675a2a5a3aea9d13 upstream.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoAdd freebsd rfork support
Mathieu Desnoyers [Tue, 21 Feb 2012 15:55:55 +0000 (10:55 -0500)] 
Add freebsd rfork support

commit 939c89cb3cf490502503fb2c20d62b2087160bb5 upstream.

[ Edit by Christian Babeux: Resolve conflict around #ifdef linux
  and daemon() override. ]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agouuid.h should only be included when libuuid is detected
Mathieu Desnoyers [Tue, 21 Feb 2012 15:06:10 +0000 (10:06 -0500)] 
uuid.h should only be included when libuuid is detected

commit 21bc53bb3107d29424ef0c6beba7987ee53a9c7a upstream.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoRename uuid.h wrapper to lttng-ust-uuid.h
Mathieu Desnoyers [Tue, 21 Feb 2012 15:01:15 +0000 (10:01 -0500)] 
Rename uuid.h wrapper to lttng-ust-uuid.h

commit eda498b8b8e095ff45eb4906413994987ead66ec upstream.

So it does not clash with BSD system's uuid.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoCreate libuuid/libc uuid wrapper
Mathieu Desnoyers [Tue, 21 Feb 2012 14:56:27 +0000 (09:56 -0500)] 
Create libuuid/libc uuid wrapper

commit 19d8b1b3cecac9a52cf8e0e381854703c141ec5e upstream.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoconfigure.ac: check for both libuuid/libc uuid APIs
Mathieu Desnoyers [Tue, 21 Feb 2012 13:46:52 +0000 (08:46 -0500)] 
configure.ac: check for both libuuid/libc uuid APIs

commit 5e8445c48358d4d943c61e5cd94429fc75047d63 upstream.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoUse XSI-compliant strerror_r by default on non-Linux
Mathieu Desnoyers [Tue, 21 Feb 2012 02:54:04 +0000 (21:54 -0500)] 
Use XSI-compliant strerror_r by default on non-Linux

commit 9fd26814e5df6e255491f6f05fec2faa84157571 upstream.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoCompat layer for gettid
Mathieu Desnoyers [Tue, 21 Feb 2012 02:32:25 +0000 (21:32 -0500)] 
Compat layer for gettid

commit 49c0da7df5e7bd32c06d69822e9b92120bf4d392 upstream.

[ Edit by Christian Babeux: Resolve includes conflict in
  liblttng-ust/lttng-context-vtid.c ]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agosnprintf: fix namespace of snprintf types for freebsd
Mathieu Desnoyers [Tue, 21 Feb 2012 02:18:20 +0000 (21:18 -0500)] 
snprintf: fix namespace of snprintf types for freebsd

commit 002e1fde60208d5eea1cfde037672ac23422d8c3 upstream.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoAdd freebsd support for getcpu (use cpu nr 0)
Mathieu Desnoyers [Tue, 21 Feb 2012 01:12:04 +0000 (20:12 -0500)] 
Add freebsd support for getcpu (use cpu nr 0)

commit 08bf1cc1c8731a717e253932f3e36672b0476078 upstream.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoAdd get proc name wrapper for FreeBSD
Mathieu Desnoyers [Tue, 21 Feb 2012 00:52:30 +0000 (19:52 -0500)] 
Add get proc name wrapper for FreeBSD

commit 08114193d6fd56309b520ae50e7117b8bc7f34a5 upstream.

[ Edit by Christian Babeux: Resolve includes conflict in
  liblttng-ust/lttng-ust-comm.c ]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoFix freebsd endian support
Mathieu Desnoyers [Tue, 21 Feb 2012 00:28:44 +0000 (19:28 -0500)] 
Fix freebsd endian support

commit 75181c4b1b6e046ae8561c486ced003a83b1a696 upstream.

Need to use #elif defined().

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agofls: use local namespace to do not clash with FreeBSD string.h
Mathieu Desnoyers [Tue, 21 Feb 2012 00:17:08 +0000 (19:17 -0500)] 
fls: use local namespace to do not clash with FreeBSD string.h

commit bfd265823dd6c3b272b92c6e39456e851bfd51ce upstream.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoAdd FreeBSD compat layer for endian.h
Mathieu Desnoyers [Tue, 21 Feb 2012 00:15:25 +0000 (19:15 -0500)] 
Add FreeBSD compat layer for endian.h

commit 2ae577586ce440e59acd37c0110b80a595a64d12 upstream.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoVersion 2.0.6 v2.0.6
Mathieu Desnoyers [Mon, 26 Nov 2012 20:41:11 +0000 (15:41 -0500)] 
Version 2.0.6

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoPrint probe provider mismatch error even without -Wsystem-headers
Mathieu Desnoyers [Mon, 26 Nov 2012 20:14:24 +0000 (15:14 -0500)] 
Print probe provider mismatch error even without -Wsystem-headers

Suggested-by: David OShea <David.OShea@quantum.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: Conditionally disable tests requiring shared libs support
Mathieu Desnoyers [Mon, 5 Nov 2012 15:36:14 +0000 (10:36 -0500)] 
Fix: Conditionally disable tests requiring shared libs support

When building lttng-ust with shared library support explicitly
disabled (e.g.: ./configure --disable-shared), libtool fail with
a fatal error:

  CC       tp.lo
  CC       tp2.lo
  CCLD     liblttng-ust-provider-ust-tests-demo.la
libtool: link: can not build a shared library
libtool: link: See the libtool documentation for more information.
libtool: link: Fatal configuration error.

The build should not fail because some tests require explicit shared
library support, instead they should be skipped.

This patch detect that the --disable-shared flag was passed to the
configure script 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.

[ Edit by Mathieu Desnoyers: add "" in configure.ac to follow the local
  coding style. ]

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCleanup: don't spawn per-user thread if HOME is not set
Mathieu Desnoyers [Tue, 30 Oct 2012 01:39:42 +0000 (21:39 -0400)] 
Cleanup: don't spawn per-user thread if HOME is not set

Reported-by: David OShea <David.OShea@quantum.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: Fix self-assign warning on struct ustfork_clone_info init
Christian Babeux [Tue, 23 Oct 2012 19:57:55 +0000 (15:57 -0400)] 
Fix: Fix self-assign warning on struct ustfork_clone_info init

Use the proper field designator syntax (C99) to initialize the
ustfork_clone_info struct.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: memcpy of string is larger than source
Mathieu Desnoyers [Tue, 9 Oct 2012 16:47:31 +0000 (12:47 -0400)] 
Fix: memcpy of string is larger than source

Hollis Blanchard <hollis_blanchard@mentor.com> wrote:
> I seem to have hit a little problem with a "hello world" test app and
> lttng-ust 2.0.3. lttng-ust.git seems to be affected as well. Basically,
> I created a single UST tracepoint, but as soon as I run "lttng
> enable-event -u -a", my app segfaults. The problem seems to be that when
> creating the event to pass to ltt_event_create(), we try to memcpy the
> full 256 bytes of name. However, the name might be shorter, and if we
> get unlucky it falls within 256 bytes of the segment boundary...

Fixing the 3 sites where this issue arise. Manually inspecting all
memcpy in the UST code returned by grep did the job.

Reported-by: Hollis Blanchard <hollis_blanchard@mentor.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoliblttng-ust-fork: override daemon() call
Mathieu Desnoyers [Fri, 5 Oct 2012 13:44:37 +0000 (09:44 -0400)] 
liblttng-ust-fork: override daemon() call

Fixes #252

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoBuild out of src tree
Paul Chavent [Tue, 2 Oct 2012 16:37:30 +0000 (12:37 -0400)] 
Build out of src tree

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: manpage typo "-lllttng-ust" -> "-llttng-ust"
Mathieu Desnoyers [Wed, 26 Sep 2012 14:21:47 +0000 (10:21 -0400)] 
Fix: manpage typo "-lllttng-ust" -> "-llttng-ust"

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoManpage update: document use in daemons
Mathieu Desnoyers [Wed, 19 Sep 2012 14:25:27 +0000 (10:25 -0400)] 
Manpage update: document use in daemons

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: get_wait_shm() ust mutex deadlock (add 2 missing exit calls)
Mathieu Desnoyers [Tue, 18 Sep 2012 04:52:10 +0000 (00:52 -0400)] 
Fix: get_wait_shm() ust mutex deadlock (add 2 missing exit calls)

Reported-by: changz <zheng.chang@emc.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: get_wait_shm() ust mutex deadlock
Mathieu Desnoyers [Mon, 17 Sep 2012 16:01:14 +0000 (12:01 -0400)] 
Fix: get_wait_shm() ust mutex deadlock

The main issue is that get_wait_shm() bypass the fork() wrapper (with
lttng_ust_nest_count), which is responsible for holding the UST mutex
across fork(). Therefore, when exiting the context of the child process,
we execute the destructor, which try to grab the UST mutex, which might
be in pretty much any state.

Given that we don't want this process to try to register to
lttng-sessiond (because this is internal to lttng-ust), we might want to
let it skip the destructor execution. This would actually be the easiest
way out.

Reported-by: changz <zheng.chang@emc.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoUpdate version to 2.0.5 v2.0.5
Mathieu Desnoyers [Mon, 27 Aug 2012 12:23:00 +0000 (08:23 -0400)] 
Update version to 2.0.5

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: threads should be created in DETACHED state
Michael Greene [Thu, 16 Aug 2012 20:42:02 +0000 (16:42 -0400)] 
Fix: threads should be created in DETACHED state

Signed-off-by: Michael Greene <michael.greene@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix UST SIGPIPE handling
Mathieu Desnoyers [Tue, 14 Aug 2012 21:10:59 +0000 (17:10 -0400)] 
Fix UST SIGPIPE handling

When the consumerd dies (from a SIGKILL), it may close all of its file
descriptors rather abruptly.

We ensured that the UST command threads have all signals blocked, and
they use MSG_NOSIGNAL when sending messages to the sessiond over
sockets.

However, the consumer scheme uses a pipe(2) to transport the "wakeup"
info from the application tracing site to the consumer daemon. It may
send a SIGPIPE to the application in that case, which could kill the
application, an unwanted side-effect.

Block thread SIGPIPE around write() and wait for the signal to fix this.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Christian Babeux <christian.babeux@efficios.com>
CC: David Goulet <dgoulet@efficios.com>
11 years agoFix: Libtool fails to find dependent libraries when cross-compiling lttng-ust
Christian Babeux [Thu, 2 Aug 2012 22:55:11 +0000 (18:55 -0400)] 
Fix: Libtool fails to find dependent libraries when cross-compiling lttng-ust

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

Fixes: #321
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: remove unused texinfo dep from configure.ac
Mathieu Desnoyers [Wed, 20 Jun 2012 20:00:34 +0000 (16:00 -0400)] 
Fix: remove unused texinfo dep from configure.ac

Fixes #274

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix C99 strict compatibility: don't use void * for function pointers
Mathieu Desnoyers [Tue, 19 Jun 2012 17:45:05 +0000 (13:45 -0400)] 
Fix C99 strict compatibility: don't use void * for function pointers

compiling public headers with --std=x99 -pedantic shows:

warning: ISO C forbids conversion of object pointer to function pointer type

Use "void (*func)(void)" to represent a generic function pointer rather
than "void *".

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix c99 compatibility: tp_rcu_dereference_bp() should not use braced-groups within...
Mathieu Desnoyers [Mon, 18 Jun 2012 14:22:12 +0000 (10:22 -0400)] 
Fix c99 compatibility: tp_rcu_dereference_bp() should not use braced-groups within expressions

Allow tp_rcu_dereference_bp() to be used within programs compiled with
--std=c99 -pedantic -Werror. Fixes the following:

In file included from hello.c:34:0:
ust_tests_hello.h: In function ‘__tracepoint_cb_ust_tests_hello___tptest’:
ust_tests_hello.h:28:1: warning: ISO C forbids braced-groups within expressions [-pedantic]
ust_tests_hello.h:28:1: warning: ISO C forbids conversion of object pointer to function pointer type [-pedantic]

We can easily fix this one since tp_rcu_dereference_bp() really
evaluates only a single expression.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix c99 compatibility: use __typeof__ instead of typeof in public headers
Mathieu Desnoyers [Mon, 11 Jun 2012 14:15:25 +0000 (10:15 -0400)] 
Fix c99 compatibility: use __typeof__ instead of typeof in public headers

Reported-by: John Steele Scott <toojays@toojays.net>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoUpdate version to 2.0.4 v2.0.4
Mathieu Desnoyers [Thu, 14 Jun 2012 15:12:28 +0000 (11:12 -0400)] 
Update version to 2.0.4

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: perform TLS fixup of nest count outside of UST mutex
Mathieu Desnoyers [Wed, 13 Jun 2012 08:46:44 +0000 (04:46 -0400)] 
Fix: perform TLS fixup of nest count outside of UST mutex

Could otherwise lead to a deadlock between the dynamic linker, TLS
fixup, and the UST mutex due to reversed lock acquisition order.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: liblttng-ust-fork deadlock
Mathieu Desnoyers [Wed, 13 Jun 2012 08:26:34 +0000 (04:26 -0400)] 
Fix: liblttng-ust-fork deadlock

* Mathieu Desnoyers (mathieu.desnoyers@efficios.com) wrote:
> * Burton, Michael (mburton@ciena.com) wrote:
> > Mathieu,
> >
> > I think there is a deadlock scenario in UST, which has been causing my problem.
>
> Good catch !
>
> >
> > sessiond is started as root:
> >     - creates global sockets ONLY
> >     - DOES NOT CREATE shm in $HOME/lttng-ust-wait-<uid>
> >
> > application linked against ust is run as root:
> >   - in lttng_ust_init constructor
> >   - ust_listener_thread  (local_apps)
> >     - fails to connect to local_apps in $HOME/.lttng (as expected)
> >     - prev_connect_failed=1
> >     - ust_unlock()
> >     - restart
> >     - wait_for_sessiond()
> >  -->  - ust_lock()
> >  |      - get_map_shm()
> >  |        - get_wait_shm()
> > DEADLOCK    - shm_open() FAILS (not created by sessiond when run by root)
> >  |            - fork() (trying to create shared memory itself)
> >  |              - ust_before_fork()
> >  ------------>    - ust_lock()
> >
> >
> > You should be able to create this with an empty main, with no
> > tracepoints.  As long as sessiond is started as root so
> > $HOME/lttng-ust-wait-<uid> is not created.  You can also make the
> > lttng-ust constructor (lttng_ust_init) wait forever and then you'll be
> > able to see the deadlock in gdb without even leaving the
> > lttng_ust_init constructor.
>
> Ah, I see. This deadlock is caused by the interaction between
> [ liblttng-ust-fork ] and liblttng-ust (the fork override is
> performed by [ liblttng-ust-fork ]).

This can be reproduced easily with the in-tree tests: by removing the
lttng-ust-apps-wait* files belonging to the user in /dev/shm, running
the "tests/fork" test (with ./run) hangs. If we run "hello" first, and
then the fork test, it works fine.

Fixing this by keeping a nesting counter around the fork() call, so we
return immediately from the pre/post fork handlers if they are
overridden by liblttng-ust-fork.

Reported-by: Michael Burton <mburton@ciena.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: handle pthread errors
Mathieu Desnoyers [Wed, 13 Jun 2012 00:12:23 +0000 (20:12 -0400)] 
Fix: handle pthread errors

Show a descriptive error message if pthread calls fail.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: local apps allowed should disable local (not global) tracing
Mathieu Desnoyers [Wed, 13 Jun 2012 00:03:53 +0000 (20:03 -0400)] 
Fix: local apps allowed should disable local (not global) tracing

Reported-by: Michael Burton <mburton@ciena.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix strict ISO-C compatibility for ust-tracepoint-event.h public header
Mathieu Desnoyers [Tue, 12 Jun 2012 15:51:31 +0000 (11:51 -0400)] 
Fix strict ISO-C compatibility for ust-tracepoint-event.h public header

../../include/lttng/ust-tracepoint-event.h:328:23: warning: ISO C does not permit named variadic macros [-Wvariadic-macros]

Use ... and __VA_ARGS__ instead of args... and args.

This enables ISO-C compability for the tracepoint headers for program
instrumentation. Note that the probes need to be built _without_ strict
C99 flags (they require gnu extensions).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: support -std=c99 in tracepoint macros
Mathieu Desnoyers [Tue, 12 Jun 2012 15:22:46 +0000 (11:22 -0400)] 
Fix: support -std=c99 in tracepoint macros

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoRevert "hello test: fail on old style definition"
Mathieu Desnoyers [Mon, 11 Jun 2012 14:00:53 +0000 (10:00 -0400)] 
Revert "hello test: fail on old style definition"

This reverts commit 5558cdce88ba0436ddaa02377ac79c1985e5f81a.

This commit was not intended to make it into stable-2.0.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: tracepoint.h should not generate old-style definitions
Mathieu Desnoyers [Mon, 11 Jun 2012 13:53:07 +0000 (09:53 -0400)] 
Fix: tracepoint.h should not generate old-style definitions

I've defined a tracepoint without arguments:

   TRACEPOINT_EVENT(

        qemu_tb_hash,

        flushall,

        TP_ARGS(void),

        TP_FIELDS()

   )

When I build (with -Werror=old-style-definition), I get this error:

   In file included from /home/hollisb/work/qemu.git/exec.c:59:0:

   /home/hollisb/work/qemu.git/tracepoints.h:24:2: error: function declaration isn’t a prototype [-Werror=strict-prototypes]

   /home/hollisb/work/qemu.git/tracepoints.h: In function ‘__tracepoint_cb_qemu_tb_hash___flushall’:

   /home/hollisb/work/qemu.git/tracepoints.h:24:2: error: old-style function definition [-Werror=old-style-definition]

   cc1: all warnings being treated as errors

The preprocessed code looks like so:

   extern struct

   # 129 "/usr/local/include/lttng/tracepoint.h" 3

                  tracepoint

   # 24 "/home/hollisb/work/qemu.git/tracepoints.h"

     __tracepoint_qemu_tb_hash___flushall

   # 19 "/home/hollisb/work/qemu.git/tracepoints.h"

     ; static __attribute__ (( always_inline )) __inline__ void

     __tracepoint_cb_qemu_tb_hash___flushall

   # 19 "/home/hollisb/work/qemu.git/tracepoints.h"

     () { struct tracepoint_probe *__tp_probe; if (!tracepoint_dlopen.rcu_read_lock_sym_bp) return; tracepoint_dlopen.rcu_read_lock_sym_bp(); __tp_probe = ({ typeof(__tracepoint_qemu_tb_hash___flushall.probes) _________p1 = ((typeof(__tracepoint_qemu_tb_hash___flushall.probes)) (tracepoint_dlopen.rcu_dereference_sym_bp(((void *) (__tracepoint_qemu_tb_hash___flushall.probes))))); (_________p1); }); if (__builtin_expect(!!(!__tp_probe), 0)) goto end; do { void *__tp_cb = __tp_probe->func; void *__tp_data = __tp_probe->data; ((void (*)(void *__tp_data)) (__tp_cb)) (__tp_data); } while ((++__tp_probe)->func); end: tracepoint_dlopen.rcu_read_unlock_sym_bp(); } static __attribute__ (( always_inline )) __inline__ void

I believe the problem comes from -Werror=old-style-definition not liking
that empty "()", i.e. tracepoint_cb_qemu_tb_hash___flushall() { ... }.

Reported-by: Hollis Blanchard <hollis_blanchard@mentor.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agohello test: fail on old style definition
Mathieu Desnoyers [Mon, 11 Jun 2012 13:52:41 +0000 (09:52 -0400)] 
hello test: fail on old style definition

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: don't define variables in headers
Mathieu Desnoyers [Fri, 8 Jun 2012 17:17:05 +0000 (13:17 -0400)] 
Fix: don't define variables in headers

From Hollis Blanchard <hollis_blanchard@mentor.com>:
> Hi, I was adding an LTTng UST 2.0 tracepoint to an application that uses
> -warn-common (see http://www.math.utah.edu/docs/info/ld_2.html). I created
> a simple tracepoint, had lttng-gen-tp produce tracepoints.o, then linked
> that to the application, along with -llttng-ust. This results in some
> warnings:
>
> tracepoints.o: warning: common of `handle' overridden by definition
> /usr/local/lib/liblttng-ust.so: warning: defined here
> tracepoints.o: warning: common of `lttng_client_callbacks_overwrite' overridden
> +by definition
> /usr/local/lib/liblttng-ust.so: warning: defined here
> tracepoints.o: warning: common of `lttng_client_callbacks_discard' overridden by
> +definition
> /usr/local/lib/liblttng-ust.so: warning: defined here
> tracepoints.o: warning: common of `lttng_client_callbacks_metadata' overridden
> +by definition
> /usr/local/lib/liblttng-ust.so: warning: defined here
> /usr/local/lib/liblttng-ust-tracepoint.so.0: warning: multiple common of
> +`handle'
> tracepoints.o: warning: previous common is here
>
> This seems to be a valid warning. The LTTng UST headers contain
> definitions like this in include/lttng/ringbuffer-config.h:
> struct lttng_ust_shm_handle *handle;
>
> If two objects use that header, each will get a copy of "handle", right?

handle: This was meant to be a forward declaration of

  struct lttng_ust_shm_handle

so just removing the "*handle" part. This can be considered as a
cleanup (or a fix without actual runtime effect).

lttng_client_callbacks_*: if the cb values would have been used in the
consumer daemon, this would have caused an issue: these would be set to
NULL instead of the actual callback pointers. So in a way this is a fix,
but it does not have any runtime impact at this point.

Reported-by: Hollis Blanchard <hollis_blanchard@mentor.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agotest "hello": add boolean test
Mathieu Desnoyers [Tue, 5 Jun 2012 17:15:52 +0000 (13:15 -0400)] 
test "hello": add boolean test

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: perform macro expansion on tracepoint signatures
Mathieu Desnoyers [Tue, 5 Jun 2012 17:08:54 +0000 (13:08 -0400)] 
Fix: perform macro expansion on tracepoint signatures

The problem can be seen by patching the demo test from lttng-ust as
follows:

--- a/tests/demo/ust_tests_demo3.h
+++ b/tests/demo/ust_tests_demo3.h
@@ -22,12 +22,14 @@ extern "C" {
  * all copies or substantial portions of the Software.
  */

+#include <stdbool.h>
+
 #include <lttng/tracepoint.h>

 TRACEPOINT_EVENT(ust_tests_demo3, done,
-       TP_ARGS(int, value),
+       TP_ARGS(bool, value),
        TP_FIELDS(
-               ctf_integer(int, value, value)
+               ctf_integer(bool, value, value)
        )
 )

Then when the demo is run with LTTNG_UST_DEBUG=1, a warning is shown,
like:

liblttng_ust_tracepoint[3315/3315]: Warning: Tracepoint signature mismatch, not
enabling one or more tracepoints. Ensure that the tracepoint probes prototypes
match the application. (in set_tracepoint() at tracepoint.c:310)
liblttng_ust_tracepoint[3315/3315]: Warning: Tracepoint "ust_tests_demo3:done"
signatures: call: "_Bool, value" vs probe: "bool, value". (in set_tracepoint()
at tracepoint.c:312)

It seems that TP_ARGS does not perform preprocessor expansion on the
"bool" type spec, while something underneath TP_FIELDS does. And since
(at least on this Centos 6.2 box) stdbool.h uses a #define rather than a
typedef to make bool equivalent to _Bool, liblttng detects a mismatch.

Reported-by: John Steele Scott <toojays@toojays.net>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoUST check pointer/de-reference order
Fredrik Oestman [Tue, 5 Jun 2012 15:21:36 +0000 (11:21 -0400)] 
UST check pointer/de-reference order

I stumbled across some code where pointers are de-referenced and then
checked for NULL.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoUpdate version to 2.0.3 v2.0.3
Mathieu Desnoyers [Fri, 1 Jun 2012 18:13:58 +0000 (14:13 -0400)] 
Update version to 2.0.3

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: Block all signals in listener thread
Wolfgang Puffitsch [Fri, 1 Jun 2012 16:04:37 +0000 (12:04 -0400)] 
Fix: Block all signals in listener thread

The listener thread does not block signals and receives signals that are
intended for the application. As this can cause applications to fail,
the listener thread should block all signals. The attached patch is
derived from an old commit and fixes the issue.

Fixes #241

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoRemove jni support for configure
Mathieu Desnoyers [Tue, 22 May 2012 16:30:05 +0000 (12:30 -0400)] 
Remove jni support for configure

java jni is not supported in stable-2.0. Make sure that the
--with-jni-interface fails.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: don't SIGBUS when filesystem is full
Mathieu Desnoyers [Fri, 18 May 2012 21:07:06 +0000 (17:07 -0400)] 
Fix: don't SIGBUS when filesystem is full

Write zeroes into the buffer after its allocation to ensure that writes
to the shm will not trigger SIGBUS upon full filesystem situations.

This scenario can occur if /dev/shm is filled, e.g. by specifying too
large buffers with --enable-channel.

When the write() fails, the buffer creation for this channel fails.

Fixes #230

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agotracepoint: include stdio.h for NULL definition
Mathieu Desnoyers [Tue, 15 May 2012 17:31:07 +0000 (13:31 -0400)] 
tracepoint: include stdio.h for NULL definition

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agomanpage update: document that probes need gcc
Mathieu Desnoyers [Tue, 15 May 2012 12:51:07 +0000 (08:51 -0400)] 
manpage update: document that probes need gcc

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: remove # in front on extern "C" {
Mathieu Desnoyers [Tue, 15 May 2012 12:40:04 +0000 (08:40 -0400)] 
Fix: remove # in front on extern "C" {

Fails to compile with g++.

Reported-by: Francis Giraldeau <francis.giraldeau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCleanup: don't use GNU old-style field designator extension
Mathieu Desnoyers [Thu, 10 May 2012 18:33:38 +0000 (14:33 -0400)] 
Cleanup: don't use GNU old-style field designator extension

ustfork.c:112:38: warning: use of GNU old-style field designator extension
      [-Wgnu-designator]
                struct ustfork_clone_info info = { fn: fn, arg: arg };
                                                   ^~~
                                                   .fn =
ustfork.c:112:46: warning: use of GNU old-style field designator extension
      [-Wgnu-designator]
                struct ustfork_clone_info info = { fn: fn, arg: arg };
                                                           ^~~~
                                                           .arg =

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: remove padding field after variable sized array
Mathieu Desnoyers [Thu, 10 May 2012 18:31:28 +0000 (14:31 -0400)] 
Fix: remove padding field after variable sized array

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: lttng-ust.pc needs to specify -ldl
Mathieu Desnoyers [Wed, 25 Apr 2012 20:27:09 +0000 (16:27 -0400)] 
Fix: lttng-ust.pc needs to specify -ldl

Fixes #224

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate changelog after liblttng-ust-java removal v2.0.2
Mathieu Desnoyers [Wed, 18 Apr 2012 23:36:27 +0000 (19:36 -0400)] 
Update changelog after liblttng-ust-java removal

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: drop unusable liblttng-ust-java.so
Mathieu Desnoyers [Wed, 18 Apr 2012 23:34:37 +0000 (19:34 -0400)] 
Fix: drop unusable liblttng-ust-java.so

There is no java class installed onto the system anyway, so it was
dependent on having access to the build tree to use it. And
documentation only sits in the build tree, so instead of installing a
.so that cannot be used, and is not documented, remove it from the
package for 2.0.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate changelog for 2.0.2
Mathieu Desnoyers [Wed, 18 Apr 2012 23:06:45 +0000 (19:06 -0400)] 
Update changelog for 2.0.2

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoRevert "Fix: Make the JNI interface actually work"
Mathieu Desnoyers [Wed, 18 Apr 2012 23:05:32 +0000 (19:05 -0400)] 
Revert "Fix: Make the JNI interface actually work"

This reverts commit 46adf653a1d01b8e87baa30cc9b92616eee1a788.

It changes the makefiles, and broke make dist. This does not belong in a
stable release.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate version to 2.0.2
Mathieu Desnoyers [Wed, 18 Apr 2012 20:27:49 +0000 (16:27 -0400)] 
Update version to 2.0.2

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: examples Makefiles should pass $(LIBS) at last
Mathieu Desnoyers [Wed, 18 Apr 2012 20:17:56 +0000 (16:17 -0400)] 
Fix: examples Makefiles should pass $(LIBS) at last

Fixes #210

Description

Since Ubuntu 11.10, the "--as-needed" option is given by default to ld
(linker). This option breaks the makefiles given with the userspace
tracing examples. Therefore the libraries against which the program
should be linked should be passed at last:
$(CC) -o $@ $^ $(LIBS)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoRevert "Build a jar for the Java side of the JNI interface"
Mathieu Desnoyers [Thu, 12 Apr 2012 18:06:14 +0000 (14:06 -0400)] 
Revert "Build a jar for the Java side of the JNI interface"

This reverts commit 6dcf3689333a2b465a5738c840d0b14d3f8014ea.

This should not go into stable-2.0.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoBuild a jar for the Java side of the JNI interface
Alexandre Montplaisir [Thu, 12 Apr 2012 13:39:55 +0000 (09:39 -0400)] 
Build a jar for the Java side of the JNI interface

Signed-off-by: Alexandre Montplaisir <alexandre.montplaisir@polymtl.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: ustctl need to send the second fd upon error of 1st fd
Mathieu Desnoyers [Mon, 9 Apr 2012 15:02:42 +0000 (11:02 -0400)] 
Fix: ustctl need to send the second fd upon error of 1st fd

Otherwise cause protocol discrepancy between ust and sessiond upon send
error. The sessiond will wait for an fd that never arrives.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: Make the JNI interface actually work
Alexandre Montplaisir [Thu, 5 Apr 2012 21:15:57 +0000 (17:15 -0400)] 
Fix: Make the JNI interface actually work

Now a user can import LTTngUst.java (which is now in a proper
package) and then define tracepoints in his application with:

LTTngUst.tracepointString(name, args);

We could eventually ship it in a .jar when the JNI interface is
enabled. It's still very basic, only string payloads are
implemented, and there is no mechanism to enable/disable trace
points call sites at runtime (they are always enabled). The event under
which these events appear is "lttng_ust_java:string".

Signed-off-by: Alexandre Montplaisir <alexandre.montplaisir@polymtl.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate version to 2.0.1 v2.0.1
Mathieu Desnoyers [Thu, 29 Mar 2012 04:48:12 +0000 (00:48 -0400)] 
Update version to 2.0.1

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUse bsd-compatible fcntl for close-on-exec on socket
Mathieu Desnoyers [Tue, 21 Feb 2012 03:01:52 +0000 (22:01 -0500)] 
Use bsd-compatible fcntl for close-on-exec on socket

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix multi-session wildcard support
Mathieu Desnoyers [Tue, 27 Mar 2012 20:15:20 +0000 (16:15 -0400)] 
Fix multi-session wildcard support

Incorrectly unset loglevel information upon creation of wildcard_entry
was causing a second session with wildcard enabled to not record its
events.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix event lost count when buffer is full
Mathieu Desnoyers [Tue, 27 Mar 2012 19:41:42 +0000 (15:41 -0400)] 
Fix event lost count when buffer is full

The tracing channels should count lost events due to buffer full, and
the metadata channel should not (see comment), but not the opposite.
This was a mixup between the two.

Reported-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoRemove inappropriate \n from easy-ust sample
Mathieu Desnoyers [Sun, 25 Mar 2012 23:52:07 +0000 (19:52 -0400)] 
Remove inappropriate \n from easy-ust sample

Although \n is permitted in strings, it adds newlines in the trace
pretty-printer output, which is not that nice.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate version to 2.0.0 stable v2.0.0
Mathieu Desnoyers [Tue, 20 Mar 2012 22:33:26 +0000 (18:33 -0400)] 
Update version to 2.0.0 stable

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agomake dist: Generate bzip2 instead of gzip
Mathieu Desnoyers [Tue, 20 Mar 2012 21:34:28 +0000 (17:34 -0400)] 
make dist: Generate bzip2 instead of gzip

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate version to 2.0.0-rc4 v2.0.0-rc4
Mathieu Desnoyers [Tue, 20 Mar 2012 21:05:09 +0000 (17:05 -0400)] 
Update version to 2.0.0-rc4

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.044232 seconds and 4 git commands to generate.