lttng-ust.git
8 years agoFix: honor send timeout on unix socket connect
Mathieu Desnoyers [Tue, 13 Sep 2016 20:17:04 +0000 (16:17 -0400)] 
Fix: honor send timeout on unix socket connect

Needed if we want to hold the ust_lock() while we connect to the session
daemon without blocking the application forever if the session daemon is
hung on SIGSTOP.

This only triggers if we launchs _many_ applications with a session
daemon SIGSTOP'd (e.g. 1000 in parallel), so we fill the socket queue,
and applications hang there until the session daemon is SIGCONT'd.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: perform TLS fixup in all UST entry points from each thread
Mathieu Desnoyers [Sat, 1 Oct 2016 22:59:17 +0000 (18:59 -0400)] 
Fix: perform TLS fixup in all UST entry points from each thread

Each entry point into lttng-ust that end up taking the ust lock need to
perform a TLS fixup for each thread. Add a TLS fixup in both listener
threads, in fork and base address dump helper libs, and in app context
and tracepoint probe registration/unregistration functions, which can be
called from application threads.

Those ensure we don't take the libc dl lock within the ust lock when
performing the TLS lazy fixup.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: remove unlock in getcpu
Mathieu Desnoyers [Fri, 2 Sep 2016 19:20:41 +0000 (15:20 -0400)] 
Fix: remove unlock in getcpu

Causes unbalanced RCU read-side lock if nesting safety net is triggered.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: perf counters ABI rdpmc detection
Mathieu Desnoyers [Mon, 27 Jun 2016 21:40:00 +0000 (17:40 -0400)] 
Fix: perf counters ABI rdpmc detection

Copy Linux kernel perf_event.h installed headers into lttng-ust to know
the recent ABI layout, and use the bit description detailed in the
following Linux kernel commit:

https://github.com/torvalds/linux/commit/fa7315871046b9a4c48627905691dbde57e51033

to check whether the kernel supports rdpmc.

Fall-back on the perf read system call for kernels prior to 3.12,
because older kernels have an ABI bug where a union was used for both
cap_usr_time and cap_usr_rdpmc.

Also fall-back on the perf read system call for kernels that do not
support rdpmc.

Ensure setup_perf set the pc pointer value before checking whether we
need to the file descriptor open or not.

This combines the following master commits:

* Fix: perf counters build against kernel headers < 3.12
* Add generic fallback for perf counter read
* Fix: lttng context perf: missing stdbool.h header include
* Add perf context support for ARMv7
  (removed the ARM-specific lines when combining)
* Keep perf context FD open for other architectures

Since this is a bugfix, we explicitly do not enable building perf
support for other architectures, as this would introduce a feature in
the stable release cycle.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: perf counter context deadlock
Mathieu Desnoyers [Thu, 18 Aug 2016 20:07:30 +0000 (16:07 -0400)] 
Fix: perf counter context deadlock

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: many-events registration/unregistration speed
Mathieu Desnoyers [Mon, 8 Aug 2016 21:08:00 +0000 (17:08 -0400)] 
Fix: many-events registration/unregistration speed

Batch invocation of synchronize_rcu() when unregistering many events
from a session.

Also batch invocation of synchronize_rcu() when registering the same
events within many concurrent sessions (starting from the 2nd session).

Those slowdowns are noticeable with applications processes that have a
short life-time, e.g. shell scripts spawning multiple short-lived
processes take significantly longer to complete when LD_PRELOADing a UST
probe provider.

This slowdown only occurs when UST tracing sessions are created in the
session daemon.

tracepoint_probe_update_all() (currently unused) implements a similar
mechanism which has the downside of iterating on all events in all probe
libraries (not as efficient). Move synchronize_rcu() in
tracepoint_probe_update_all() outside of the iteration on all events to
free in this function, because it is only needed between the last
callsite update and the first memory reclaim, not between list removal
and reclaim.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: pre-fault TLS in ust-malloc instrumentation
Mathieu Desnoyers [Tue, 26 Jul 2016 20:54:55 +0000 (16:54 -0400)] 
Fix: pre-fault TLS in ust-malloc instrumentation

Faulting the TLS variable when accessed for the first time can trigger
deadlocks with internal libc lock when using the liblttng-ust-malloc
wrapper. Fix this by pre-faulting it in a library constructor, similarly
to the approach taken for all other TLS variables in lttng-ust.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: reset vtid cache before releasing urcu locks
Mathieu Desnoyers [Thu, 14 Jul 2016 21:47:08 +0000 (17:47 -0400)] 
Fix: reset vtid cache before releasing urcu locks

When tracing pthread mutex lock/unlock, we need to reset the vtid
context cache before unlocking the urcu lock, else we have vtid/vpid
discrepancies.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: cleanup local_apps.allowed flag on lib cleanup
Mathieu Desnoyers [Thu, 14 Jul 2016 16:21:13 +0000 (12:21 -0400)] 
Fix: cleanup local_apps.allowed flag on lib cleanup

In case of applications using fork/clone, which drop their privileges,
we need to clear the local_apps.allowed flag, otherwise those
application get an assertion when using the liblttng-ust-fork helper:

e.g.
varnishd: lttng-ust-comm.c:423: setup_local_apps: Assertion `local_apps.allowed == 0' failed.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: Correctly handle invalid agent port file
Alexandre Montplaisir [Wed, 13 Jul 2016 19:36:19 +0000 (15:36 -0400)] 
Fix: Correctly handle invalid agent port file

Handle the cases where the Java agent could find a port file
that is either empty, or contains text that cannot be parsed
to a number.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: remove invalid free
Mathieu Desnoyers [Tue, 12 Jul 2016 13:51:40 +0000 (09:51 -0400)] 
Fix: remove invalid free

On this error path, we should not free lttng_chan, because it is located
within an allocated shm memory area associated with the channel now. It
is invalid to free this pointer.

This is invoked on a channel creation error path.

Reported-by: Aravind HT <aravind.ht@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: perf counters: sign-extend pmc register
Mathieu Desnoyers [Wed, 6 Jul 2016 18:47:00 +0000 (14:47 -0400)] 
Fix: perf counters: sign-extend pmc register

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: ctf_enum_value() does not work with g++
Philippe Proulx [Tue, 28 Jun 2016 23:11:04 +0000 (19:11 -0400)] 
Fix: ctf_enum_value() does not work with g++

g++ does not support non-trivial designated initializers like
C99 does, thus the fields must be initialized in order
in ctf_enum_value().

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: allow non-LGPL modules to use tracepoints
Mathieu Desnoyers [Wed, 15 Jun 2016 20:34:09 +0000 (16:34 -0400)] 
Fix: allow non-LGPL modules to use tracepoints

Non-LGPL modules that use tracepoint instrumentation, but have no
compile unit defining either TRACEPOINT_DEFINE or
TRACEPOINT_CREATE_PROBES fail to build due to undefined reference to
`tracepoint_dlopen_ptr'.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoVersion 2.8.1 v2.8.1
Mathieu Desnoyers [Wed, 15 Jun 2016 15:31:52 +0000 (11:31 -0400)] 
Version 2.8.1

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoComment the locking mechanisms in ContextInfoManager
Alexandre Montplaisir [Thu, 2 Jun 2016 09:26:54 +0000 (05:26 -0400)] 
Comment the locking mechanisms in ContextInfoManager

Coverity didn't like our non-locking of the get() method. The
lock is actually only needed for the registration/unregistration
of retrievers, the get() can access the ConcurrentHashMap
directly.

Add a few comments to help explain this.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: Null-check return value of log4j.Category.getAllAppenders()
Alexandre Montplaisir [Thu, 2 Jun 2016 09:22:13 +0000 (05:22 -0400)] 
Fix: Null-check return value of log4j.Category.getAllAppenders()

Coverity points out this can be null, null-check it to be safe.

If it in indeed null, we must still continue on to verify the
parent loggers.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoAdd liblttng-ust-agent.jar to the .gitignore
Alexandre Montplaisir [Thu, 2 Jun 2016 09:15:47 +0000 (05:15 -0400)] 
Add liblttng-ust-agent.jar to the .gitignore

This is a compatibility symlink that is now installed by
lttng-ust-agent-all.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: Specify encoding when reading agent port file
Alexandre Montplaisir [Thu, 2 Jun 2016 09:12:44 +0000 (05:12 -0400)] 
Fix: Specify encoding when reading agent port file

FileReader uses the default platform encoding. InputStreamReader
on the other hand allows supplying an encoding, which is always
safer to do.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: Include child loggers in the output of "lttng list"
Alexandre Montplaisir [Thu, 2 Jun 2016 07:29:48 +0000 (03:29 -0400)] 
Fix: Include child loggers in the output of "lttng list"

The case where a parent logger has an handler attached but the
tracepoint comes from a child logger is not correctly handled
by the "lttng list -j/-l" command.

For example, if the logger "org.myapp" has a LTTng handler
attached, its child logger "org.myapp.mycomponent" would be
absent from the lttng list output even if it exists.

When checking for events to list, search through the parent
tree of each logger to find a potential LTTng handler.

This should also fix the problem of "lttng list" always
returning empty when the deprecated, but still supported,
LTTngAgent API was used, since that one attaches only one
handler to the root logger.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: Handle both agent config files pointing to same port
Alexandre Montplaisir [Thu, 2 Jun 2016 07:05:31 +0000 (03:05 -0400)] 
Fix: Handle both agent config files pointing to same port

The expected locations for the user and root agent sessiond
configuration files are ~/.lttng/agent.port and
/var/run/lttng/agent.port, respectively. These files indicate
which port an agent should connect to to reach its respective
sessiond.

If by some bad luck both files indicate the same port, then
both Java TCP clients would end up connecting to the same
sessiond, resulting in weird results, like "lttng list" listing
all events twice.

Make sure the target ports are different, and avoid duplicate
connections in case there are not.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoSuppress static method warning
Alexandre Montplaisir [Thu, 2 Jun 2016 03:03:07 +0000 (23:03 -0400)] 
Suppress static method warning

The LTTngAgent#dispose method is static on purpose (see commit
9355f049), and will remain so as long as this agent will be
supported, so we can suppress the compiler warning telling
us the method can be made static.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoAdd more logging to the LttngTcpSessiondClient
Alexandre Montplaisir [Thu, 2 Jun 2016 01:15:31 +0000 (21:15 -0400)] 
Add more logging to the LttngTcpSessiondClient

There can be up to 4 TCP clients running at the same time
(for all combinations of user/root and jul/log4j), the
logging should differentiate between them.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoUse config.h to detect sched_getcpu support
Michael Jeanson [Mon, 30 May 2016 20:31:33 +0000 (16:31 -0400)] 
Use config.h to detect sched_getcpu support

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: use limits.h in ust-elf test
Michael Jeanson [Mon, 30 May 2016 20:31:32 +0000 (16:31 -0400)] 
Fix: use limits.h in ust-elf test

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: strerror_r behavior is glibc specific
Michael Jeanson [Mon, 30 May 2016 20:31:31 +0000 (16:31 -0400)] 
Fix: strerror_r behavior is glibc specific

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoAdd support for musl libc to ust-dlfcn.h
Michael Jeanson [Mon, 30 May 2016 20:31:30 +0000 (16:31 -0400)] 
Add support for musl libc to ust-dlfcn.h

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: don't generate 0-len array in tracepoint probes
Mathieu Desnoyers [Mon, 30 May 2016 16:47:50 +0000 (18:47 +0200)] 
Fix: don't generate 0-len array in tracepoint probes

It is forbidden by C99, and gcc/g++ in pedantic mode generates errors
for e.g. field-less events.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: log4j example: set logger level to prevent unexpected level inheritance
Jonathan Rajotte [Thu, 26 May 2016 22:05:12 +0000 (18:05 -0400)] 
Fix: log4j example: set logger level to prevent unexpected level inheritance

BSF or other jars can ship with log4j.properties file embedded. This
causes problem when launching application with a general class path (e.g
/usr/share/java/*) since log4j will look for a property file in all
loaded jars. If any contains directive for the root logger it will
affect any logger with no level who are directly under the root logger.
This could result in an unexpected behaviour (e.g no events triggered
etc.).

Link: https://issues.apache.org/jira/browse/BSF-24
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: initialize RCU callbacks with mixed LGPL/non-LGPL objects
Mathieu Desnoyers [Wed, 25 May 2016 21:19:35 +0000 (17:19 -0400)] 
Fix: initialize RCU callbacks with mixed LGPL/non-LGPL objects

Linking both _LGPL_SOURCE and non-_LGPL_SOURCE objects into the same
module may result in having the RCU callbacks left to NULL, which
prevents tracing for tracepoints and/or probes which sit in the non-LGPL
compile unit.

This happens if the contructor of the LGPL compile unit is executed
first, thus incrementing the __tracepoint_registered counter, which will
prevent later execution of that same constructor in the non-LGPL compile
unit to initialize the RCU callbacks in __tracepoint__init_urcu_sym().

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: incorrect structure layout with mixed LGPL/non-LGPL objects
Mathieu Desnoyers [Wed, 25 May 2016 21:17:41 +0000 (17:17 -0400)] 
Fix: incorrect structure layout with mixed LGPL/non-LGPL objects

Linking both _LGPL_SOURCE and non-_LGPL_SOURCE objects into the same
module may result in corruption. If the tracepoint_dlopen object used is
the one declared by a LGPL compile unit, a non-LGPL compile unit may try
to initialize fields beyond the end of the structure.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: don't call __builtin_return_address(0) on 32-bit powerpc
Mathieu Desnoyers [Tue, 24 May 2016 22:58:14 +0000 (18:58 -0400)] 
Fix: don't call __builtin_return_address(0) on 32-bit powerpc

Invoking __builtin_return_address(0) corrupts the stack, as previously
noticed for the "ip" context. Disable its use on 32-bit powerpc
everywhere else in the lttng-ust code base.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: tracepoint header: declare tracepoint_dlopen_ptr
Mathieu Desnoyers [Mon, 23 May 2016 16:06:33 +0000 (12:06 -0400)] 
Fix: tracepoint header: declare tracepoint_dlopen_ptr

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: update debug message about weak-hidden symbols
Mathieu Desnoyers [Mon, 23 May 2016 15:37:07 +0000 (11:37 -0400)] 
Fix: update debug message about weak-hidden symbols

We actually deal OK with compilers that treats weak-hidden symbols as
different addresses between compile units part of the same module.
Simply report this without statement on whether or not the compiler
producing this code is broken.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: tracepoint-rcu header: use tracepoint_dlopen_ptr
Mathieu Desnoyers [Mon, 23 May 2016 15:05:21 +0000 (11:05 -0400)] 
Fix: tracepoint-rcu header: use tracepoint_dlopen_ptr

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: test: relax requirement on weak-hidden symbol address
Mathieu Desnoyers [Mon, 23 May 2016 01:29:58 +0000 (21:29 -0400)] 
Fix: test: relax requirement on weak-hidden symbol address

Now that tracepoint.h works around gcc issues by adding a pointer
indirection, we can relax the requirement on weak-hidden symbol
addresses.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: work-around gcc optimisation oddness on 32-bit powerpc
Mathieu Desnoyers [Mon, 23 May 2016 00:07:48 +0000 (20:07 -0400)] 
Fix: work-around gcc optimisation oddness on 32-bit powerpc

Deal with gcc O1 optimisation issues with weak hidden symbols. gcc 4.8
and prior does not have the same behavior for symbol scoping on 32-bit
powerpc depending on the object size: symbols for objects of 8 bytes or
less have the same address throughout a module, whereas they have
different addresses between compile units for objects larger than 8
bytes. Add this pointer indirection to ensure that the symbol scoping
match that of the other weak hidden symbols found in tracepoint.h.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: test weak-hidden symbols
Mathieu Desnoyers [Sun, 22 May 2016 15:26:00 +0000 (11:26 -0400)] 
Fix: test weak-hidden symbols

On many architectures (arm32, arm64, powerpc64) gcc chooses to assign
different addresses to weak-hidden symbols from different compile units
within the same module.

This is unfortunate, but still OK with respect to tracepoints.

The real issue is on 32-bit powerpc, where gcc (in O1 or more) assigns
different addresses only for objects larger than 8 bytes, but same
addresses for objects of 8 bytes or less (int and pointers).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoVersion 2.8.0 v2.8.0
Mathieu Desnoyers [Fri, 20 May 2016 20:13:00 +0000 (16:13 -0400)] 
Version 2.8.0

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoPrint DBG() message about compiler weak hidden symbol behavior
Mathieu Desnoyers [Fri, 20 May 2016 19:23:06 +0000 (15:23 -0400)] 
Print DBG() message about compiler weak hidden symbol behavior

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agotest: add test for gcc issue with weak hidden symbol on powerpc
Mathieu Desnoyers [Fri, 20 May 2016 17:02:47 +0000 (13:02 -0400)] 
test: add test for gcc issue with weak hidden symbol on powerpc

On Ubuntu 32-bit powerpc, gcc 4.4, 4.6, 4.8, gcc -O1 (and O2) causes
weak hidden symbols to have different addresses within the same module.
It seems to be fixed in gcc 4.9 on powerpc.

This issue causes some tracepoints to be silently hidden from LTTng.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoRestrict Java context retriever names to a set of valid characters
Alexandre Montplaisir [Thu, 19 May 2016 21:55:02 +0000 (17:55 -0400)] 
Restrict Java context retriever names to a set of valid characters

Since the context/retriever names end up as-is as part of the
metadata, only alphanumerical characters, periods "." and
underscores "_" should be accepted. The names must also not
start with a number.

Refuse registration of retriever names that do not respect these
conditions, so that the problem is reported right away to the
application.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: Correctly compute Java agent list loggers response size
Alexandre Montplaisir [Thu, 19 May 2016 19:59:50 +0000 (15:59 -0400)] 
Fix: Correctly compute Java agent list loggers response size

The code was assuming that (number of characters == number of bytes),
which is not always the case!

The notions of number of bytes and data sizes only make sense when
the strings are encoded into byte arrays. The response's getBytes()
method should the only one handling these concepts.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoAdd support for aarch64_be
Mathieu Desnoyers [Thu, 19 May 2016 20:10:26 +0000 (16:10 -0400)] 
Add support for aarch64_be

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: Fix synchronization of LTTngAgent#dispose
Alexandre Montplaisir [Thu, 19 May 2016 19:10:04 +0000 (15:10 -0400)] 
Fix: Fix synchronization of LTTngAgent#dispose

Commit 9355f049 changed the dispose() back to non-static. However,
"static synchronized" and "synchronized" are not the same thing!
The latter synchronizes on the instance, but the former synchronizes
on the class object.

In this case we need to synchronize on the class object manually.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: Verify number of bytes contained in sessiond agent commands
Alexandre Montplaisir [Thu, 19 May 2016 18:54:59 +0000 (14:54 -0400)] 
Fix: Verify number of bytes contained in sessiond agent commands

The command header indicates the number of bytes in the payload.
Make sure those bytes were really present on the socket, and throw
an error if they were not.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: Avoid potential null dereference with log4j loggers
Alexandre Montplaisir [Thu, 19 May 2016 18:49:06 +0000 (14:49 -0400)] 
Fix: Avoid potential null dereference with log4j loggers

Coverity warns that the return of LogManager.getCurrentLoggers()
can contain null elements. Add an explicit null check to skip those.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoSpecify UTF-8 encoding for all Java agent commands
Alexandre Montplaisir [Thu, 19 May 2016 18:31:20 +0000 (14:31 -0400)] 
Specify UTF-8 encoding for all Java agent commands

Context info was already set to UTF-8, but agent enabled/disabled
and list-loggers commands should also specify the UTF-8 encoding.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: merge tap tests stdout and stderr
Michael Jeanson [Wed, 18 May 2016 19:18:05 +0000 (15:18 -0400)] 
Fix: merge tap tests stdout and stderr

This makes the output and error statement ordered in the log
file and ensure that the first line is the tap test plan. Some tap
parser are confused if the test plan is not on the first line.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoDocumentation: ring buffer: SWITCH_FLUSH can be used when active
Mathieu Desnoyers [Wed, 18 May 2016 14:06:45 +0000 (10:06 -0400)] 
Documentation: ring buffer: SWITCH_FLUSH can be used when active

Snapshot mode tracing may use SWITCH_FLUSH while tracing is active.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: unchecked return value in trace_clock_read64_monotonic
Mathieu Desnoyers [Tue, 17 May 2016 16:05:10 +0000 (12:05 -0400)] 
Fix: unchecked return value in trace_clock_read64_monotonic

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: portability: no arith on void pointer
Mathieu Desnoyers [Mon, 16 May 2016 19:07:05 +0000 (15:07 -0400)] 
Fix: portability: no arith on void pointer

Reported by cppcheck.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: add "has_build_id" and "has_debug_link" fields to debuginfo events
Mathieu Desnoyers [Mon, 16 May 2016 14:40:32 +0000 (10:40 -0400)] 
Fix: add "has_build_id" and "has_debug_link" fields to debuginfo events

This allows trace analyzers to know whether they should expect the build
id or debug link events following the bin_info event.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: initialize build id and debug link flags to 0
Mathieu Desnoyers [Mon, 16 May 2016 18:00:16 +0000 (14:00 -0400)] 
Fix: initialize build id and debug link flags to 0

When trace_baddr is called for [vdso], those fields are used without
being initialized.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoTests: Add tap-driver.sh for automake < 1.12
Michael Jeanson [Mon, 16 May 2016 15:18:31 +0000 (11:18 -0400)] 
Tests: Add tap-driver.sh for automake < 1.12

Add the tap-driver.sh script in the aux directory to enable
systems with an automake version prior to 1.12 to bootstrap
the source tree from git.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoTests: Replace prove by autotools tap runner
Michael Jeanson [Thu, 12 May 2016 15:01:18 +0000 (11:01 -0400)] 
Tests: Replace prove by autotools tap runner

This patch removes the dependency on the prove perl script
to run the TAP test suite. It replaces it with the autotools
shell TAP driver that only requires a shell and awk.

Custom arguments can be passed to the test runner with
env variables as follow:

  env LOG_DRIVER_FLAGS='--comments --ignore-exit' \
      TESTS='foo.test baz.test' make -e check

This tap driver also creates a log file for each test that
can then be used by another system to build a test report.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agobootstrap: Standardize on autoreconf -vi
Mathieu Desnoyers [Thu, 12 May 2016 15:55:19 +0000 (11:55 -0400)] 
bootstrap: Standardize on autoreconf -vi

Don't overwrite already generated files.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoHarmonize bootstrap script across projects
Michael Jeanson [Thu, 12 May 2016 15:01:19 +0000 (11:01 -0400)] 
Harmonize bootstrap script across projects

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agolttng-ust(3): order environment variables
Philippe Proulx [Wed, 11 May 2016 15:56:09 +0000 (11:56 -0400)] 
lttng-ust(3): order environment variables

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agolttng-ust(3): fix syntax of env. variables section
Philippe Proulx [Wed, 11 May 2016 15:54:48 +0000 (11:54 -0400)] 
lttng-ust(3): fix syntax of env. variables section

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agolttng-ust(3): document $LTTNG_HOME
Philippe Proulx [Wed, 11 May 2016 15:49:48 +0000 (11:49 -0400)] 
lttng-ust(3): document $LTTNG_HOME

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: Java agent should use LTTNG_HOME
Mathieu Desnoyers [Wed, 11 May 2016 00:33:00 +0000 (20:33 -0400)] 
Fix: Java agent should use LTTNG_HOME

Both in UST C/C++ support and Python agent, LTTNG_HOME can be used to
override HOME for lttng-ust. Ensure the Java agent has the same
behavior.

Fixes: #881
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: examples make distcheck failure
Mathieu Desnoyers [Tue, 10 May 2016 22:10:43 +0000 (18:10 -0400)] 
Fix: examples make distcheck failure

"make distcheck" marks each source file on the srcdir in the extracted
dist tarball read-only. The examples copy from the srcdir into the
builddir before running the "make" examples, but this keeps the
read-only flag on the builddir directories, which fails the build
because the resulting objects cannot be created.

Fix this by ensuring the copied target directory for each example is
user-writeable.

Fixes: #903
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoCleanup: add static for internal symbols
Mathieu Desnoyers [Tue, 10 May 2016 18:49:14 +0000 (14:49 -0400)] 
Cleanup: add static for internal symbols

Those underscore-prefixed symbols are only used internally within the
tracepoint provider. Declare them as static symbols, thus removing
unneeded global symbols which are not meant to be used by applications.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoCleanup: Remove unused max() macros from ring_buffer_frontend.c
Mathieu Desnoyers [Tue, 10 May 2016 02:36:00 +0000 (22:36 -0400)] 
Cleanup: Remove unused max() macros from ring_buffer_frontend.c

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoUse min_t/max_t macros in lttng-ust-elf.c
Mathieu Desnoyers [Tue, 10 May 2016 02:34:25 +0000 (22:34 -0400)] 
Use min_t/max_t macros in lttng-ust-elf.c

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoTests: update ust-elf tests to reflect correct memsz computation
Antoine Busque [Mon, 9 May 2016 22:09:37 +0000 (18:09 -0400)] 
Tests: update ust-elf tests to reflect correct memsz computation

Signed-off-by: Antoine Busque <abusque@efficios.com>
8 years agoFix: erroneous computation of ELF in-memory size
Antoine Busque [Mon, 9 May 2016 21:54:44 +0000 (17:54 -0400)] 
Fix: erroneous computation of ELF in-memory size

The current algorithm for computation of ELF in-memory size computed
values using the `p_align` field from program headers to align loaded
segments, when in fact `p_align` is only used to describe the
relationship between a segment's offset in the ELF file and its
virtual address once loaded in memory (`p_vaddr`), not the alignment
between segments. (Refer to the ELF specification version 1.1 at pages
2-2 and 2-8 for more details.)

This implementation instead uses the `p_memsz` and `p_vaddr` fields to
compute the highest virtual address of the executable, and uses the
difference from its base address as the in-memory size.

Signed-off-by: Antoine Busque <abusque@efficios.com>
8 years agoMake code and man pages share the same default values
Philippe Proulx [Wed, 4 May 2016 20:59:41 +0000 (16:59 -0400)] 
Make code and man pages share the same default values

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: remove NULL check of nonnull parameter in dlclose
Antoine Busque [Mon, 9 May 2016 20:33:29 +0000 (16:33 -0400)] 
Fix: remove NULL check of nonnull parameter in dlclose

The `handle` parameter of `dlclose`, as defined in
`include/lttng/ust-dlfcn.h` is marked `__nonnull`. GCC starting with
version 6.1 emits warnings for comparisons of nonnull arguments
against NULL by default (see -Wnonnull-compare).

Therefore, this removes a superfluous NULL check on `handle`, for
which GCC emitted a warning.

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: endianness of integers received by filter
Mathieu Desnoyers [Tue, 26 Apr 2016 22:39:38 +0000 (18:39 -0400)] 
Fix: endianness of integers received by filter

We need to byteswap integers passed to the filter when they are tagged
as being in an endianness which differs from the architecture
endianness, so the integer comparisons make sense in terms of value
rather than raw bytes for those fields.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoVersion 2.8.0-rc2 v2.8.0-rc2
Mathieu Desnoyers [Tue, 26 Apr 2016 20:24:39 +0000 (16:24 -0400)] 
Version 2.8.0-rc2

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoDoc: Update README.md
Michael Jeanson [Mon, 25 Apr 2016 19:08:08 +0000 (15:08 -0400)] 
Doc: Update README.md

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: jul and log4j agents makefile missing line and indentation
Michael Jeanson [Mon, 25 Apr 2016 18:46:20 +0000 (14:46 -0400)] 
Fix: jul and log4j agents makefile missing line and indentation

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: re-introduce exported symbols
Mathieu Desnoyers [Mon, 25 Apr 2016 17:12:51 +0000 (13:12 -0400)] 
Fix: re-introduce exported symbols

Keep those exported symbols for backward shared object compatibility.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoDoc: update manpages for soinfo/sopath name change
Antoine Busque [Wed, 20 Apr 2016 21:05:09 +0000 (17:05 -0400)] 
Doc: update manpages for soinfo/sopath name change

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoRename statedump and dl events and fields
Antoine Busque [Wed, 20 Apr 2016 17:09:07 +0000 (13:09 -0400)] 
Rename statedump and dl events and fields

The current names of the `lttng_ust_statedump:soinfo` event, as well
as its field `sopath` both refer exclusively to shared objects (so),
although the event applies to any executables, including
position-independent executables (PIE), as well as shared objects.

Thus, this patch changes the name of the event to `bin_info` and the
field to `path`, to avoid any confusion.

For consistency, the `sopath` field in the `lttng_ust_dl:dlopen` event
is also renamed to `path`, although dlopen only applies to shared
objects.

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoTests: list ust-elf test data explicitly in EXTRA_DIST
Antoine Busque [Fri, 15 Apr 2016 21:37:43 +0000 (17:37 -0400)] 
Tests: list ust-elf test data explicitly in EXTRA_DIST

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoTests: add tests for lttng_ust_elf_is_pic
Antoine Busque [Fri, 15 Apr 2016 17:18:04 +0000 (13:18 -0400)] 
Tests: add tests for lttng_ust_elf_is_pic

This adds tests for the lttng_ust_elf_is_pic function used to tell
whether an executable is position independent code or not. Three
sample executables are used, one non-PIC executable, one PIE, and a
PIC shared object.

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoAdd is_pic field to statedump soinfo event
Antoine Busque [Wed, 13 Apr 2016 21:31:57 +0000 (17:31 -0400)] 
Add is_pic field to statedump soinfo event

This field indicates whether the executable or library is position
independent code (PIC). The field is not added to the similar dlopen
event from liblttng-ust-dl because in that case all dlopened libraries
are necessarily PIC.

This allows a posteriori analyses to be performed without having to
read the executable file to know whether adresses are relative to the
base address or absolute.

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: add common jar to lttng-ust-agent-all dependencies
Mathieu Desnoyers [Tue, 12 Apr 2016 02:24:39 +0000 (22:24 -0400)] 
Fix: add common jar to lttng-ust-agent-all dependencies

Ensures that applications still find the LTTngAgent class even if none
of JUL nor log4j agents are present.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: add version to lttng-ust-agent-all jar file
Mathieu Desnoyers [Tue, 12 Apr 2016 02:24:25 +0000 (22:24 -0400)] 
Fix: add version to lttng-ust-agent-all jar file

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: rename liblttng-ust-agent to lttng-ust-agent-all
Mathieu Desnoyers [Tue, 12 Apr 2016 00:32:55 +0000 (20:32 -0400)] 
Fix: rename liblttng-ust-agent to lttng-ust-agent-all

Rename liblttng-ust-agent to lttng-ust-agent-all to respect the new
jar file naming scheme, but keep a symbolic link from liblttng-ust-agent
to lttng-ust-agent-all to keep backwards compatibility.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: re-add liblttng-ust-agent.jar
Mathieu Desnoyers [Mon, 11 Apr 2016 23:53:22 +0000 (19:53 -0400)] 
Fix: re-add liblttng-ust-agent.jar

Re-add a jar file that imports all other LTTng java agents (JUL and
log4j) if they are available on the system.

This provides backwards compatibility with Java applications that have
CLASSPATH defined following UST 2.7 documentation.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: lttng java agent: dispose is non-static
Mathieu Desnoyers [Mon, 11 Apr 2016 22:57:42 +0000 (18:57 -0400)] 
Fix: lttng java agent: dispose is non-static

The UST 2.7 java agent LTTngAgent class has a non-static dispose method.
This class is kept in 2.8 for backwards compatibility purposes. Keep
this API unchanged.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agodoc/man: lttng-ust(3): add tracing control to example
Philippe Proulx [Thu, 7 Apr 2016 01:29:22 +0000 (21:29 -0400)] 
doc/man: lttng-ust(3): add tracing control to example

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agodoc/man: lttng-ust(3): split example files in subsections
Philippe Proulx [Thu, 7 Apr 2016 01:23:41 +0000 (21:23 -0400)] 
doc/man: lttng-ust(3): split example files in subsections

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agodoc/man/common-copyrights: add missing THANKS section
Philippe Proulx [Thu, 7 Apr 2016 01:13:41 +0000 (21:13 -0400)] 
doc/man/common-copyrights: add missing THANKS section

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agodoc/man: lttng-ust(3): add missing ENVIRONMENT VARIABLES section
Philippe Proulx [Thu, 7 Apr 2016 01:10:27 +0000 (21:10 -0400)] 
doc/man: lttng-ust(3): add missing ENVIRONMENT VARIABLES section

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agodoc/man: do not use macros in the NAME section
Philippe Proulx [Thu, 7 Apr 2016 07:45:23 +0000 (03:45 -0400)] 
doc/man: do not use macros in the NAME section

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agodoc/man: remove duplicate copyrights section
Philippe Proulx [Thu, 7 Apr 2016 05:52:15 +0000 (01:52 -0400)] 
doc/man: remove duplicate copyrights section

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoREADME.md: bolden dependencies and update links
Philippe Proulx [Thu, 7 Apr 2016 00:27:41 +0000 (20:27 -0400)] 
README.md: bolden dependencies and update links

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoREADME.md: split required and optional dependencies
Philippe Proulx [Thu, 7 Apr 2016 00:26:50 +0000 (20:26 -0400)] 
README.md: split required and optional dependencies

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoConvert man pages to AsciiDoc
Philippe Proulx [Tue, 5 Apr 2016 14:50:34 +0000 (10:50 -0400)] 
Convert man pages to AsciiDoc

This patch adds a new "enable" option to the configure
script, --enable-man-pages (default) and --disable-man-pages.

When man pages are enabled, they are built and installed.

The man pages are built from their AsciiDoc sources in this way:

    AsciiDoc source -> asciidoc -> DocBook XML -> xmlto -> troff
                          ^                         ^
                       included                DocBook XSLs
                       AsciiDoc                     +
                        files                   custom XSLs

The built troff man pages should be distributed in a release
tarball. When building from a release tarball, the tools (asciidoc
and xmlto) are not strictly needed, unless a man page source is
modified/removed, in which case:

    if the tools existed at configure time:
        rebuild/update man page
    otherwise:
        show an error message which indicates why the target
        cannot be built because the tools are missing

When building from the Git repository, and when --enable-man-pages
is used, the tools are required at configure time.

The incentive for this change is to make the man pages easier to
write and maintain, AsciiDoc being far more easy to read and write
than pure troff, as well as enable rich HTML man page generation
from the intermediate DocBook XML file to publish man pages with
working internal/external links and style improvements on the
LTTng website. This also makes LTTng-UST man pages conform to the
LTTng-tools ones which use the same mechanism.

The following "redirection" man pages are also added:

  * do_tracepoint(3)
  * tracepoint(3)
  * tracepoint_enabled(3)

They all redirect to lttng-ust(3). They are always distributed,
but only installed when lttng-ust(3) is also installed (which is
when --enable-man-page exists at configure time).

See the new doc/man/README.md file for more details about the
new files and macros to use in the AsciiDoc man page source files.

This patch also contains various content fixes and updates of the
LTTng-UST man pages. Some new content is based on the online LTTng
documentation.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: remove dead code from filter interpreter
Mathieu Desnoyers [Tue, 5 Apr 2016 13:30:31 +0000 (09:30 -0400)] 
Fix: remove dead code from filter interpreter

This has been detected in the lttng-modules port of the filter
interpreter by Coverity. The intent of the code in UST is similar, and
we can find the same dead code, although Coverity may not see it as dead
code because it cannot prove that the string is not modified between the
two uses. Since we know it is not modified, remove the dead code.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: convey enum value signedness into metadata
Mathieu Desnoyers [Sun, 20 Mar 2016 18:11:29 +0000 (14:11 -0400)] 
Fix: convey enum value signedness into metadata

Currently, passing an enum range of:

  ctf_enum_range("blah", 0, UINT_MAX)

will print a range of 0 ... -1 in the generated CTF metadata, which does
not reflect signedness of the values.

Also, struct ustctl_enum_entry is missing a LTTNG_PACKED attribute,
which is against our protocol rules.

This change needs to be pushed in locked-step into lttng-tools and
lttng-ust, since it breaks the protocol between the two when UST uses
the new enumeration type (introduced in 2.8.0-rc1).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoVersion 2.8.0-rc1 v2.8.0-rc1
Mathieu Desnoyers [Fri, 18 Mar 2016 23:11:27 +0000 (19:11 -0400)] 
Version 2.8.0-rc1

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: remove assertions in lttng-ust-comm init
Mathieu Desnoyers [Wed, 16 Mar 2016 13:55:10 +0000 (09:55 -0400)] 
Fix: remove assertions in lttng-ust-comm init

Assertions in the lttng-ust-comm init function are slightly too harsh
for their own good. In situations involving incoherent seccomp profiles
(e.g. accepting futex, poll, nanosleep, clock_nanosleep, but not
restart_syscall), unexpected errno values can be returned by
sem_timedwait.

Print an error in those situations, but let the application proceed.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoAdd tracepoint_disable_destructors()
Mathieu Desnoyers [Thu, 10 Mar 2016 14:32:59 +0000 (09:32 -0500)] 
Add tracepoint_disable_destructors()

Calling this function from an instrumented program allows disabling
tracepoint destructors. This allows threads to continue calling
tracepoint code even after the tracepoint destructors have run. This is
needed for applications that exit without joining all their threads.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Jeffrey Chen <cpthk@live.com>
8 years agoDocumentation: fix manpage typo
Mathieu Desnoyers [Thu, 10 Mar 2016 20:21:00 +0000 (15:21 -0500)] 
Documentation: fix manpage typo

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