]> git.lttng.org Git - lttng-ust.git/log
lttng-ust.git
7 years agoVersion 2.9.2 v2.9.2
Mathieu Desnoyers [Thu, 30 Nov 2017 13:21:30 +0000 (14:21 +0100)] 
Version 2.9.2

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agoFix: specify SONAME in python-lttngust LoadLibrary
Michael Jeanson [Tue, 21 Nov 2017 16:11:15 +0000 (11:11 -0500)] 
Fix: specify SONAME in python-lttngust LoadLibrary

When loading the python agent library with ctypes in the python
bindings, specify the SONAME. This will make sure we load the proper
library in the event of a SONAME bump and the bindings will work without
having to install the "dev" package which in most distros contains the
non-versionned ".so".

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agoFix: ensure fd tracker is initialized when called from constructors
Mathieu Desnoyers [Sun, 12 Nov 2017 19:51:24 +0000 (14:51 -0500)] 
Fix: ensure fd tracker is initialized when called from constructors

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agoFix: fd of an elf object must be registered to the fd tracker
Jonathan Rajotte [Fri, 10 Nov 2017 16:06:41 +0000 (11:06 -0500)] 
Fix: fd of an elf object must be registered to the fd tracker

The open call take place inside ust, it must be tracked to prevent external
closing.

The bug can be hit during tracing of an application for which the probe
provider is loaded using LD_PRELOAD in combination with the fd utility
shared object. The application is responsible for closing all possible fd.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agoFix: liblttng-ust-fd.so: override fclose symbol
Mathieu Desnoyers [Tue, 7 Nov 2017 20:33:40 +0000 (15:33 -0500)] 
Fix: liblttng-ust-fd.so: override fclose symbol

fclose() invoked from application or libraries end up calling close()
from within the libc, which bypasses our file descriptor tracking.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agoFix: lttng-gen-tp: only replace file extension
Jonathan Rajotte [Tue, 19 Sep 2017 16:08:33 +0000 (12:08 -0400)] 
Fix: lttng-gen-tp: only replace file extension

Previous replace was done on the complete path. A path containing
.c or .o would result in a corrupted file path.

Reported-by: Gunnar Strand <Gunnar.Strand@ericsson.com>
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agoFix: move fsync after ftruncate
Mathieu Desnoyers [Wed, 23 Aug 2017 15:27:16 +0000 (08:27 -0700)] 
Fix: move fsync after ftruncate

Move fsync after ftruncate to ensure we sync up all metadata after the
entire initialization of the buffer.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agoFix: sync buffer file metadata on buffer allocation
Mathieu Desnoyers [Wed, 23 Aug 2017 15:17:48 +0000 (08:17 -0700)] 
Fix: sync buffer file metadata on buffer allocation

Synchronizing the file metadata on disk after zeroing the whole file (on
buffer allocation) will make the crash extraction feature (--shm-path
create option) more robust. It ensures the content of the file metadata
backing the buffers does not have to be updated while tracing into the
memory map. Therefore, the on-disk metadata will never be out of sync at
the point where a system crash occurs.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agolttng-ust(3): specify "If set" instead of "if set to 1" for some variables
Philippe Proulx [Fri, 28 Jul 2017 19:25:07 +0000 (15:25 -0400)] 
lttng-ust(3): specify "If set" instead of "if set to 1" for some variables

The actual library's behaviour is to check if the environment variable
is set, not only if it's set to the string `1`.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agoFix: Expand the shmobj size for the sequence number
Liguang Li [Thu, 22 Jun 2017 08:56:29 +0000 (16:56 +0800)] 
Fix: Expand the shmobj size for the sequence number

This patch fixes a bug which was introduced by:
1ff31389b ("Generate and export the sequence number")

Signed-off-by: Liguang Li <liguang.li@windriver.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agoVersion 2.9.1 v2.9.1
Mathieu Desnoyers [Mon, 12 Jun 2017 22:21:49 +0000 (18:21 -0400)] 
Version 2.9.1

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agoFix: lttng-ust-elf.c: define NT_GNU_BUILD_ID if not defined
Philippe Proulx [Sat, 29 Oct 2016 17:32:57 +0000 (13:32 -0400)] 
Fix: lttng-ust-elf.c: define NT_GNU_BUILD_ID if not defined

On uClibc, NT_GNU_BUILD_ID is not defined, so we define it
manually in this case.

This definition is the number given to the .note.gnu.build-id section
(of type SHT_NOTE) of a linked ELF object.

    The ELF note headers give name "GNU" and type 3 (NT_GNU_BUILD_ID)
for a build ID note, of which there can be only one in a linked object
[...]

See http://fedoraproject.org/wiki/RolandMcGrath/BuildID

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agoFix: Quote CMAKE variable assignment in Makefile
Michael Jeanson [Tue, 9 May 2017 20:55:44 +0000 (16:55 -0400)] 
Fix: Quote CMAKE variable assignment in Makefile

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agoFix: Typo in doc/examples/Makefile.am
Michael Jeanson [Tue, 9 May 2017 19:24:40 +0000 (15:24 -0400)] 
Fix: Typo in doc/examples/Makefile.am

$(CPPLAGS) -> $(CPPFLAGS)

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agoFix: Don't override user variables within the build system
Michael Jeanson [Tue, 9 May 2017 18:25:01 +0000 (14:25 -0400)] 
Fix: Don't override user variables within the build system

Instead use the appropriatly prefixed AM_* variables as to not interfere
when a user variable is passed to a make command. The proper use of flag
variables is documented at :

https://www.gnu.org/software/automake/manual/automake.html#Flag-Variables-Ordering

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agoFix: add missing getenv.h include to ustctl.c
Mathieu Desnoyers [Sun, 12 Mar 2017 02:18:27 +0000 (21:18 -0500)] 
Fix: add missing getenv.h include to ustctl.c

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agoFix: race between lttng-ust getenv() and application setenv()
Mathieu Desnoyers [Fri, 10 Mar 2017 23:08:25 +0000 (18:08 -0500)] 
Fix: race between lttng-ust getenv() and application setenv()

The LTTng-UST listener threads invoke getenv(), which can cause issues
if the application issues setenv() concurrently. This is a legitimate
use by the application because it may have a single thread and not be
aware that it runs with liblttng-ust.

Fix this by keeping our own environment variable table for the variables
we care about. Initialize this table within the lttng-ust library
constructor, when we don't race with the application.

As this thread shows:
https://sourceware.org/bugzilla/show_bug.cgi?id=5069#c10

getenv() does _not_ appear to be thread-safe if an application uses
setenv() or putenv().

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agodoc/man: add typical `$` and `#` prompts to command lines
Philippe Proulx [Wed, 15 Mar 2017 00:48:18 +0000 (20:48 -0400)] 
doc/man: add typical `$` and `#` prompts to command lines

It is more instinctive for the typical reader to immediately recognize
command lines when they start with the classic prompts.

On the online version of the man pages, those prompts are treated
specially to make them non-selectable. This makes it possible to copy
multiple command lines at once (without copying the prompts) and to
paste them to your shell.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agoFix: (un)install targets of Python agent
Francis Deslauriers [Thu, 2 Mar 2017 16:56:05 +0000 (11:56 -0500)] 
Fix: (un)install targets of Python agent

This Makefile was using Distutils' setup.py to install the Python agent
but was using the Autoconf's $pkgpythondir variable for the uninstall
process. The two folders can be different on some distributions which
made the uninstall attempting to delete a non-existant folder and
effectively not uninstalling.

We now run a phony installation of the bindings in a temporary directory
and use the tree structure of the install folder to infere the location
of the files on the system to delete them.

Also, we print a warning if the install directory is not included in the
PYTHONPATH variable.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agoFix: include config.h to resolve HAVE_DLMOPEN
Jonathan Rajotte [Tue, 21 Feb 2017 23:10:11 +0000 (18:10 -0500)] 
Fix: include config.h to resolve HAVE_DLMOPEN

Fixes commit 42330adcefcd1830dad89e2a960c93d8dd1da125

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agoValidate the presence of dlmopen at configure time
Jonathan Rajotte [Tue, 21 Feb 2017 21:00:27 +0000 (16:00 -0500)] 
Validate the presence of dlmopen at configure time

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 years agoFix: CMake examples integration
Michael Jeanson [Mon, 20 Feb 2017 21:48:56 +0000 (16:48 -0500)] 
Fix: CMake examples integration

Fix multiple issues with the CMake examples integration with our build
system.

Fixes #1089

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agodoc/examples/Makefile.am: define C and C++ compilers for CMake
Vicente Olivert Riera [Wed, 30 Nov 2016 16:52:51 +0000 (16:52 +0000)] 
doc/examples/Makefile.am: define C and C++ compilers for CMake

This prevents build failures when cross-compiling.

If we don't define the compiler, it will use the one from the host
machine. For instance "/usr/bin/c++", which is incorrect.

The failure looks like this:

.............................................................
[ 10%] Building CXX object CMakeFiles/tracepoint-provider.dir/tracepoint-provider.cpp.o
/usr/bin/c++   -Dtracepoint_provider_EXPORTS -I/br/output/build/lttng-libust-2.9.0/doc/examples/cmake-multiple-shared-libraries/. -isystem /br/output/build/lttng-libust-2.9.0/include  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC   -o CMakeFiles/tracepoint-provider.dir/tracepoint-provider.cpp.o -c /br/output/build/lttng-libust-2.9.0/doc/examples/cmake-multiple-shared-libraries/tracepoint-provider.cpp
In file included from /br/output/build/lttng-libust-2.9.0/include/lttng/tracepoint.h:29:0,
                 from /br/output/build/lttng-libust-2.9.0/doc/examples/cmake-multiple-shared-libraries/tracepoint-provider.h:32,
                 from /br/output/build/lttng-libust-2.9.0/doc/examples/cmake-multiple-shared-libraries/tracepoint-provider.cpp:26:
/br/output/build/lttng-libust-2.9.0/include/lttng/tracepoint-rcu.h:26:27: fatal error: urcu/compiler.h: No such file or directory
 #include <urcu/compiler.h>
                           ^
compilation terminated.
.............................................................

Acked-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoVersion 2.9.0 v2.9.0
Mathieu Desnoyers [Tue, 29 Nov 2016 22:16:26 +0000 (17:16 -0500)] 
Version 2.9.0

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agolttng-ust(3): document `lttng_ust_loaded` symbol
Philippe Proulx [Tue, 29 Nov 2016 17:10:57 +0000 (12:10 -0500)] 
lttng-ust(3): document `lttng_ust_loaded` symbol

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agolttng-ust(3): document `perf:thread:raw:rN:NAME` context
Philippe Proulx [Tue, 29 Nov 2016 17:04:22 +0000 (12:04 -0500)] 
lttng-ust(3): document `perf:thread:raw:rN:NAME` context

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agolttng-ust-dl(3): update documentation
Philippe Proulx [Tue, 29 Nov 2016 03:36:13 +0000 (22:36 -0500)] 
lttng-ust-dl(3): update documentation

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agolttng-ust(3): document liblttng-ust-fd
Philippe Proulx [Tue, 29 Nov 2016 03:16:34 +0000 (22:16 -0500)] 
lttng-ust(3): document liblttng-ust-fd

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agodoc/man: document the lttng_ust_lib events
Philippe Proulx [Tue, 29 Nov 2016 03:12:51 +0000 (22:12 -0500)] 
doc/man: document the lttng_ust_lib events

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agodoc/man: add full stop to descriptive table cells
Philippe Proulx [Tue, 29 Nov 2016 02:35:34 +0000 (21:35 -0500)] 
doc/man: add full stop to descriptive table cells

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agodoc/man: reorganize source for tables
Philippe Proulx [Tue, 29 Nov 2016 02:34:26 +0000 (21:34 -0500)] 
doc/man: reorganize source for tables

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agolttng-ust(3): sort ctf_*() macro parameter definitions
Philippe Proulx [Tue, 29 Nov 2016 02:28:58 +0000 (21:28 -0500)] 
lttng-ust(3): sort ctf_*() macro parameter definitions

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agolttng-ust(3): fix alignment and indentation
Philippe Proulx [Tue, 29 Nov 2016 02:27:19 +0000 (21:27 -0500)] 
lttng-ust(3): fix alignment and indentation

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agolttng-ust(3): document new ctf_*() array/sequence network/hex macros
Philippe Proulx [Tue, 29 Nov 2016 02:22:19 +0000 (21:22 -0500)] 
lttng-ust(3): document new ctf_*() array/sequence network/hex macros

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoPerformance: add missing "caa_unlikely" on fast-path
Mathieu Desnoyers [Mon, 21 Nov 2016 20:58:29 +0000 (15:58 -0500)] 
Performance: add missing "caa_unlikely" on fast-path

There is a missing branch prediction hint on the return value of
lib_ring_buffer_reserve().

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: loglevel and model_emf_uri build fix
Mathieu Desnoyers [Tue, 18 Oct 2016 22:43:04 +0000 (18:43 -0400)] 
Fix: loglevel and model_emf_uri build fix

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: loglevel and model_emf_uri with g++ compiled probes
Mathieu Desnoyers [Tue, 18 Oct 2016 21:56:42 +0000 (17:56 -0400)] 
Fix: loglevel and model_emf_uri with g++ compiled probes

Fix the loglevel and model_emf_uri features for probe providers compiled
with g++. They were previously effectless because of C++ symbol name
mangling. The weakref was refering to the non-mangled symbol, but C++
emits a mangled symbol for the static variable.

Fix this by emitting an extern "C" symbol with hidden visibility on C++.
With a C compiled, this simply turns a static variable into a variable
with hidden visibility.

Fixes: #1069
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: Out of tree build of liblttng-ust-java
Michael Jeanson [Fri, 14 Oct 2016 20:45:20 +0000 (16:45 -0400)] 
Fix: Out of tree build of liblttng-ust-java

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoVersion 2.9.0-rc1 v2.9.0-rc1
Mathieu Desnoyers [Fri, 7 Oct 2016 19:25:43 +0000 (15:25 -0400)] 
Version 2.9.0-rc1

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: cmake example with configure based oot build
Jonathan Rajotte [Tue, 4 Oct 2016 19:17:05 +0000 (15:17 -0400)] 
Fix: cmake example with configure based oot build

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: perform statedump before replying to sessiond
Mathieu Desnoyers [Mon, 3 Oct 2016 17:18:53 +0000 (13:18 -0400)] 
Fix: perform statedump before replying to sessiond

If a stop command immediately follows a start command, the consumer
daemon will stop event recording in the ring buffers shared memory
control structures before the sessiond sends further commands to the
application. Therefore, a stop-after-start may be performed concurrently
with the statedump, leading to have parts of the statedump being
missing. This case may always happen if an application exits during
statedump, but it is not expected to have incomplete statedump in the
stop-after-start use case.

The session daemon statedump regeneration tests expect that the
statedump is completed when the regeneration command returns. This also
requires that we perform the statedump in lttng-ust before replying to
the session daemon command.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agobuild: check for CXX_WORKS for cmake example
Jonathan Rajotte [Mon, 3 Oct 2016 15:15:21 +0000 (11:15 -0400)] 
build: check for CXX_WORKS for cmake example

Tracepoints and tracepoint provider compilation need a functional
c++ compiler (g++ > 4.7).

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoImplement liblttng-ust-fd
Mathieu Desnoyers [Mon, 12 Sep 2016 16:04:13 +0000 (12:04 -0400)] 
Implement liblttng-ust-fd

This library overrides close() and closeall() libc functions, and uses
lttng_ust_safe_close_fd() to check whether the application can
interact with the file descriptor or if it should be left to lttng-ust.

This takes care of bugs caused by applications doing bulk close() or
closefrom() of file descriptors soon after forking.

Fixes: #253
Fixes: #626
CC: Aravind HT <aravind.ht@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoIntroduce file descriptor tracker
Mathieu Desnoyers [Tue, 13 Sep 2016 20:17:40 +0000 (16:17 -0400)] 
Introduce file descriptor tracker

Introduce a tracker for file descriptors used by lttng-ust. It exposes
a new API in an internal header lttng_ust_safe_close_fd(), which is
meant to be used by a LD_PRELOADed library overriding close() and
closefrom() (BSD).

This takes care of bugs caused by applications doing bulk close() or
closefrom() of file descriptors soon after forking.

We need to hold the ust_lock() to protect the fd tracker lock against
fork. Since the fd tracker is needed across connect() (which allocates a
file descriptor), we need to hold the ust_lock across connect().

Fixes: #253
Fixes: #626
Suggested-by: Aravind HT <aravind.ht@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
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: build: pass configure flags to cmake example
Jonathan Rajotte [Mon, 3 Oct 2016 14:42:45 +0000 (10:42 -0400)] 
Fix: build: pass configure flags to cmake example

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoPerformance: implement lttng_inline_memcpy
Mathieu Desnoyers [Sun, 25 Sep 2016 16:31:11 +0000 (12:31 -0400)] 
Performance: implement lttng_inline_memcpy

Because all length parameters received for serializing data coming from
applications go through a callback, they are never constant, and it
hurts performance to perform a call to memcpy each time.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoPerformance: mark ring buffer do_copy callers always inline
Mathieu Desnoyers [Sun, 25 Sep 2016 14:50:22 +0000 (10:50 -0400)] 
Performance: mark ring buffer do_copy callers always inline

The underlying copy operation is more efficient if the size is a
constant, which only happens if this function is inlined in the caller.
Otherwise, we end up calling memcpy for each field.

Force inlining for performance reasons for:
  - lib_ring_buffer_write,
  - lib_ring_buffer_do_strcpy,
  - lib_ring_buffer_strcpy.

Note that in lttng-ust, the probe provider serialization functions need
to call the lttng_event_write() client callback, which will fallback to
the memcpy operation.

Inlining those functions helps for the event header code, which can
inline them.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoPerformance: cache the backend pages pointer in context
Mathieu Desnoyers [Mon, 19 Sep 2016 02:52:39 +0000 (22:52 -0400)] 
Performance: cache the backend pages pointer in context

Getting the backend pages pointer requires walking through the ring
buffer backend tables through multiple shmp operations. Cache the
current value so it can be re-used for all backend write operations
writing fields for the same event.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoAdd ctx_len field to ring buffer context
Mathieu Desnoyers [Sat, 24 Sep 2016 14:25:10 +0000 (10:25 -0400)] 
Add ctx_len field to ring buffer context

Allow extending the structure beyond its original size.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoring buffer: handle shmp errors
Mathieu Desnoyers [Mon, 19 Sep 2016 02:10:53 +0000 (22:10 -0400)] 
ring buffer: handle shmp errors

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoCleanup: libringbuffer: remove duplicate shmp() invocations in slow paths
Mathieu Desnoyers [Mon, 19 Sep 2016 01:45:32 +0000 (21:45 -0400)] 
Cleanup: libringbuffer: remove duplicate shmp() invocations in slow paths

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoPerformance: Only dereference shmp once
Mathieu Desnoyers [Mon, 19 Sep 2016 01:38:38 +0000 (21:38 -0400)] 
Performance: Only dereference shmp once

Dereferencing shared-memory pointers is expensive: many bound checks are
performed. Ensure the shmp is only dereferenced once in the commit
fast-path.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoPerformance: Mark channel and buffer event disabled check unlikely
Mathieu Desnoyers [Mon, 19 Sep 2016 01:31:02 +0000 (21:31 -0400)] 
Performance: Mark channel and buffer event disabled check unlikely

Channel and buffer are typically enabled when tracing, else the probes
would not be connected. Ensure the compiler optimizes for the right
usual case.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoPerformance: Relax atomicity constraints for crash handling
Mathieu Desnoyers [Sun, 18 Sep 2016 04:25:58 +0000 (00:25 -0400)] 
Performance: Relax atomicity constraints for crash handling

Use a store rather than a cmpxchg() for the update of the
sequential commit counter. This speeds up commit. The downside
is that short race windows between the if() check to see if the
counter is larger than the new value and the update could result
in the counter going backwards, in unlikely preemption or signal
delivery scenarios.

Accept that we may lose a few events in a crash dump for the
benefit of tracing speed.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: compat: -ust suffix sprintf error handling
Mathieu Desnoyers [Mon, 12 Sep 2016 22:58:50 +0000 (18:58 -0400)] 
Fix: compat: -ust suffix sprintf error handling

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoPerformance: disable event counting by default
Mathieu Desnoyers [Fri, 9 Sep 2016 20:54:20 +0000 (16:54 -0400)] 
Performance: disable event counting by default

Disable event counting in the ring buffer, which can count the number of
events produced per ring-buffer, as well as the number of events
overwritten in overwrite mode.

This feature is currently unused anyway: it is not saved in the ring
buffer header, nor made available to lttng-tools.

This saves 70 ns/event in lttng-ust on the ARM32 Cubietruck.

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 agoPerformance: remove rcu read lock from ring buffer get/put cpu
Mathieu Desnoyers [Sat, 16 Jul 2016 17:48:09 +0000 (13:48 -0400)] 
Performance: remove rcu read lock from ring buffer get/put cpu

The tracepoints are already protected by a RCU-bp read-side lock, so
trying to take this nested lock is useless. We gain 132 ns/event on the
ARM32 Cubietruck by removing this nested rcu read-side lock.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoPerformance: define _LGPL_SOURCE in LGPL c files
Mathieu Desnoyers [Sat, 16 Jul 2016 16:18:32 +0000 (12:18 -0400)] 
Performance: define _LGPL_SOURCE in LGPL c files

Brings a performance gain of 55 ns/event on the ARM32 Cubietruck by
adding _LGPL_SOURCE to ring buffer clients.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoPerformance: split check deliver fast/slow paths
Mathieu Desnoyers [Sat, 16 Jul 2016 03:22:08 +0000 (23:22 -0400)] 
Performance: split check deliver fast/slow paths

On ARMv7l (Cubietruck), the compiler generates a function call for each
lib_ring_buffer_check_deliver, even though it typically only do an
unlikely check. Split it into an inline fast path, and a function call
for the slow path. This brings a performance gain of about 500ns/event
on the Cubietruck.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: perf counters build against kernel headers < 3.12
Mathieu Desnoyers [Thu, 18 Aug 2016 18:21:46 +0000 (14:21 -0400)] 
Fix: perf counters build against kernel headers < 3.12

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.

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

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: ust-ctl: use LTTNG_UST_HAVE_PERF_EVENT to report perf counter availability
Mathieu Desnoyers [Tue, 19 Jul 2016 20:52:21 +0000 (16:52 -0400)] 
Fix: ust-ctl: use LTTNG_UST_HAVE_PERF_EVENT to report perf counter availability

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: memory corruption in compat.h
Mathieu Desnoyers [Wed, 13 Jul 2016 19:13:28 +0000 (15:13 -0400)] 
Fix: memory corruption in compat.h

Found by Coverity:

CID 1357641 (#1 of 1): Out-of-bounds write (OVERRUN)2. sprintf_overrun:
sprintf will overrun its first argument &name[len] which can accommodate
4 bytes. The number of bytes written may be 5 bytes, including the
terminating null.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoIntroduce lttng_ust_loaded weak symbol
Mathieu Desnoyers [Tue, 12 Jul 2016 20:28:45 +0000 (16:28 -0400)] 
Introduce lttng_ust_loaded weak symbol

This variable can be tested by applications to check whether lttng-ust
is loaded. They simply have to define their own "lttng_ust_loaded" weak
symbol, and test it. It is set to 1 by the library constructor.

The main use-case is to allow applications to detect that they should
not try to close file descriptors that do not belong to them (e.g.  BSD
closefrom). This is a common pattern with applications invoking
daemon(3).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoRevert "Introduce LTTNG_UST_LOADED environment variable"
Mathieu Desnoyers [Tue, 12 Jul 2016 20:22:36 +0000 (16:22 -0400)] 
Revert "Introduce LTTNG_UST_LOADED environment variable"

This reverts commit 2315088b93f925c5cccee865ccb8f6bc542e52dc.

We will introduce a solution based on a weak symbol instead, which does
not "leak" to children's exec.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoIntroduce LTTNG_UST_LOADED environment variable
Mathieu Desnoyers [Tue, 12 Jul 2016 19:11:06 +0000 (15:11 -0400)] 
Introduce LTTNG_UST_LOADED environment variable

Set internally by liblttng-ust's constructor. Can be used by
applications to detect if lttng-ust is loaded, even if liblttng-ust is
not directly linked by the application.

The main use-case is to allow applications to detect that they should
not try to close file descriptors that do not belong to them (e.g.
BSD closefrom). This is a common pattern with applications invoking
daemon(3).

Note that this environment variable is passed to children of a traced
process, and through exec calls. Therefore, an application might think
that lttng-ust is loaded even though it's not loaded in its own address
space if it was loaded by one of its parent processes.

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 agoUse AC_PROG_MKDIR_P (generic mkdir -p)
Philippe Proulx [Fri, 8 Jul 2016 17:20:52 +0000 (13:20 -0400)] 
Use AC_PROG_MKDIR_P (generic mkdir -p)

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoSplit CMake example build steps on different lines
Philippe Proulx [Fri, 8 Jul 2016 17:18:37 +0000 (13:18 -0400)] 
Split CMake example build steps on different lines

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: CMake example: specify source/built includes/libs
Philippe Proulx [Fri, 8 Jul 2016 17:13:32 +0000 (13:13 -0400)] 
Fix: CMake example: specify source/built includes/libs

Fixes: #1042
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoconfigure: allow building perf support across all architectures
Mathieu Desnoyers [Wed, 6 Jul 2016 20:19:57 +0000 (16:19 -0400)] 
configure: allow building perf support across all architectures

Now that we use a read fallback for reading pmu counters, allow building
perf support across all architectures.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: use-after-free in statedump lib iter_end
Mathieu Desnoyers [Wed, 6 Jul 2016 19:16:30 +0000 (15:16 -0400)] 
Fix: use-after-free in statedump lib iter_end

Found by Coverity:
** CID 1357361:  Memory - corruptions  (USE_AFTER_FREE)
/liblttng-ust/lttng-ust-statedump.c: 440 in iter_end()

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoAdd generic fallback for perf counter read
Mathieu Desnoyers [Wed, 6 Jul 2016 19:11:57 +0000 (15:11 -0400)] 
Add generic fallback for perf counter read

On x86, test the cap_user_rdpmc flag and fall-back on a system call if
unset.

On all other architectures, use the system call fallback.

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 agodoc: Add flags for JUL and python agent compiling
Geneviève Bastien [Wed, 6 Jul 2016 15:36:35 +0000 (11:36 -0400)] 
doc: Add flags for JUL and python agent compiling

The compilation flag documentation is added to the README.md and
configure.ac files for easier access to them.

Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agotests/hello.cxx: add ctf_enum_auto() entries
Philippe Proulx [Mon, 4 Jul 2016 21:47:30 +0000 (17:47 -0400)] 
tests/hello.cxx: add ctf_enum_auto() entries

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoAdd ctf_enum_auto() for autoincrementing enumeration values
Philippe Proulx [Mon, 4 Jul 2016 21:04:42 +0000 (17:04 -0400)] 
Add ctf_enum_auto() for autoincrementing enumeration values

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoAdd missing ust_lib.c and ust_lib.h
Mathieu Desnoyers [Tue, 5 Jul 2016 20:09:32 +0000 (16:09 -0400)] 
Add missing ust_lib.c and ust_lib.h

The new lib load/unload events are implemented in those two files.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agodl instrumentation: add dlmopen event, trace dlopen flags
Mathieu Desnoyers [Mon, 4 Jul 2016 21:06:04 +0000 (17:06 -0400)] 
dl instrumentation: add dlmopen event, trace dlopen flags

Add missing dlmopen(3) instrumentation, and add the "flags" field to
dlopen instrumentation.

Link: http://man7.org/linux/man-pages/man3/dlopen.3.html
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoAdd library load/unload tracking events
Mathieu Desnoyers [Mon, 4 Jul 2016 19:39:01 +0000 (15:39 -0400)] 
Add library load/unload tracking events

Track library load and unload, with the following new events:

lttng_ust_lib:load
lttng_ust_lib:build_id
lttng_ust_lib:debug_link
lttng_ust_lib:unload

This takes care of correctly tracing the mapping of direct dependencies
of dlopen'd libraries, which was not appropriately done by tracing just
dlopen events.

Fixes: #1035
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoCommunication protocol: use fixed-size integer rather than enum
Mathieu Desnoyers [Tue, 5 Jul 2016 17:10:11 +0000 (13:10 -0400)] 
Communication protocol: use fixed-size integer rather than enum

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoAdd ustctl command to regenerate the statedump
Julien Desfossez [Thu, 30 Jun 2016 15:43:50 +0000 (11:43 -0400)] 
Add ustctl command to regenerate the statedump

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoImplement statedump command in UST
Mathieu Desnoyers [Thu, 14 Apr 2016 19:13:05 +0000 (15:13 -0400)] 
Implement statedump command in UST

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agotests/hello.cxx: add enumeration field
Philippe Proulx [Tue, 28 Jun 2016 23:40:36 +0000 (19:40 -0400)] 
tests/hello.cxx: add enumeration field

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
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: lttng context perf: missing stdbool.h header include
Mathieu Desnoyers [Tue, 28 Jun 2016 03:06:25 +0000 (23:06 -0400)] 
Fix: lttng context perf: missing stdbool.h header include

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoAdd perf context support for ARMv7
Julien Desfossez [Mon, 27 Jun 2016 21:40:01 +0000 (17:40 -0400)] 
Add perf context support for ARMv7

Allow to add perf context to UST traces. ARMv7 does not have a reliable
way to read perf PMU counters entirely from user-space like we do on
x86, so this approach requires a system call every time a counter needs
to be read which has a significant performance impact.

ARMv7 does not have way to read PMU from userspace because it requires
write access to the debug coprocessor to select which PMU counter to
read which defeats user-space/kernel protection. For that reason, the
bits required to allow user-space access to those registers are not
enabled in the kernel and Perf does not expose any information in the
shared mmap page, so we do not know what is the counter index. Also, for
ARMv7 we cannot set the exclude_kernel flag, so the counter stays active
even when the process is executing in kernel context (system calls
mainly).

This generic approach might work on other architecture, but it has not
yet been tested so it is not enabled in the code.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoKeep perf context FD open for other architectures
Julien Desfossez [Mon, 27 Jun 2016 21:40:00 +0000 (17:40 -0400)] 
Keep perf context FD open for other architectures

Instead of closing the perf context after the page has been mapped, keep
it open so it can be used with the read() system call if the
architecture does not support direct access from user-space.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoDoc: cmake example: fix coding style
Mathieu Desnoyers [Mon, 27 Jun 2016 16:38:35 +0000 (12:38 -0400)] 
Doc: cmake example: fix coding style

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoDoc: ship cmake example with 'make distcheck'
Sebastien Boisvert [Fri, 17 Jun 2016 03:32:05 +0000 (23:32 -0400)] 
Doc: ship cmake example with 'make distcheck'

The file Makefile.am in the examples directory was modified. The
modifications were done to include the new cmake example. The new cmake
example is built when make is invoke in the root directory. Further,
this new example also ships in the tarball when the latter is created
("make distcheck").

Acked-by: Philippe Proulx <eeppeliteloop@gmail.com>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Sebastien Boisvert <sboisvert@gydle.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoDoc: add CMake example
Sebastien Boisvert [Thu, 16 Jun 2016 15:41:11 +0000 (11:41 -0400)] 
Doc: add CMake example

In doc/examples/cmake-multiple-shared-libraries/, a new example lives.
This example requires a C++ compiler (HAVE_CXX) and it requires also a
cmake executable (HAVE_CMAKE). This example relies on the cmake module
called FindLTTngUST, which was kindly provided by Philippe Proulx.

The alignment of a small amount of lines was improved in the FindLTTngUST
module.

This new example generates a shared library (tracepoint provider) that
links with dl and with lttng-ust. Two other shared libraries are also
generated, and these two are linked with the tracepoint provider shared
library.

Link: https://lists.lttng.org/pipermail/lttng-dev/2016-June/026213.html
Link: https://lists.lttng.org/pipermail/lttng-dev/2016-June/026203.html
Link: https://www.pastery.net/fvanfh/raw/
Acked-by: Philippe Proulx <eeppeliteloop@gmail.com>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Sebastien Boisvert <sboisvert@gydle.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoconfigure.ac: check cmake availability
Sebastien Boisvert [Tue, 21 Jun 2016 01:11:00 +0000 (21:11 -0400)] 
configure.ac: check cmake availability

In the configure.ac file, detect if a cmake executable is
available. Two new variables are now available in any
Makefile.am file: HAVE_CXX (which tells if a C++ compiler
is available) and HAVE_CMAKE (which indicates whether a cmake
executable is available).

Acked-by: Philippe Proulx <eeppeliteloop@gmail.com>
Acked-by: Sebastien Boisvert <sboisvert@gydle.com>
Signed-off-by: Sebastien Boisvert <sboisvert@gydle.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.045425 seconds and 4 git commands to generate.