]> git.lttng.org Git - lttng-ust.git/log
lttng-ust.git
10 years agoVersion 2.2.3 stable-2.2 v2.2.3
Mathieu Desnoyers [Fri, 28 Feb 2014 17:08:31 +0000 (12:08 -0500)] 
Version 2.2.3

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: FD leak in liblttng-ust-ctl
Mathieu Desnoyers [Fri, 7 Feb 2014 16:54:06 +0000 (11:54 -0500)] 
Fix: FD leak in liblttng-ust-ctl

Make sure wait/wakeup stream and channel FDs are closed at teardown.
This led to FD leaks on the consumer daemon when the relay daemon
disconnects unexpectedly.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: liblttng-ust-fork Makefile flags mismatch
Mathieu Desnoyers [Wed, 5 Feb 2014 00:38:19 +0000 (19:38 -0500)] 
Fix: liblttng-ust-fork Makefile flags mismatch

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: C++: incomplete extern C guard transition
Mathieu Desnoyers [Mon, 3 Feb 2014 18:41:35 +0000 (13:41 -0500)] 
Fix: C++: incomplete extern C guard transition

Recently, commits to fix SDT issues with extern C
(https://bugs.lttng.org/issues/597) brougt in compile errors when the
tracepoint is defined in the same file where the tracepoint provider is
created.

This was due to the presence of extern C guards in tracepoint-event.h, a
header dedicated to tracepoint probe provider compilation. After commits
"Tracepoint probes don't need extern C", it should have gone away. This
is the main fix done by this patch.

This patch also adds missing extern C guards in ust-error.h and
ust-events.h.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoCleanup gen-tp: add quotes around AM_CC
Mathieu Desnoyers [Tue, 14 Jan 2014 15:00:08 +0000 (10:00 -0500)] 
Cleanup gen-tp: add quotes around AM_CC

Would deal with spaces in the env. var. if there are any. It does not
seem to be important in practice (currently), because automake seems to
fail on CC including spaces at configure time.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoPass the CC variable to the example Makefiles
Jérémie Galarneau [Fri, 10 Jan 2014 21:38:05 +0000 (16:38 -0500)] 
Pass the CC variable to the example Makefiles

Cross-compilation fails when using the --host configure option
since the cross-compiler is not invoked by the hand-made Makefiles
in doc/examples.

The CC variable must be passed explicitly to ensure the host's
default compiler is not invoked.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agodoc/examples/gen-tp: pass automake CPPFLAGS/CFLAGS/LDFLAGS
Mathieu Desnoyers [Mon, 26 Aug 2013 15:26:09 +0000 (11:26 -0400)] 
doc/examples/gen-tp: pass automake CPPFLAGS/CFLAGS/LDFLAGS

Fix cross-build.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agodoc/examples: error out when a subdir make fails
Mathieu Desnoyers [Fri, 15 Nov 2013 18:48:28 +0000 (13:48 -0500)] 
doc/examples: error out when a subdir make fails

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: check deliver now takes tsc argument
Mathieu Desnoyers [Wed, 11 Dec 2013 13:40:05 +0000 (08:40 -0500)] 
Fix: check deliver now takes tsc argument

Extra call site in stable-2.2 not handled by
"Fix: eliminate timestamp overlap between packets"

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: eliminate timestamp overlap between packets
Mathieu Desnoyers [Sun, 24 Nov 2013 09:11:16 +0000 (04:11 -0500)] 
Fix: eliminate timestamp overlap between packets

By using the timestamp sampled at space reservation when the packet is
being filled as "end timestamp" for a packet, we can ensure there is no
overlap between packet timestamp ranges, so that packet timestamp end <=
following packets timestamp begin.

Overlap between consecutive packets becomes an issue when the end
timestamp of a packet is greater than the end timestamp of a following
packet, IOW a packet completely contains the timestamp range of a
following packet.  This kind of situation does not allow trace viewers
to do binary search within the packet timestamps. This kind of situation
will typically never occur if packets are significantly larger than
event size, but this fix ensures it can never even theoretically happen.

The only case where packets can still theoretically overlap is if they
have equal begin and end timestamps, which is valid.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix lttng-ust(3) manpage
Mathieu Desnoyers [Sat, 23 Nov 2013 17:55:44 +0000 (12:55 -0500)] 
Fix lttng-ust(3) manpage

Describe that TRACEPOINT_CREATE_PROBES is needed.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: move va_end to outermost label
Mathieu Desnoyers [Tue, 19 Nov 2013 02:16:06 +0000 (21:16 -0500)] 
Fix: move va_end to outermost label

Coverity:

** CID 1021237:  Missing varargs init or cleanup  (VARARGS)
/snprintf/vfprintf.c: 955 in ust_safe_vfprintf()

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: add missing NULL check after allocation
Mathieu Desnoyers [Tue, 19 Nov 2013 02:07:13 +0000 (21:07 -0500)] 
Fix: add missing NULL check after allocation

Found by coverity:

** CID 1021246:  Dereference null return value  (NULL_RETURNS)
/libringbuffer/shm.c: 80 in shm_object_table_create()

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAdd missing copyrights to test scripts
Mathieu Desnoyers [Fri, 15 Nov 2013 15:46:08 +0000 (10:46 -0500)] 
Add missing copyrights to test scripts

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoEscape minus signs in lttng-ust-cyg-profile manpage
Jon Bernard [Fri, 15 Nov 2013 14:12:47 +0000 (09:12 -0500)] 
Escape minus signs in lttng-ust-cyg-profile manpage

By default, "-" chars are interpreted as hyphens (U+2010) by groff, not
as minus signs (U+002D). Since options to programs use minus signs
(U+002D), this means for example in UTF-8 locales that you cannot cut
and paste options, nor search for them easily.

Source: http://lintian.debian.org/tags/hyphen-used-as-minus-sign.html

Signed-off-by: Jon Bernard <jbernard@tuxion.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix spelling mistake in lttng-ust manpage
Jon Bernard [Fri, 15 Nov 2013 14:12:33 +0000 (09:12 -0500)] 
Fix spelling mistake in lttng-ust manpage

Signed-off-by: Jon Bernard <jbernard@tuxion.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoVersion 2.2.2 v2.2.2
Mathieu Desnoyers [Tue, 12 Nov 2013 17:06:46 +0000 (12:06 -0500)] 
Version 2.2.2

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: application SIGBUS when starting in parallel with sessiond
Mathieu Desnoyers [Wed, 6 Nov 2013 12:03:10 +0000 (07:03 -0500)] 
Fix: application SIGBUS when starting in parallel with sessiond

There is a race between application startup and sessiond startup, where
there is an intermediate state where applications can SIGBUS if they see
a zero-sized shm, if the shm has been created, but not ftruncated yet.

On the UST side, fix this by ensuring that UST can read the shared
memory file descriptor with a read() system call before they try
accessing it through a memory map (which triggers the SIGBUS if the
access goes beyond the file size).

On the sessiond side, another commit needs to ensure that the shared
memory is writeable by applications as long as its size is 0, which
allow applications to perform ftruncate and extend its size.

Fixes #623

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: Minor corrections to the lttng-ust man page
Jérémie Galarneau [Wed, 23 Oct 2013 16:09:06 +0000 (12:09 -0400)] 
Fix: Minor corrections to the lttng-ust man page

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoDocumentation cleanup: Overhaul of the lttng-gen-tp man page
Jérémie Galarneau [Wed, 23 Oct 2013 16:08:15 +0000 (12:08 -0400)] 
Documentation cleanup: Overhaul of the lttng-gen-tp man page

Fix a couple of typos, mistakes and out-of date informations.

[Mathieu: added extra fix recommended by Daniel Thibault]

Acked-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoWarning cleanup: add missing padding initializer
Mathieu Desnoyers [Thu, 31 Oct 2013 12:21:55 +0000 (08:21 -0400)] 
Warning cleanup: add missing padding initializer

Reported-by: Marcus Tomlinson <themarcustomlinson@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: socket connect hang on heavy loads
Mathieu Desnoyers [Fri, 11 Oct 2013 19:03:24 +0000 (15:03 -0400)] 
Fix: socket connect hang on heavy loads

We need to perform both connect and sending registration message before
doing the next connect otherwise we may reach unix socket connect queue
max limits and block on the 2nd connect while the session daemon is
awaiting the first connect registration message.

This happens in scenarios where unix socket connect queues are nearly
full.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCleanup: fix typo
Mathieu Desnoyers [Fri, 11 Oct 2013 18:41:39 +0000 (14:41 -0400)] 
Cleanup: fix typo

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: ust-comm recvmsg should handle partial receive
Mathieu Desnoyers [Fri, 11 Oct 2013 18:20:22 +0000 (14:20 -0400)] 
Fix: ust-comm recvmsg should handle partial receive

Handles cases where unix socket buffer is full. Without this fix, the
session daemon kicks out application that happen to have their
registration message split into multiple recvmsg on the sessiond side.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agogcc warning fix: -Wextra
Mathieu Desnoyers [Tue, 8 Oct 2013 21:35:15 +0000 (17:35 -0400)] 
gcc warning fix: -Wextra

For the "ordered comparison of pointer with integer zero" warning, fix
this by comparing (type) -1 against (type) 0 instead of just 0, so if
"type" is a pointer type, this pointer type will be applied to the right
operand too, thus fixing the warning.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAdd usage reference count for tracepoints
Ikaheimonen, JP [Mon, 7 Oct 2013 13:33:02 +0000 (09:33 -0400)] 
Add usage reference count for tracepoints

Keep track of how many libraries use a tracepoint, and disable the
tracepoint when the number of users drops to zero.

A new reference counter is added to tracepoint_entry. This keeps track
of how many callsites use that tracepoint.

When you have libraries and/or executables sharing tracepoints, you
cannot just disable your tracepoints when the library is unregistered.
You must check that the tracepoint is not used by any other libraries
before you disable it.

Function lib_disable_tracepoints becomes unnecessary, and is removed.

Signed-off-by: Ikaheimonen, JP <jp_ikaheimonen@mentor.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agotracepoint.c: Move add_callsite/remove_callsite further down in file
Mathieu Desnoyers [Mon, 7 Oct 2013 13:30:52 +0000 (09:30 -0400)] 
tracepoint.c: Move add_callsite/remove_callsite further down in file

In preparation for calling disable_tracepoint() from those functions.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoStore the callsites into the library callsite list
Ikaheimonen, JP [Thu, 3 Oct 2013 06:46:27 +0000 (06:46 +0000)] 
Store the callsites into the library callsite list

Fix the issue where the callsites are registered but never
properly unregistered.

[ Edit by Mathieu Desnoyers: minor coding style fix: remove parenthesis. ]

Signed-off-by: Ikaheimonen, JP <jp_ikaheimonen@mentor.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix linking warning
Mohamad Gebai [Mon, 30 Sep 2013 20:47:30 +0000 (16:47 -0400)] 
Fix linking warning

lttng_static_ctx should be extern in this header to avoid getting a
warning when --warn-common is used.

PS: Thanks to Yannick Brosseau for his help.

Signed-off-by: Mohamad Gebai <mohamad.gebai@polymtl.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: doc/examples cross-build
Mathieu Desnoyers [Mon, 26 Aug 2013 15:14:56 +0000 (11:14 -0400)] 
Fix: doc/examples cross-build

We need to pass automake's CPPFLAGS and LDFLAGS to examples. Add CFLAGS
too for completeness.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: liblttng_ust.la should depend on liblttng-ust-tracepoint.la
Mathieu Desnoyers [Thu, 22 Aug 2013 21:59:06 +0000 (17:59 -0400)] 
Fix: liblttng_ust.la should depend on liblttng-ust-tracepoint.la

Changing -llttng-ust-tracepoint to liblttng-ust-tracepoint.la, so it
appears in the build dependencies.

Fixes #325

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoexamples: tracepoint probes don't need extern C
Mathieu Desnoyers [Thu, 15 Aug 2013 18:21:41 +0000 (14:21 -0400)] 
examples: tracepoint probes don't need extern C

Fix all UST demo applications under doc/examples/

Fixes #597

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoTracepoint probes don't need extern C
Mathieu Desnoyers [Thu, 15 Aug 2013 14:55:30 +0000 (10:55 -0400)] 
Tracepoint probes don't need extern C

tracepoint.h has the proper extern C guards, so every liblttng-ust API
called from the probe has the proper linkage.

The rest of the symbols are only meaningful within the probe, so we
don't care if they are mangled or not.

This fixes the two examples, and lttng-gen-tp.

Fixes #597

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: doc/examples VPATH build
Mathieu Desnoyers [Sun, 21 Jul 2013 21:42:16 +0000 (17:42 -0400)] 
Fix: doc/examples VPATH build

Fixes #577

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoDisable doc/examples build
Mathieu Desnoyers [Tue, 25 Jun 2013 21:40:57 +0000 (17:40 -0400)] 
Disable doc/examples build

This breaks VPATH build.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: doc/examples: gen-tp path
Mathieu Desnoyers [Mon, 1 Jul 2013 17:06:06 +0000 (13:06 -0400)] 
Fix: doc/examples: gen-tp path

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoRevert "Disable doc/examples build"
Mathieu Desnoyers [Sun, 21 Jul 2013 21:51:26 +0000 (17:51 -0400)] 
Revert "Disable doc/examples build"

This reverts commit a69663741646c3ef10a495b11fe8b23fcd7219b8.

In preparation for upcoming VPATH build fix.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: Unchecked asprintf/vasprintf return values
Jérémie Galarneau [Fri, 12 Jul 2013 17:09:51 +0000 (13:09 -0400)] 
Fix: Unchecked asprintf/vasprintf return values

strp·may·be·modified·even·in·case·of·failure·according·to·the
ASPRINTF(3) man page.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoMissing NULL pointer init in tap.c
Mathieu Desnoyers [Fri, 12 Jul 2013 15:41:10 +0000 (11:41 -0400)] 
Missing NULL pointer init in tap.c

Could lead to free() of unitialized pointer.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoVersion 2.2.1 v2.2.1
Mathieu Desnoyers [Thu, 11 Jul 2013 17:58:09 +0000 (13:58 -0400)] 
Version 2.2.1

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: libs order in Makefile
Julien Desfossez [Thu, 4 Jul 2013 16:01:04 +0000 (12:01 -0400)] 
Fix: libs order in Makefile

Since commit 16c96fc0224145192f803fecbdb20ec05fdaf5e2, the examples
don't build well on Ubuntu. The gcc -l argument needs to be the last
one.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: ring buffer: get_subbuf() checks should be performed on "consumed" parameter
Mathieu Desnoyers [Wed, 3 Jul 2013 22:33:37 +0000 (18:33 -0400)] 
Fix: ring buffer: get_subbuf() checks should be performed on "consumed" parameter

This triggers lots of false-positive -EAGAIN errors in flight recorder
snapshots.

Reported-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agobuild: Fix out-of-tree build
Otavio Salvador [Tue, 2 Jul 2013 15:18:48 +0000 (11:18 -0400)] 
build: Fix out-of-tree build

To allow out-of-tree build, we need to include top_buildir in include
directories or the generated config header won't be found.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: SWITCH_FLUSH new sub-buffer checks
Mathieu Desnoyers [Mon, 1 Jul 2013 22:18:06 +0000 (18:18 -0400)] 
Fix: SWITCH_FLUSH new sub-buffer checks

The SWITCH_FLUSH, when performed on a completely empty sub-buffer, was
missing some checks (imported from space reservation).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: ring buffer: handle concurrent update in nested buffer wrap around check
Mathieu Desnoyers [Mon, 1 Jul 2013 21:10:52 +0000 (17:10 -0400)] 
Fix: ring buffer: handle concurrent update in nested buffer wrap around check

With stress-test loads that trigger sub-buffer switch very frequently
(small 4kB sub-buffers, frequent flush) in lttng-modules, we currently
observe this kind of warnings once every few minutes:

[65335.896208] ring buffer relay-overwrite-mmap, cpu 5: records were lost. Caused by:
[65335.896208]   [ 0 buffer full, 1 nest buffer wrap-around, 0 event too big ]

It appears that the check for nested buffer wrap-around does not take
into account that a concurrent execution contexts (either nested for
per-cpu buffers, or from another CPU or nested for global buffers) can
update the commit_count value concurrently.

What we really want to do with this check is to ensure that if we enter
a sub-buffer that had an unbalanced reserve/commit count, assuming there
is no hope that this gets rebalanced promptly, we detect this and drop
the current event. However, in the case where the commit counter has
been concurrently updated by another reserve or a switch, we want to
retry the entire reserve operation.

One way to detect this is to sample the reserve offset twice, around the
commit counter read, along with the appropriate memory barriers.
Therefore, we can detect if the mismatch between reserve and commit
counter is actually caused by a concurrent update, which necessarily has
updated the reserve counter.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: handle writes of length 0
Mathieu Desnoyers [Sun, 30 Jun 2013 21:45:32 +0000 (17:45 -0400)] 
Fix: handle writes of length 0

lib_ring_buffer_write() could be passed a length of 0. This typically
has no side-effect as far as writing into the buffers is concerned,
except for one detail: in overwrite mode, there is a check to make sure
the sub-buffer can be written into. This check is performed even if
length is 0. In the case where this would fall exactly at the end of a
sub-buffer, the check would fail, because the offset would fall exactly
at the beginning of the next sub-buffer.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: incorrect release dates in Changelog
Mathieu Desnoyers [Tue, 25 Jun 2013 21:50:58 +0000 (17:50 -0400)] 
Fix: incorrect release dates in Changelog

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoVersion 2.2.0 v2.2.0
Mathieu Desnoyers [Tue, 25 Jun 2013 21:43:10 +0000 (17:43 -0400)] 
Version 2.2.0

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoDisable doc/examples build
Mathieu Desnoyers [Tue, 25 Jun 2013 21:40:57 +0000 (17:40 -0400)] 
Disable doc/examples build

This breaks VPATH build.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: lttng-events VPATH build
Mathieu Desnoyers [Tue, 25 Jun 2013 21:10:13 +0000 (17:10 -0400)] 
Fix: lttng-events VPATH build

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoRevert "Allow #include in template (.tp) file"
Mathieu Desnoyers [Tue, 25 Jun 2013 21:01:03 +0000 (17:01 -0400)] 
Revert "Allow #include in template (.tp) file"

This reverts commit 47eba1fd0b22821100f18893d1b7e88b12d9c99f.

This commit introduce a new feature in lttng-gen-tp, but still has some
semantic issue in the notion of comments vs #include. Postpone this
feature to 2.3.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAllow #include in template (.tp) file
Yannick Brosseau [Sat, 22 Jun 2013 17:48:27 +0000 (13:48 -0400)] 
Allow #include in template (.tp) file

The #include directive won't be parsed, but will be copied to the
generated .h files.

Also add a verbose (-v) mode to display some debugging output

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agodoc/examples: build gen-tp example by default
Mathieu Desnoyers [Thu, 20 Jun 2013 13:38:52 +0000 (09:38 -0400)] 
doc/examples: build gen-tp example by default

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agodoc/examples: support BSD make
Mathieu Desnoyers [Thu, 20 Jun 2013 13:30:20 +0000 (09:30 -0400)] 
doc/examples: support BSD make

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoVersion 2.2.0-rc3 v2.2.0-rc3
Mathieu Desnoyers [Wed, 19 Jun 2013 01:13:44 +0000 (21:13 -0400)] 
Version 2.2.0-rc3

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoTracepoint.h: replace assertion by fprintf and abort()
Mathieu Desnoyers [Tue, 18 Jun 2013 14:07:57 +0000 (10:07 -0400)] 
Tracepoint.h: replace assertion by fprintf and abort()

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoRemove unused assert.h from bitfield.h
Mathieu Desnoyers [Tue, 18 Jun 2013 14:05:29 +0000 (10:05 -0400)] 
Remove unused assert.h from bitfield.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoClarify probe registration documentation/errors
Mathieu Desnoyers [Tue, 18 Jun 2013 14:02:00 +0000 (10:02 -0400)] 
Clarify probe registration documentation/errors

Fixes #513

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAdd mising include in ust.h
Mathieu Desnoyers [Tue, 18 Jun 2013 01:00:03 +0000 (21:00 -0400)] 
Add mising include in ust.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agolttng-gen-tp: Fix include guard name with file using non valid characters
Yannick Brosseau [Mon, 17 Jun 2013 16:07:11 +0000 (12:07 -0400)] 
lttng-gen-tp: Fix include guard name with file using non valid characters

Now, the include guard will be generated with all the non
alpha-numeric characters replace with an '_'

Fixes #511

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: segfault when print invalid command
Mathieu Desnoyers [Mon, 17 Jun 2013 15:19:22 +0000 (11:19 -0400)] 
Fix: segfault when print invalid command

Fixes #556

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: Add --no-as-needed to the demo example's Makefile
Jérémie Galarneau [Fri, 14 Jun 2013 21:33:47 +0000 (17:33 -0400)] 
Fix: Add --no-as-needed to the demo example's Makefile

Some distributions now ship with the --as-needed linker flag
set by default (Ubuntu 13.04). This will cause the linker to
remove the references to lttng-ust from the provider objects
thus causing the application to fail when preloading them.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agozmalloc: attribute always_inline
Mathieu Desnoyers [Fri, 14 Jun 2013 15:55:08 +0000 (11:55 -0400)] 
zmalloc: attribute always_inline

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: liblttng-ust process startup hang when sessiond is stopped
Mathieu Desnoyers [Thu, 30 May 2013 13:49:05 +0000 (09:49 -0400)] 
Fix: liblttng-ust process startup hang when sessiond is stopped

Ensure the listener thread owns socket and notify_socket, so they don't
have to hold the ust_lock() while connecting to the sessiond and reading
from this socket.

Therefore, after process fork, we can safely cleanup those retources,
because the thread has been removed by the operating system. On exit,
however, let the OS teardown those sockets, so exit path does not race
with the listener thread.

Fixes #545

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoMove include directive from CFLAGS to LOCAL_CPPFLAGS in examples' Makefiles
Jérémie Galarneau [Thu, 30 May 2013 14:32:12 +0000 (10:32 -0400)] 
Move include directive from CFLAGS to LOCAL_CPPFLAGS in examples' Makefiles

The use of LOCAL_* flags and override directives ensures that the build
succeeds even if the user explicitly overrides CFLAGS/CPPFLAGS/LDFLAGS.

Fixes #537

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAdd parameter -f to rm in Makefile clean target
Simon Marchi [Wed, 22 May 2013 17:22:56 +0000 (13:22 -0400)] 
Add parameter -f to rm in Makefile clean target

If the files we want to delete do not exist (for example after a failed
build), the make clean fails.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: missing dependency for liblttng-ust-tracepoint.so
Mathieu Desnoyers [Tue, 21 May 2013 13:39:41 +0000 (09:39 -0400)] 
Fix: missing dependency for liblttng-ust-tracepoint.so

Fixes #538

Reported-by: Alexandros Frantzis <alexandros.frantzis@canonical.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoRemove 0.x TODO
Mathieu Desnoyers [Wed, 15 May 2013 12:17:30 +0000 (14:17 +0200)] 
Remove 0.x TODO

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAdd warning about default prefix and library paths to README
Jérémie Galarneau [Wed, 15 May 2013 06:07:06 +0000 (08:07 +0200)] 
Add warning about default prefix and library paths to README

Fixes #467

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoRevert "Revert "Fix (another) linker library order""
Mathieu Desnoyers [Wed, 15 May 2013 06:03:56 +0000 (08:03 +0200)] 
Revert "Revert "Fix (another) linker library order""

This reverts commit a5b31eab4e1f190d68d51c47dabb60b64ee471e7.

The patch was OK in the first place. Explanation:

* Simon Marchi <simon.marchi@polymtl.ca> wrote:

Actually, $^ here is "demo.o", not "demo. Also, the libs should appear
after the objects on the command line. See the "-l" section in
http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html. On most setup
this doesn't matter, since -Wl,--no-as-needed was the default pretty
much everywhere. Ubuntu decided to use -Wl,--as-needed to avoid
unnecessary dependencies, so the order becomes important. If you try
to manual build on a recent Ubuntu you will get undefined references
to dlopen and such. So this patch is good.

If you read carefully the log sent by Alexandre, you see that it is
when building the shared libs in this directory
(lttng-ust-provider-ust-tests-demo.so) that the build fails. I don't
know why it fails, but Alexandre hinted that passing "-fPIE -pie" to
build a shared library is weird (it is usually -fPIC -pic). I am not
sure where that comes from. This behaviour only happens when building
the package, not when building manually.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoRevert "Revert "Fix linker library order""
Mathieu Desnoyers [Wed, 15 May 2013 06:03:01 +0000 (08:03 +0200)] 
Revert "Revert "Fix linker library order""

This reverts commit 661805af83e2d4e7fa19432d6ae553460d6cd524.

The patch was OK in the first place. Explanation:

* Simon Marchi <simon.marchi@polymtl.ca> wrote:

Actually, $^ here is "demo.o", not "demo. Also, the libs should appear
after the objects on the command line. See the "-l" section in
http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html. On most setup
this doesn't matter, since -Wl,--no-as-needed was the default pretty
much everywhere. Ubuntu decided to use -Wl,--as-needed to avoid
unnecessary dependencies, so the order becomes important. If you try
to manual build on a recent Ubuntu you will get undefined references
to dlopen and such. So this patch is good.

If you read carefully the log sent by Alexandre, you see that it is
when building the shared libs in this directory
(lttng-ust-provider-ust-tests-demo.so) that the build fails. I don't
know why it fails, but Alexandre hinted that passing "-fPIE -pie" to
build a shared library is weird (it is usually -fPIC -pic). I am not
sure where that comes from. This behaviour only happens when building
the package, not when building manually.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agosnprintf: play nice with static checker
Mathieu Desnoyers [Wed, 15 May 2013 05:46:04 +0000 (07:46 +0200)] 
snprintf: play nice with static checker

Coverity complains that we pass a singleton as an array. Transform it
into an array of size 1.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agotracepoint.c: Add coverity alloc/free annotations
Mathieu Desnoyers [Wed, 15 May 2013 05:41:57 +0000 (07:41 +0200)] 
tracepoint.c: Add coverity alloc/free annotations

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: "fields" leak on register
Mathieu Desnoyers [Wed, 15 May 2013 05:28:01 +0000 (07:28 +0200)] 
Fix: "fields" leak on register

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: memory leak for events without fields
Mathieu Desnoyers [Wed, 15 May 2013 05:26:36 +0000 (07:26 +0200)] 
Fix: memory leak for events without fields

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: memory leak on connection reset
Mathieu Desnoyers [Wed, 15 May 2013 05:23:40 +0000 (07:23 +0200)] 
Fix: memory leak on connection reset

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoRevert "Fix linker library order"
Mathieu Desnoyers [Tue, 14 May 2013 12:36:00 +0000 (14:36 +0200)] 
Revert "Fix linker library order"

This reverts commit 725e63c5194bfdcde0a2a3507aca156ba36cf49f.

Hrm, actually, these patches are wrong.

commit 725e63c5194bfdcde0a2a3507aca156ba36cf49f for instance:

"Libraries must be specified after the binary target."

 demo: demo.o
-       $(CC) -o $@ $(LIBS) $^
+       $(CC) -o $@ $^ $(LIBS)

the binary target here is "$@".

$^ is the source file name (demo.c).

this patch moves the source file name prior to the libraries, which is
incorrect (ref: gcc(1)). The input files should appear last.

So it breaks builds where $(LIBS) is non-empty.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoRevert "Fix (another) linker library order"
Mathieu Desnoyers [Tue, 14 May 2013 12:35:28 +0000 (14:35 +0200)] 
Revert "Fix (another) linker library order"

This reverts commit a51ac6d9a011ba10b0be396dc1e801b2fc829651.

Hrm, actually, these patches are wrong.

commit 725e63c5194bfdcde0a2a3507aca156ba36cf49f for instance:

"Libraries must be specified after the binary target."

 demo: demo.o
-       $(CC) -o $@ $(LIBS) $^
+       $(CC) -o $@ $^ $(LIBS)

the binary target here is "$@".

$^ is the source file name (demo.c).

this patch moves the source file name prior to the libraries, which is
incorrect (ref: gcc(1)). The input files should appear last.

So it breaks builds where $(LIBS) is non-empty.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: incorrect support for multi-context
Mathieu Desnoyers [Mon, 13 May 2013 10:02:55 +0000 (06:02 -0400)] 
Fix: incorrect support for multi-context

* Zifei Tong <soariez@gmail.com> wrote:
> I did some debugging one this issue. The problem only occurs when we
> have more than one context field.
> So this will not work, too:
>
> lttng create
> lttng enable-event -a -u
> lttng add-context -u -t vpid
> lttng add-context -u -t vtid
> lttng start
> $@
> lttng stop
> sleep 1
> lttng view
> lttng destroy
>
> The problem I found out is wrong `fields` argument passed into
> `ustcomm_register_channel`.
> The `fields` argument passed is a pointer to the `event_field` of the
> first element in a `lttng_ctx_field` array, but not a
> `lttng_event_field` array as expected.

Fixes #529

Reported-by: Francis Giraldeau <francis.giraldeau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix (another) linker library order
Francis Giraldeau [Sun, 12 May 2013 02:59:21 +0000 (22:59 -0400)] 
Fix (another) linker library order

Libraries must be specified after the binary target.

Signed-off-by: Francis Giraldeau <francis.giraldeau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix typo in run script
Francis Giraldeau [Sun, 12 May 2013 02:58:50 +0000 (22:58 -0400)] 
Fix typo in run script

The actual library is liblttng-ust-libc-wrapper.so

Signed-off-by: Francis Giraldeau <francis.giraldeau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix linker library order
Francis Giraldeau [Sun, 12 May 2013 02:58:12 +0000 (22:58 -0400)] 
Fix linker library order

Libraries must be specified after the binary target.

Signed-off-by: Francis Giraldeau <francis.giraldeau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix examples: add missing CPPFLAGS
Mathieu Desnoyers [Fri, 10 May 2013 19:19:39 +0000 (15:19 -0400)] 
Fix examples: add missing CPPFLAGS

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoexample Makefiles: standardize on $^ for linking
Mathieu Desnoyers [Fri, 10 May 2013 17:29:42 +0000 (13:29 -0400)] 
example Makefiles: standardize on $^ for linking

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix demo example Makefile
Mathieu Desnoyers [Fri, 10 May 2013 17:19:05 +0000 (13:19 -0400)] 
Fix demo example Makefile

Missing tp2.c in object file due to incorrect use of $<.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoMove "hello-static-lib" to doc/examples and add non-automake Makefiles
Jérémie Galarneau [Fri, 10 May 2013 15:24:23 +0000 (11:24 -0400)] 
Move "hello-static-lib" to doc/examples and add non-automake Makefiles

The examples are now automatically built as part of the default make
target and plain Makefiles with no dependency on automake are provided
for clarity.

Update the manpage and README to reflect the change and remove lots of
trailing whitespace.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoVersion 2.2.0-rc2 v2.2.0-rc2
Mathieu Desnoyers [Thu, 9 May 2013 12:50:10 +0000 (08:50 -0400)] 
Version 2.2.0-rc2

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agomanpage: Document probe provider compatibility
Mathieu Desnoyers [Wed, 8 May 2013 19:56:28 +0000 (15:56 -0400)] 
manpage: Document probe provider compatibility

Fixes #502

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: add provider ABI compatibility check
Mathieu Desnoyers [Wed, 8 May 2013 18:52:42 +0000 (14:52 -0400)] 
Fix: add provider ABI compatibility check

There is not much we can do for this compatibility bug in lttng-ust 2.0
and 2.1 (already stable). Adding this check so that starting with
lttng-ust 2.2, when liblttng-ust encounters a probe provider with a
provider version major number higher than it supports, it will reject
it.

Fixes #502

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCleanup: ignore mktemp return value
Mathieu Desnoyers [Tue, 7 May 2013 13:16:39 +0000 (09:16 -0400)] 
Cleanup: ignore mktemp return value

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCleanup: documentation: argument vs field
Mathieu Desnoyers [Sat, 27 Apr 2013 18:42:01 +0000 (14:42 -0400)] 
Cleanup: documentation: argument vs field

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoDocumentation: document undefined behavior for NULL pointers
Mathieu Desnoyers [Sat, 27 Apr 2013 16:51:00 +0000 (12:51 -0400)] 
Documentation: document undefined behavior for NULL pointers

Strings, arrays, sequences have undefined behavior if the pointer they
receive are NULL.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCleanup: silence cppcheck error
Mathieu Desnoyers [Sat, 27 Apr 2013 15:07:29 +0000 (11:07 -0400)] 
Cleanup: silence cppcheck error

Not an error per se, but silences:

/home/jenkins/workspace/lttng-ust-cppcheck/liblttng-ust/lttng-ring-buffer-client.h
429 uninitvar error Uninitialized variable: lttng_chan
/home/jenkins/workspace/lttng-ust-cppcheck/liblttng-ust/lttng-ring-buffer-metadata-client.h
197 uninitvar error Uninitialized variable: lttng_chan

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: add internal mutex for timer
Mathieu Desnoyers [Fri, 26 Apr 2013 14:57:09 +0000 (10:57 -0400)] 
Fix: add internal mutex for timer

Timer management is not called under ust_lock(). It is only called from
the consumer. Add internal locking for timer start/stop and
synchronization management.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years ago32-bit warning fix for cyg profile fast
Mathieu Desnoyers [Mon, 22 Apr 2013 18:39:20 +0000 (14:39 -0400)] 
32-bit warning fix for cyg profile fast

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix warnings for 32-bit in lttng-ust-cyg-profile
Mathieu Desnoyers [Mon, 22 Apr 2013 17:30:08 +0000 (13:30 -0400)] 
Fix warnings for 32-bit in lttng-ust-cyg-profile

In file included from ../include/lttng/ust-tracepoint-event.h:357,
                 from ../include/lttng/tracepoint-event.h:62,
                 from lttng-ust-cyg-profile.h:63,
                 from lttng-ust-cyg-profile.c:27:
././lttng-ust-cyg-profile.h: In function ‘__event_prepare_filter_stack__lttng_ust_cyg_profile___func_entry’:
././lttng-ust-cyg-profile.h:35: warning: cast from pointer to integer of different size
././lttng-ust-cyg-profile.h:35: warning: cast from pointer to integer of different size
././lttng-ust-cyg-profile.h:35: warning: cast from pointer to integer of different size
././lttng-ust-cyg-profile.h:35: warning: cast from pointer to integer of different size
././lttng-ust-cyg-profile.h: In function ‘__event_prepare_filter_stack__lttng_ust_cyg_profile___func_exit’:
././lttng-ust-cyg-profile.h:46: warning: cast from pointer to integer of different size
././lttng-ust-cyg-profile.h:46: warning: cast from pointer to integer of different size
././lttng-ust-cyg-profile.h:46: warning: cast from pointer to integer of different size
././lttng-ust-cyg-profile.h:46: warning: cast from pointer to integer of different size
  CCLD   liblttng-ust-cyg-profile.la
  CC     lttng-ust-cyg-profile-fast.lo
In file included from ../include/lttng/ust-tracepoint-event.h:357,
                 from ../include/lttng/tracepoint-event.h:62,
                 from lttng-ust-cyg-profile-fast.h:59,
                 from lttng-ust-cyg-profile-fast.c:27:
././lttng-ust-cyg-profile-fast.h: In function ‘__event_prepare_filter_stack__lttng_ust_cyg_profile_fast___func_entry’:
././lttng-ust-cyg-profile-fast.h:35: warning: cast from pointer to integer of different size
././lttng-ust-cyg-profile-fast.h:35: warning: cast from pointer to integer of different size

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoTypo fix in README
Mathieu Desnoyers [Thu, 18 Apr 2013 16:24:07 +0000 (12:24 -0400)] 
Typo fix in README

Fixes #505

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: tracepoint.h incorrect assumption about constructor order
Mathieu Desnoyers [Thu, 18 Apr 2013 16:21:55 +0000 (12:21 -0400)] 
Fix: tracepoint.h incorrect assumption about constructor order

Incorrect assumption about constructor execution order can trigger a
segfault when trying to execute tracepoint_register_lib.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCleanup: comment mismatch with code
Mathieu Desnoyers [Fri, 12 Apr 2013 14:23:45 +0000 (10:23 -0400)] 
Cleanup: comment mismatch with code

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: ABI breakage between 2.1 and 2.2-rc1
Mathieu Desnoyers [Wed, 10 Apr 2013 02:17:54 +0000 (22:17 -0400)] 
Fix: ABI breakage between 2.1 and 2.2-rc1

Removal of 2 callbacks was causing ABI breakage. This has been caught
in 2.2-rc1.

This was causing the application to segfault when tracing is active.

Fixes #486

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