lp:~lttng/lttng-ust/lttng-ust

Created by Alex Montplaisir on 2011-11-03 and last modified on 2020-07-07
Get this branch:
bzr branch lp:~lttng/lttng-ust/lttng-ust

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Ubuntu LTTng
Project:
LTTng-UST
Status:
Development

Import details

Import Status: Reviewed

This branch is an import of the HEAD branch of the Git repository at git://git.lttng.org/lttng-ust.git.

The next import is scheduled to run in 5 hours.

Last successful import was 37 minutes ago.

Import started 38 minutes ago on alnitak and finished 37 minutes ago taking 20 seconds — see the log
Import started 6 hours ago on izar and finished 6 hours ago taking 15 seconds — see the log
Import started 12 hours ago on alnitak and finished 12 hours ago taking 20 seconds — see the log
Import started 18 hours ago on izar and finished 18 hours ago taking 15 seconds — see the log
Import started on 2020-08-13 on alnitak and finished on 2020-08-13 taking 20 seconds — see the log
Import started on 2020-08-12 on izar and finished on 2020-08-12 taking 15 seconds — see the log
Import started on 2020-08-12 on izar and finished on 2020-08-12 taking 15 seconds — see the log
Import started on 2020-08-12 on alnitak and finished on 2020-08-12 taking 20 seconds — see the log
Import started on 2020-08-12 on izar and finished on 2020-08-12 taking 15 seconds — see the log
Import started on 2020-08-11 on izar and finished on 2020-08-11 taking 15 seconds — see the log

Recent revisions

2413. By Michael Jeanson <email address hidden> on 2020-07-07

Add userspace time namespace context

This was introduced in kernel v5.6.0, on a system running an older kernel,
zero will be returned.

Signed-off-by: Michael Jeanson <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>
Change-Id: I1ea66a98c96a4de084c02521f6982e8c7d1b53bb

2412. By Michael Jeanson <email address hidden> on 2020-07-02

Use libtool syntax in LDADD

Use .la files to add link dependencies between libraries, linking
directly to the content of '.libs' is relying on an implementation
detail of libtool.

Signed-off-by: Michael Jeanson <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>
Change-Id: I6fe0157e23f13cd69c436111a2e743fa1c763d64

2411. By Michael Jeanson <email address hidden> on 2020-07-02

Add missing files to distribution

Signed-off-by: Michael Jeanson <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>
Change-Id: I5b0be9c7c87dc7fef1c6f46f15091d4e3c2a09a8

2410. By Jonathan Rajotte on 2020-06-30

Fix: python agent: 'time' has no attribute 'clock'

The time.clock() function was removed in python 3.8 and is marked as
deprecated since python 3.3. See PEP 418 for more details [1].

Solution
=====

When the python version is greater than 3.2 use the
`time.perf_counter()` function [2]. Otherwise, fall back to
`time.clock()`.

Introduce a compat module to the lttngust agent package providing the
`_clock` function.

[1] https://www.python.org/dev/peps/pep-0418/
[2] https://docs.python.org/3/library/time.html#time.perf_counter

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

2409. By Christophe Bedard on 2020-06-30

Fix: libc-wrapper: undef temporary token rather than value

The lttng-ust malloc wrapper defines pthread_mutex_lock/unlock
preprocessor tokens to ust_malloc_spin_lock/unlock around the definition
of a TLS variable, which uses pthread mutexes when relying on the
pthread key fallback. Undefining those tokens should be done on the
preprocessor token, rather than its value.

Signed-off-by: Christophe Bedard <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>
Change-Id: I2053b79c88000e272c29b25ca105b1352ecfabd7

2408. By Michael Jeanson <email address hidden> on 2020-06-30

Fix: support compile units including 'sys/sdt.h' without defining SDT_USE_VARIADIC

Instead of using SDT_USE_VARIADIC from 'sys/sdt.h', use our own namespaced
macros since the instrumented application might already have included
'sys/sdt.h' without variadic support.

Signed-off-by: Michael Jeanson <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>
Change-Id: Idfece1a65a5296a90d33370bc8d73ea554c14b0f

2407. By Francis Deslauriers <email address hidden> on 2020-05-12

Cleanup: have interpreter functions return _DISCARD instead of 0

It's easier to understand the meaning of the zero return value of these
function using the enum. It makes it obvious.

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

2406. By Francis Deslauriers on 2020-05-11

Cleanup: bytecode: typo: "s16" -> "u16"

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

2405. By Francis Deslauriers <email address hidden> on 2020-05-11

doc: Explain `struct lttng_bytecode_runtime` layout restrictions

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

2404. By Francis Deslauriers <email address hidden> on 2020-05-05

Fix: event probes attached before event enabled

Background
==========
When userspace events with exclusions are enabled by the CLI user, the
session daemon enables the events in a 3-steps process using the
following ustctl commands:
1. `LTTNG_UST_EVENT` to create an event and get an handle on it,
2. `LTTNG_UST_EXCLUSION` to attach exclusions, and
3. `LTTNG_UST_ENABLE` to activate the tracing of this event.

Also, the session daemon uses the `LTTNG_UST_SESSION_START` to start the
tracing of events. In various use cases, this can happen before OR after
the 3-steps process above.

Scenario
========
If the`LTTNG_UST_SESSION_START` is done before the 3-steps process the
tracer will end up not considering the exclusions and trace all events
matching the event name glob pattern provided at step #1.

This is due to the fact that when we do step #1, we end up calling
`lttng_session_lazy_sync_enablers()`. This function will sync the event
enablers if the session is active (which it is in our scenario because
of the _SESSION_START).
Syncing the enablers will then match event name glob patterns provided
by the user to the event descriptors of the tracepoints and attach
probes in their corresponding callsite on matches.

All of this is done before we even received the exclusions in step #2.

Problem
=======
The problem is that we attach probes to tracepoints before being sure we
received the entire description of the events.
Step #2 may reduced the set of tracepoints to trace so we must wait
until exclusions are all received to attached probes to tracepoints.

Solution
========
Only match event names and exclusions (and ultimately, register probes)
on enabled enablers to ensure that no other modifications will be
applied to the event.

Event enablers are enabled when at step #3.

Note
====
Filters are not causing problems here because adding a filter won't
change what tracepoints are to be traced.

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

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers