lttng-ust:master

Last commit made on 2020-03-20
Get this branch:
git clone -b master https://git.launchpad.net/lttng-ust

Branch merges

Branch information

Name:
master
Repository:
lp:lttng-ust

Recent commits

5ffb7c1... by Francis Deslauriers <email address hidden> on 2020-03-20

Record event as soon as one filters evaluates to TRUE

This is a tiny optimization but it can reduce tracing cost in cases
where multiple filters are attached to a probe.

Since we want to trace the event if any of its filter expressions
evaluates to TRUE, there is no need to keep on evaluating expression
once one is found to be TRUE.

Signed-off-by: Francis Deslauriers <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>
Change-Id: I2bb8fafb3052fce02b10f541e025a9a74ffa1895

75026e9... by Francis Deslauriers <email address hidden> on 2020-03-18

Cleanup: ust-tracepoint-event.h: extract `__num_fields` in a variable

This makes it easier to understand what the `_TP_ARRAY_SIZE()` macro
expands to in this context.

Signed-off-by: Francis Deslauriers <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>
Change-Id: I6b44e1e444df1dab0496282af4cea260ae895ca0

0245c69... by Jonathan Rajotte on 2020-03-09

Fix: v.u.d might be uninitialized

lttng-filter-interpreter.c:301:17: warning: ‘v.u.d’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   ptr->u.d = v.u.d;

Indeed it seems that the value is never fetched if we compare to other
call sites and the dynamic call site further below.

Signed-off-by: Jonathan Rajotte <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>
Change-Id: I542d6db7514a2c39afe3613228577f34f194d672

c7193ab... by Mathieu Desnoyers on 2020-03-04

Fix: Add missing vtracelog demo to make dist

Signed-off-by: Mathieu Desnoyers <email address hidden>

43eeccf... by Mathieu Desnoyers on 2020-03-04

Fix: Add missing vtracef demo to make dist

Signed-off-by: Mathieu Desnoyers <email address hidden>

bd9bb3c... by Maxime Roussin-Belanger <email address hidden> on 2020-03-03

Introduce vtracelog

vtracelog works the same as vtracef, but takes a log level
as a parameter and has the same limitations.

Signed-off-by: Maxime Roussin-Belanger <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

cfd56ee... by Maxime Roussin-Belanger <email address hidden> on 2020-03-03

Introduce vtracef

vtracef accepts a va_list argument to simplify
tracing functions which use a va_list

Here's an example from wpa_supplicant that I wanted to
trace:

void wpa_debug(int level, const char* fmt, ...)
{
 va_list ap;
 va_start(ap, fmt);

 ...
 // The call I want to easily trace with vtracef
 vprintf(fmt, ap);

 ...
 va_end(ap);
}

wpa_debug is used a fair amount and it would be annoying to
replace all the wpa_debug calls with tracef.

With vtracef, it simplifies the find and replace effort by
only changing it at one place.

Signed-off-by: Maxime Roussin-Belanger <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

6daf0c2... by Jonathan Rajotte on 2020-03-02

Fix: set FD_CLOEXEC on incoming FDs.

The stream shm FDs are allocated by the consumer process, and then
passed to the applications over unix sockets. When opening those
file descriptors on reception, the FD_CLOEXEC flag is not set.

In a fork + exec scenario, parent process streams shm FDs and channel
wake FDs are present in the resulting child process.

Set FD_CLOEXEC on reception (ustcomm_recv_fds_unix_sock) to
prevent such scenario.

Change-Id: Id58077b272be9c1ab239846639ffd8103b3d50f1
Signed-off-by: Jonathan Rajotte <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

4f74bc5... by Mathieu Desnoyers on 2020-02-18

Fix: tracepoint.h: Disable address sanitizer on pointer array section variables

The tracepoint header declares pointer global variables meant to be
placed contiguously within the __tracepoints_ptrs section, and then used
as an array of pointers when loading an executable or shared object.

Clang Address Sanitizer adds redzones around each variable, thus leading to
detection of a global buffer overflow.

Those redzones should not be placed within this section, because it
defeats its purpose. Therefore, teach asan not to add redzones
around those variables with an attribute.

Note that there does not appear to be any issue with gcc (tested with
gcc-8 with address sanitization enabled), and gcc ignores the
no_sanitize_address attribute when applied to a global variable.

Fixes: #1238

Signed-off-by: Mathieu Desnoyers <email address hidden>

9ee5b08... by Mathieu Desnoyers on 2020-02-18

Fix: jhash.h: remove out-of-bound reads

jhash.h implements "special" code for valgrind because it reads memory
out-of-bound (and then applies a mask) when reading strings.

Considering that lttng-ust does not use jhash.h in a fast-path, remove
this "optimization" and use the verifiable VALGRIND code instead. This
fixes an ASan splat.

Fixes: #1238

Signed-off-by: Mathieu Desnoyers <email address hidden>