lp:~lttng/lttng-ust/lttng-ust
- Get this branch:
- bzr branch lp:~lttng/lttng-ust/lttng-ust
Branch merges
Branch information
Import details
This branch is an import of the HEAD branch of the Git repository at git://git.lttng.org/lttng-ust.git.
Last successful import was .
Recent revisions
- 3059. By Mathieu Desnoyers
-
ust-fd: Add close_range declaration
Old libc headers do not contain a declaration of close_range(). Emit our
own declaration to prevent compiler warnings.Signed-off-by: Mathieu Desnoyers <email address hidden>
Change-Id: If6ca8193895efbb6ce1ba46e09293 9b8099bcff6 - 3058. By Mathieu Desnoyers
-
Rename "tsc" to "timestamp"
Naming timestamps "TSC" or "tsc" is an historical artefact dating from
the implementation of libringbuffer, where the initial intent was to use
the x86 "rdtsc" instruction directly, which ended up not being what was
done in reality.Rename uses of "TSC" and "tsc" to "timestamp" to clarify things and
don't require reviewers to be fluent in x86 instruction set.Signed-off-by: Mathieu Desnoyers <email address hidden>
Change-Id: I8e7e2ad9cd2d2427485fc6adbc340 fccde14ca2f - 3057. By Kienan Stewart <email address hidden>
-
docs: Correct GitHub URLs in lttng-ust.3
The branches follow the format `stable-X.YZ` rather than `vX.YZ`.
Furthermore, when rendering the man pages from source, the URLs were
omitted completely as the subsitution `{lttng_version}` was not
defined. This hasn't been an issue for the published HTML versions as
those are produced via a different script in the `lttng-www` project
which presumably sets the substitution properly.Change-Id: Ib96c99df13ddf7
24e128f95e7ce7c 74b2c10c766
Signed-off-by: Kienan Stewart <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden> - 3056. By Mathieu Desnoyers
-
fix: handle EINTR correctly in get_cpu_
mask_from_ sysfs If the read() in get_cpu_
mask_from_ sysfs() fails with EINTR, the code is
supposed to retry, but the while loop condition has (bytes_read > 0),
which is false when read() fails with EINTR. The result is that the code
exits the loop, having only read part of the string.Use (bytes_read != 0) in the while loop condition instead, since the
(bytes_read < 0) case is already handled in the loop.Original fix in liburcu from Benjamin Marzinski <email address hidden>:
commit 9922f33e2986 ("fix: handle EINTR correctly in get_cpu_
mask_from_ sysfs") Signed-off-by: Mathieu Desnoyers <email address hidden>
Change-Id: I885a0fb98e5a7cfb9a8bd180c8e64 b20926ff58c - 3055. By Mathieu Desnoyers
-
Introduce LTTNG_UST_
MAP_POPULATE_ POLICY environment variable Problem Statement
-----------------commit 4d4838bad480 ("Use MAP_POPULATE to reduce pagefault when available")
was first introduced in tag v2.11.0 and never backported to stable
branches. Its purpose was to reduce the tracer fast-path latency caused
by handling minor page faults the first time a given application writes
to each page of the ring buffer after mapping them. The discussion
thread leading to this commit can be found here [1]. When using
LTTng-UST for diagnosing real-time applications with very strict
constraints, this added latency is unwanted.That commit introduced the MAP_POPULATE flag when mapping the ring
buffer pages, which causes the kernel to pre-populate the page table
entries (PTE).This has, however, unintended consequences for the following scenarios:
* Short-lived applications which write very little to the ring buffer end
up taking more time to start, because of the time it takes to
pre-populate all the ring buffer pages, even though they typically won't
be used by the application.* Containerized workloads using cpusets will also end up having longer
application startup time than strictly required, and will populate
PTE for ring buffers of CPUs which are not present in the cpuset.There are, therefore, two sets of irreconcilable requirements:
short-lived and containerized workloads benefit from lazily populating
the PTE, whereas real-time workloads benefit from pre-populating them.This will therefore require a tunable environment variable that will let
the end-user choose the behavior for each application.Solution
--------Allow users to specify whether they want to pre-populate
shared memory pages within the application with an environment
variable.LTTNG_UST_
MAP_POPULATE_ POLICY
If set, override the policy used to populate shared memory pages within the
application. The expected values are:none
Do not pre-populate any pages, take minor faults on first access while
tracing.cpu_possible
Pre-populate pages for all possible CPUs in the system, as listed by
/sys/devices/ system/ cpu/possible. Default: none. If the policy is unknown, use the default.
Choice of the default
-------------- ------- Given that users with strict real-time constraints already have to setup
their tracing with specific options (see the "--read-timer"
lttng-enable-channel( 3) option [2]), it makes sense that the default
is to lazily populate the ring buffer PTE, and require users with
real-time constraints to explicitly enable the pre-populate through an
environment variable.Effect on default behavior
-------------- ------- ----- The default behavior for ring buffer PTE mapping will be changing across
LTTng-UST versions in the following way:- 2.10 and earlier: lazily populate PTE,
- 2.11-2.13: pre-populate PTE,
- 2.14: lazily populate PTE.LTTng-UST 2.14 will revert back to the 2.10 lazy populate scheme by
default.[1] https:/
/lists. lttng.org/ pipermail/ lttng-dev/ 2019-July/ thread. html#29094
[2] https://lttng. org/docs/ v2.13/# doc-channel- timers Signed-off-by: Mathieu Desnoyers <email address hidden>
Change-Id: I6743b08cd1fe0d956caaf6aad6300 5555bb9640e - 3054. By Mathieu Desnoyers
-
Add close_range wrapper to liblttng-ust-fd.so
glibc 2.34 implements close_range(2), which is used by the ssh client
(amongst others). This needs to be overridden to make sure ssh does not
close lttng-ust file descriptors.Signed-off-by: Mathieu Desnoyers <email address hidden>
Change-Id: Ic4e0046499e1f010395aec71a4831 6b9d1e9bf3f - 3053. By Kienan Stewart <email address hidden>
-
docs: Add supported versions and fix-backport policy
Change-Id: I9ec43912652fc7
13484959e931576 5f7e9d29a3e
Signed-off-by: Kienan Stewart <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden> - 3052. By Kienan Stewart <email address hidden>
-
docs: Add cases in which tracepoints in ctors/dtors may not work
Change-Id: I52666810322e26
b3841ea1bca6f58 8b6c3e6f3f8
Signed-off-by: Kienan Stewart <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden> - 3051. By Olivier Dion <email address hidden>
-
ust-tracepoint-
event: Add static check of sequences length type Enforce required unsigned type for length of sequence at compile time.
Change-Id: Ia8668a80eb0c0b
81e8c03b208d758 1e34af313fd
Signed-off-by: Olivier Dion <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden> - 3050. By Olivier Dion <email address hidden>
-
lttng-ust(3): Fix wrong len_type for sequence
`len_type' of a sequence field must be of type unsigned integer. Some
provided examples in the man page were incorrectly using a type signed
integer, resulting in correct compilation, but error while decoding.Change-Id: Icc685b330d0704
660b36f703075f4 53d71c5e4cb
Signed-off-by: Olivier Dion <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)