lttng-ust.git
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 agoTracepoint array/sequence: add nowrite hex macros
Mathieu Desnoyers [Fri, 6 May 2016 20:30:21 +0000 (16:30 -0400)] 
Tracepoint array/sequence: add nowrite hex macros

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoTracepoint: add ctf array for network byte order integers
Mathieu Desnoyers [Fri, 6 May 2016 20:09:57 +0000 (16:09 -0400)] 
Tracepoint: add ctf array for network byte order integers

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoTracepoint: add ctf sequence for network byte order integers
Mathieu Desnoyers [Fri, 6 May 2016 18:32:45 +0000 (14:32 -0400)] 
Tracepoint: add ctf sequence for network byte order integers

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 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: 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 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 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>
8 years agoFix: move lttng_context_is_app to core file
Mathieu Desnoyers [Thu, 10 Mar 2016 15:17:53 +0000 (10:17 -0500)] 
Fix: move lttng_context_is_app to core file

Needed by both lttng-ust and lttng-ust-ctl.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: move dummy functions to common file
Mathieu Desnoyers [Thu, 10 Mar 2016 15:13:17 +0000 (10:13 -0500)] 
Fix: move dummy functions to common file

Those dummy functions are needed by both lttng-ust and lttng-ust-ctl
libraries.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: handle backward probe compatibility for application contexts
Mathieu Desnoyers [Thu, 10 Mar 2016 01:05:53 +0000 (20:05 -0500)] 
Fix: handle backward probe compatibility for application contexts

Fix segmentation fault of applications built against lttng-ust 2.7,
linked against lttng-ust 2.8-pre when tracing is active. We need to
consider backward ABI compability here, which can be done by using
a dummy context in place of an application context when recording an
event. Basically, application contexts won't be saved into events
generated by a lttng-ust 2.7 probe provider: those will appear as empty
contexts.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: application context header size
Mathieu Desnoyers [Thu, 10 Mar 2016 00:37:56 +0000 (19:37 -0500)] 
Fix: application context header size

We need to use the RCU-dereferenced pointer when calculating the context
header size, else it may race with application context
register/unregister.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: event ctx get size should be after chan ctx
Mathieu Desnoyers [Thu, 10 Mar 2016 00:35:26 +0000 (19:35 -0500)] 
Fix: event ctx get size should be after chan ctx

Match the record functions, and the CTF spec. This has no impact
currently because event contexts are not implemented.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoClarify and simplify the Java agent "Hello" examples
Alexandre Montplaisir [Mon, 7 Mar 2016 21:43:01 +0000 (16:43 -0500)] 
Clarify and simplify the Java agent "Hello" examples

An "Hello World" type example should only mention the bare
minimum required, to avoid confusing new users further!

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoExport the stream instance ID
Julien Desfossez [Tue, 7 Jul 2015 17:08:16 +0000 (13:08 -0400)] 
Export the stream instance ID

Allow the lttng-consumer to query the stream instance ID.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoGenerate and export the sequence number
Julien Desfossez [Mon, 15 Jun 2015 20:33:47 +0000 (16:33 -0400)] 
Generate and export the sequence number

This allows the viewer to identify the gaps between trace packets.

This is a locked-step with the corresponding commit in lttng-tools.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoAdd stream instance id to the packet header
Julien Desfossez [Mon, 15 Jun 2015 15:04:58 +0000 (11:04 -0400)] 
Add stream instance id to the packet header

This new field allows the viewer to distinguish between trace files
belonging to the same packet stream (in LTTng: the same CPU in the same
channel).

This is a locked-step with the corresponding commit in lttng-tools.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Acked-by: Mathieu.Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoconfigure.ac: print empty line after AC_OUTPUT
Philippe Proulx [Mon, 29 Feb 2016 18:14:01 +0000 (13:14 -0500)] 
configure.ac: print empty line after AC_OUTPUT

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoconfigure.ac: macros with no arguments do not need ()
Philippe Proulx [Mon, 29 Feb 2016 18:13:36 +0000 (13:13 -0500)] 
configure.ac: macros with no arguments do not need ()

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoconfigure.ac: standardize indentation to tabs
Philippe Proulx [Mon, 29 Feb 2016 18:08:53 +0000 (13:08 -0500)] 
configure.ac: standardize indentation to tabs

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoconfigure.ac: move AC_PROG_SED() close to other AC_PROG_*()
Philippe Proulx [Sat, 27 Feb 2016 09:39:36 +0000 (04:39 -0500)] 
configure.ac: move AC_PROG_SED() close to other AC_PROG_*()

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoconfigure.ac: test -a -> shell's && (more portable)
Philippe Proulx [Sat, 27 Feb 2016 09:37:54 +0000 (04:37 -0500)] 
configure.ac: test -a -> shell's && (more portable)

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoconfigure.ac: use test "x$var" = "xyes"
Philippe Proulx [Sat, 27 Feb 2016 09:32:11 +0000 (04:32 -0500)] 
configure.ac: use test "x$var" = "xyes"

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoconfigure.ac: AM_CONDITIONAL() accepts two arguments
Philippe Proulx [Sat, 27 Feb 2016 09:30:31 +0000 (04:30 -0500)] 
configure.ac: AM_CONDITIONAL() accepts two arguments

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoconfigure.ac: use dnl at appropriate places
Philippe Proulx [Sat, 27 Feb 2016 09:28:57 +0000 (04:28 -0500)] 
configure.ac: use dnl at appropriate places

Use dnl where such a comment makes no sense in the outputted
configure script.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoconfigure.ac: if -> AS_IF()
Philippe Proulx [Sat, 27 Feb 2016 09:22:31 +0000 (04:22 -0500)] 
configure.ac: if -> AS_IF()

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoconfigure.ac: case -> AS_CASE()
Philippe Proulx [Sat, 27 Feb 2016 09:13:33 +0000 (04:13 -0500)] 
configure.ac: case -> AS_CASE()

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoconfigure.ac: add missing quotes in macro calls
Philippe Proulx [Sat, 27 Feb 2016 09:00:28 +0000 (04:00 -0500)] 
configure.ac: add missing quotes in macro calls

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoconfigure.ac: use macros for version name and description
Philippe Proulx [Sat, 27 Feb 2016 08:59:33 +0000 (03:59 -0500)] 
configure.ac: use macros for version name and description

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoconfigure.ac: do not use shell eval for known values
Philippe Proulx [Sat, 27 Feb 2016 08:07:14 +0000 (03:07 -0500)] 
configure.ac: do not use shell eval for known values

The version parts are known at Autoconf time, thus it makes no
sense to do string manipulation using the user's shell.

Just dnl the V_EXTRA definition when there's no extra version.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoAdd CONTRIBUTING.md
Philippe Proulx [Sat, 20 Feb 2016 01:55:06 +0000 (20:55 -0500)] 
Add CONTRIBUTING.md

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoOutput "(null)" when ctf_string()'s arg is NULL
Philippe Proulx [Wed, 17 Feb 2016 23:04:42 +0000 (18:04 -0500)] 
Output "(null)" when ctf_string()'s arg is NULL

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: disable use of __builtin_return_address(0) on 32-bit PowerPC
Mathieu Desnoyers [Wed, 17 Feb 2016 23:18:17 +0000 (18:18 -0500)] 
Fix: disable use of __builtin_return_address(0) on 32-bit PowerPC

It causes stack corruption in the tracepoint event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: java agent 32-bit pointer to jlong warning
Mathieu Desnoyers [Tue, 16 Feb 2016 16:05:10 +0000 (11:05 -0500)] 
Fix: java agent 32-bit pointer to jlong warning

Fix the following compiler warning on 32-bit:

15:07:12 lttng_ust_context.c: In function 'Java_org_lttng_ust_agent_context_LttngContextApi_registerProvider':
15:07:12 lttng_ust_context.c:377:17: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
15:07:12   provider_ref = (jlong) provider;

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: Use Java 6 syntax in JUL examples
Michael Jeanson [Mon, 15 Feb 2016 19:29:58 +0000 (14:29 -0500)] 
Fix: Use Java 6 syntax in JUL examples

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: add missing example file to dist tarball
Mathieu Desnoyers [Fri, 12 Feb 2016 23:30:06 +0000 (18:30 -0500)] 
Fix: add missing example file to dist tarball

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: add missing header to dist tarball
Mathieu Desnoyers [Fri, 12 Feb 2016 23:25:37 +0000 (18:25 -0500)] 
Fix: add missing header to dist tarball

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: add missing LttngContextApi.java to dist tarball
Mathieu Desnoyers [Fri, 12 Feb 2016 23:14:16 +0000 (18:14 -0500)] 
Fix: add missing LttngContextApi.java to dist tarball

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoPass the Java app context information using two separate arrays
Alexandre Montplaisir [Fri, 12 Feb 2016 20:28:07 +0000 (15:28 -0500)] 
Pass the Java app context information using two separate arrays

Instead of using one array with length limits for strings, we can
pass two separate arrays: the first will continue to contain fixed-
size entries, but instead of 256 bytes for strings, we will use
4-byte offsets to a second array, which will contain only those
variable-length strings.

The advantage is that we pass less bytes overall, and we don't
limit the context names or values to 256 bytes anymore.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: Correctly report filter notifications on Java agent teardown
Alexandre Montplaisir [Fri, 12 Feb 2016 16:51:47 +0000 (11:51 -0500)] 
Fix: Correctly report filter notifications on Java agent teardown

If a Java agent gets disposed, it should not just clear() all its
tracked event rules: it should first send corresponding filter change
notifications indicating that these rules are not tracked anymore.

This fixes a problem where if event rules were still enabled on agent
tear down, the filter notifier's own tracked events would become out
of sync.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoAdd some logging to the AbstractLttngAgent
Alexandre Montplaisir [Fri, 12 Feb 2016 00:45:47 +0000 (19:45 -0500)] 
Add some logging to the AbstractLttngAgent

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: Clear tracked application contexts upon closing a Java agent
Alexandre Montplaisir [Fri, 12 Feb 2016 00:37:44 +0000 (19:37 -0500)] 
Fix: Clear tracked application contexts upon closing a Java agent

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoIntroduce a verbose mode for the Java agent
Alexandre Montplaisir [Thu, 4 Feb 2016 23:37:37 +0000 (18:37 -0500)] 
Introduce a verbose mode for the Java agent

If the LTTNG_UST_DEBUG environment variable is defined, log messages
from the Java agent will be sent to stderr. This is in line with the
rest of UST.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoImplement Java agent application context retrieval
Alexandre Montplaisir [Thu, 7 Jan 2016 22:43:34 +0000 (17:43 -0500)] 
Implement Java agent application context retrieval

Java application can now register an IContextInfoRetriever to provide
context information. This information can be used for filtering:

  lttng enable-event -j myevent --filter '$app.retriever:context=="something"'

or for saving in the trace directly by enabling the context:

  lttng add-context -j -t '$app.retriever:context'

See the "ApplicationContextExample.java" program for an example of
utilization.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoTurn ISessiondCommand into an abstract class
Alexandre Montplaisir [Fri, 8 Jan 2016 20:28:07 +0000 (15:28 -0500)] 
Turn ISessiondCommand into an abstract class

This will allow us to define common methods to read strings passed on
the socket, which many commands (including upcoming ones) need to do.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoSplit the JNI APIs in separate classes
Alexandre Montplaisir [Mon, 4 Jan 2016 20:11:11 +0000 (15:11 -0500)] 
Split the JNI APIs in separate classes

Isolate the "native" methods in their own class, to better reflect
what is present in the equivalent C files.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoAdd app context support to ust-ctl protocol
Jérémie Galarneau [Wed, 27 Jan 2016 03:48:21 +0000 (22:48 -0500)] 
Add app context support to ust-ctl protocol

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoHandle application context cmd
Mathieu Desnoyers [Wed, 3 Feb 2016 22:07:27 +0000 (17:07 -0500)] 
Handle application context cmd

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoImplement dynamic types, and application context provider support
Mathieu Desnoyers [Wed, 13 Jan 2016 21:52:26 +0000 (16:52 -0500)] 
Implement dynamic types, and application context provider support

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: handle negative range for LTTNG_UST_REGISTER_TIMEOUT
Mathieu Desnoyers [Fri, 12 Feb 2016 20:44:10 +0000 (15:44 -0500)] 
Fix: handle negative range for LTTNG_UST_REGISTER_TIMEOUT

We should not consider values below -1 as valid timeout values, this is
is unexpected and could lead to EINVAL errors returned by sem_timedwait.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: Ensure the Java JUL messages are correctly formatted
Alexandre Montplaisir [Thu, 4 Feb 2016 05:32:01 +0000 (00:32 -0500)] 
Fix: Ensure the Java JUL messages are correctly formatted

It is possible for log records to contain messages that need some
formatting, for example if the string contains localized elements
or if the log(Level, String, Object[]) method is used.

In these cases, we need to make sure to format the string and not
pass the "raw" string to the tracepoint.

This only applies to the JUL API. log4j 1.2.x did not handle such
formatting, although log4j 2.x does.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: double-free on error sending fields
Mathieu Desnoyers [Fri, 15 Jan 2016 16:31:29 +0000 (11:31 -0500)] 
Fix: double-free on error sending fields

Found by Coverity:
*** CID 1348462:    (USE_AFTER_FREE)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoAdd CTF enum type support to tracepoint event
Mathieu Desnoyers [Sat, 9 Jan 2016 19:44:30 +0000 (14:44 -0500)] 
Add CTF enum type support to tracepoint event

Derived from initial implementation by:
Geneviève Bastien <gbastien+lttng@versatic.net>

Bump UST communication protocol version to 6.1 (minor version increase)
since we're adding enumeration notification command.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: missing _GNU_SOURCE define
Jonathan Rajotte [Mon, 4 Jan 2016 22:31:57 +0000 (17:31 -0500)] 
Fix: missing _GNU_SOURCE define

O_CLOEXEC requires _GNU_SOURCE.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agopython-lttngust/setup.py.in: update setup() fields
Philippe Proulx [Fri, 27 Nov 2015 18:04:44 +0000 (13:04 -0500)] 
python-lttngust/setup.py.in: update setup() fields

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoRefactor Python agent build and install
Philippe Proulx [Fri, 27 Nov 2015 17:39:51 +0000 (12:39 -0500)] 
Refactor Python agent build and install

Since the Python agent's tracepoint provider,
liblttng-ust-python-agent, does not depend on Python, it can
always be built and installed alongside LTTng-UST.

The Python package of this agent is completely independent
from the rest of the tree, thus it is isolated in its own
directory. This also eases the creation of distribution
packages because the packager can selectively build and
install the Python package without also building/installing the
tracepoint provider.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 years agoFix: remove debugging print() call from Python agent
Philippe Proulx [Tue, 27 Oct 2015 23:06:56 +0000 (19:06 -0400)] 
Fix: remove debugging print() call from Python agent

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 years agoFix: header size larger than 256 bytes
Mathieu Desnoyers [Sun, 25 Oct 2015 15:25:31 +0000 (11:25 -0400)] 
Fix: header size larger than 256 bytes

When adding large context (e.g. callstack), headers larger than 256
bytes cause discrepancy between calculated size and size written into
the trace buffers. This generates a corrupted trace and triggers a
warning in ring buffer backend, which triggers a safety net disabling
tracing for the current channel.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 years agoPython agent: Support Agent protocol v2.0
Jérémie Galarneau [Fri, 23 Oct 2015 21:12:50 +0000 (17:12 -0400)] 
Python agent: Support Agent protocol v2.0

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 years agoFix: Java agent protocol network endianness consistency
Jérémie Galarneau [Fri, 23 Oct 2015 21:12:51 +0000 (17:12 -0400)] 
Fix: Java agent protocol network endianness consistency

Considering the Agent Protocol is bumped to v2.0 as of 2.8.x,
this patch revisits the unfortunate decision of communicating
in host-endianness from the session daemon to the agents, and
in big endian from the agents to the session daemon.

This change does not affect the Python agent which was erroneously
(although quite reasonably) assuming communications were occurring
in network endianness.

This issue does not affect versions 2.7 and below because the loglevel
was not used.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 years agoFix: examples jul: add missing files to make dist
Mathieu Desnoyers [Thu, 22 Oct 2015 21:29:45 +0000 (17:29 -0400)] 
Fix: examples jul: add missing files to make dist

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 years agoFix: Filer -> Filter typo in example
Mathieu Desnoyers [Thu, 22 Oct 2015 21:26:25 +0000 (17:26 -0400)] 
Fix: Filer -> Filter typo in example

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 years agoFix: Return the correct list of available Java events
Alexandre Montplaisir [Wed, 9 Sep 2015 19:07:24 +0000 (15:07 -0400)] 
Fix: Return the correct list of available Java events

The "lttng list -j/-l" command should list the events that are currently
offered by Java application and available to be enabled.

Due to some confusion in the implementation of the corresponding agent
command response, it was actually returning the list of events that were
enabled in the tracing session.

Rectify this by sending the list of loggers of the corresponding domain
that have one or more LTTng log handlers attached. The interface method
was also renamed from listEnabledEvents() to listAvailableEvents() to
make it more representative.

Fixes: #933
Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 years agoAdd a toString() to Java agent's EventRule
Alexandre Montplaisir [Tue, 15 Sep 2015 17:57:09 +0000 (13:57 -0400)] 
Add a toString() to Java agent's EventRule

Helps with debugging and eventually for pretty-printing.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 years agoAdd API stubs for the Java context info retrievers
Alexandre Montplaisir [Thu, 3 Sep 2015 18:00:28 +0000 (14:00 -0400)] 
Add API stubs for the Java context info retrievers

A context info retriever will allow an application to define their own
context information, and have it available in the resulting UST traces.

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