Fix: liblttng-ust-ctl: keep using lttng-ust-sock-8 and lttng-ust-wait-8 filenames
commit 6a359b8a4006 ("Bump LTTNG_UST_ABI version from 8.1 to 9.0")
attempted to ensure that a session daemon linked against an old
lttng-ust-ctl (2.12) would not attempt to interact with newer
applications.
This was done by increasing the major ABI version number, but
introducing LTTNG_UST_ABI_MAJOR_VERSION_OLDEST_COMPATIBLE (set to 8) as
a mean to allow session daemon to accept both major versions 8 and 9.
Unfortunately, changing LTTNG_UST_ABI_MAJOR_VERSION means the filenames
used for communication changed as well, meaning that applications linked
against older lttng-ust 2.12 cannot interact with lttng sessiond linked
against lttng-ust-ctl 2.13, which is unintended.
Therefore, go back to using the previous filenames: lttng-ust-sock-8,
and lttng-ust-wait-8 for communication.
There is an issue with the security model of lib ring buffer (lttng-ust)
vs SIGBUS handling by consumer daemon. We do not handle SIGBUS in the
consumer daemon. An application using ftruncate on a ring buffer shm
could cause the consumer to be killed with SIGBUS.
Expose the relevant APIs to allow consumer daemon to handle SIGBUS.
It requires the user application (consumerd) to define the TLS sigbus
state with DEFINE_LTTNG_UST_SIGBUS_STATE(), and to invoke
lttng_ust_ctl_sigbus_handle() when a SIGBUS is received, passing the
address causing the SIGBUS (siginfo->si_addr) as parameter.
Internally, liblttng-ust-ctl uses sigsetjmp and siglongjmp to recover
from SIGBUS, and track all accesses to shared memory ranges within the
library.
This modifies the API of liblttng-ust-ctl, and requires the user
application to define the TLS sigbus state with
DEFINE_LTTNG_UST_SIGBUS_STATE(). It therefore needs to be introduced in
locked-step between lttng-ust and lttng-tools.
It requires a major version bump of liblttng-ust-ctl soname.
Fix: Java application context: pass application context argument to callbacks
The callbacks require the complete application context field names to
compare against the tables received from the TLS area.
We also need to free memory allocated by for the context event field and
context name in a destroy callback.
Therefore, allocate a data structure for each application context, and
use that data structure as private data. This allows callback to reach
the context name, and a destroy callback to free the allocated memory.
Add probe descriptor field to enum and event class
If future event instances can refer to event classes located in
different probe providers, the tracer needs to be able to query the
major/minor version of the probe provider containing the class.
Refactoring: tracepoint: allow explicit tracepoint instance provider name
Add a template_provider argument to LTTNG_UST_TRACEPOINT_EVENT_INSTANCE
to allow a tracepoint instance to refer to a tracepoint class from
another provider within the same compile unit.
Also introduce struct lttng_ust_tracepoint_class to clearly split the
event instance from the class, thus allowing the event instance to refer
to the class through a single symbol. This removes the need to rely on
LTTNG_UST__TP_ARRAY_SIZE() to calculate the size of the event field
array (part of the class) from within the event instance. This
refactoring opens the door to have event class and instance not only in
different providers, but also in providers emitted within different
compile units and shared objects in the future.
For instance, if a .c includes the following headers:
This is a localized API-breaking change introduced very early in the
2.13-rc cycle.
This changes the ABI exposed by the probe providers, so bump the probe
provider major version, and make newer lttng-ust reject old incompatible
major. We can do this because it is very early in the 2.13-rc cycle.
sequence type: use previous field for length if length_name is NULL
A common use-case for sequences is to use the field located immediately
prior to the sequence as sequence length.
The fact that the sequence type needs to explicitly contain its length
name ties the sequence type to where it is placed within the structure
fields, preventing re-use of the sequence type.
In order to reduce the memory footprint of the field descriptions and
allow re-use of common field types, special-case the NULL length_name to
use the field prior to the sequence as length.
This allows more efficient type descriptions without reducing the
overall flexibility of sequence layout.
Michael Jeanson [Thu, 22 Apr 2021 22:36:47 +0000 (18:36 -0400)]
Move the ringbuffer and counter clients to 'src/common/'
The clients are used by both liblttng-ust and liblttng-ust-ctl, now that
the clock and getcpu plugins on which they depend have been moved to
liblttng-ust-common, they can be extracted from liblttng-ust-ctl and
move to common convenience libraries.
Change-Id: I8384570007950ca18d00759790cb5264b7c3b528 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Thu, 22 Apr 2021 16:48:52 +0000 (12:48 -0400)]
Make futex compat internal to liblttng-ust
This compat header originated in userspace RCU where it's used across
multiple shared objects hence the need to have the mutexes as public
weak symbols, in our case it's only used internally by liblttng-ust so
we can hide them.
If we end up using this compat header in another library in this project
we will have to use the same scheme, but in the meantime, don't expose
those symbols in the ABI.
Move the code to the liblttng-ust directory to make sure it's not used
by other libraries.
Change-Id: Ibfaef9448eeaf6247b42f71d6b6d8de234d79a3c Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Wed, 21 Apr 2021 22:31:54 +0000 (18:31 -0400)]
Namespace liblttng-ust-ctl symbols
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Rename all liblttng-ust-ctl symbols from
'ustctl_' to 'lttng_ust_ctl_'.
Change-Id: Ic2b9da019e7776b24b98824ae63d16b86c5a5742 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Introduce a "probe context" to allow passing the "ip" context from the
probe function to the get_value callback used by the bytecode
interpreter. This enables the "ip" context to be used from the filter
bytecode and from the capture bytecode.
Also fix signedness of the return type of the get_value context
callbacks for cases where the type is unsigned.
Fix: move compat macros for tracepoint probes to ust-tracepoint-event.h
Do not pollute the compile units with API=0 defines for applications
instrumented with tracepoint.h but keeping the probe provider in a
separate compile unit.
Michael Jeanson [Wed, 21 Apr 2021 21:44:07 +0000 (17:44 -0400)]
Tracepoint API namespacing ctf_enum
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I377d89338735a6cc3b2b436e69fefd2e81f39e9a Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Wed, 21 Apr 2021 21:27:39 +0000 (17:27 -0400)]
Tracepoint API namespacing ctf_unused
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I41531d9e69604f1809d035147779c8ceeed2add7 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Wed, 21 Apr 2021 21:04:19 +0000 (17:04 -0400)]
Tracepoint API namespacing ctf_string
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I5ca6f4574a10b62c397af2f20312e309f6b59563 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Wed, 21 Apr 2021 20:56:54 +0000 (16:56 -0400)]
Tracepoint API namespacing ctf_sequence
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I6c8596313ce806dd401d41b9b24e228aad39cfe5 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Wed, 21 Apr 2021 20:03:42 +0000 (16:03 -0400)]
Tracepoint API namespacing ctf_array
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: Ib1c3694d054cba2b6d27bd62a3db2b64eca27c3f Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Wed, 21 Apr 2021 19:50:19 +0000 (15:50 -0400)]
Tracepoint API namespacing ctf_float
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: Ia34bb89dff2542b8d67f2221353ea2e01ed0e0e8 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Wed, 21 Apr 2021 19:37:36 +0000 (15:37 -0400)]
Tracepoint API namespacing ctf_integer
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I361286079a409226287eb0c401231f4d147e08a4 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Wed, 21 Apr 2021 18:33:28 +0000 (14:33 -0400)]
Tracepoint API namespacing tracepoint-rcu
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: Ia07f15d7dd01c6d1e86033c83d329888bb52553f Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Wed, 21 Apr 2021 16:42:21 +0000 (12:42 -0400)]
Tracepoint API namespacing ust-endian
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: Iaab4a3630f3cd75adf540e4e849fb374076d87b4 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Wed, 21 Apr 2021 15:19:16 +0000 (11:19 -0400)]
Tracepoint API namespacing tracelog
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I60a6f7838ddf60ef43c3017a50ed24c8bf188a43 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Wed, 21 Apr 2021 15:07:58 +0000 (11:07 -0400)]
Tracepoint API namespacing tracef
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I1a16b9af1dfabb9483cdf3e5225ebe50fe691935 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 21:15:16 +0000 (17:15 -0400)]
Tracepoint API namespacing '__lttng_ust_events_exit'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I150273940c94f4b0c86b87adcad724befd480158 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 21:11:55 +0000 (17:11 -0400)]
Tracepoint API namespacing '__lttng_ust_events_init'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I2918a0974bd0c7d0c44a4d383d2092d586a20892 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 21:08:05 +0000 (17:08 -0400)]
Tracepoint API namespacing '__lttng_ust_probe_register_cookie'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I8ef2e31d57a37f1f3519c566767aac56ee20bf66 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 21:06:10 +0000 (17:06 -0400)]
Tracepoint API namespacing '__probe_register'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I7fa206f7730802b73c441901572c0f3986d9566a Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 21:05:05 +0000 (17:05 -0400)]
Tracepoint API namespacing '__probe_desc'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: Iabbb87406d25a0fce4371e44d6ead8b6452ebf5f Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 21:01:33 +0000 (17:01 -0400)]
Tracepoint API namespacing '_TP_EXTRACT_STRING'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I6e2f65e3510cb0c0bce14b792f1e3fb280a1754d Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 21:00:10 +0000 (17:00 -0400)]
Tracepoint API namespacing '__get_dynamic_len'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: Id3c3f0d08439c6149f835ced5a575f2507b74ef1 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 20:57:45 +0000 (16:57 -0400)]
Tracepoint API namespacing 'TP_IP_PARAM'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: Ie01946b463b9b7a517699b3d7063ef97da134a43 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 20:50:17 +0000 (16:50 -0400)]
Tracepoint API namespacing 'TP_SESSION_CHECK'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I7c68548f40594250ba10defcdd0775cdb1a3172e Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 20:28:58 +0000 (16:28 -0400)]
Tracepoint API namespacing '__tp_stringify'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I98e1265e8f9118a27df89e6142ba59fcdd5ae131 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 19:05:29 +0000 (15:05 -0400)]
Tracepoint API namespacing '__event_'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I49ba4ed31dff075d66eb4c4deec878243c0080b5 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 18:59:10 +0000 (14:59 -0400)]
Tracepoint API namespacing '_tp_max_t'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I3f80c5a299e537897d9f0dd3e48ce2c1ccf68c30 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 18:58:11 +0000 (14:58 -0400)]
Tracepoint API namespacing '_TP_ARRAY_SIZE'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: Ic2eff29524e1afadeae87cf97b28ab904a95f0f8 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 18:31:00 +0000 (14:31 -0400)]
Tracepoint API namespacing '__LTTNG_UST_NULL_STRING'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I1517464f5c50b890bdcf2825d10be1690a699eac Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Wed, 21 Apr 2021 19:11:16 +0000 (15:11 -0400)]
Tracepoint API namespacing 'TP_ENUM_VALUES'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I4f8755f8eddfb2c76dce18fe6193489dbe36aa7f Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 20:23:32 +0000 (16:23 -0400)]
Tracepoint API namespacing 'TRACEPOINT_PROVIDER'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: Ie72e03c0232f2b51e38783da2aed1305feab3c57 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 18:28:44 +0000 (14:28 -0400)]
Tracepoint API namespacing 'TRACEPOINT_INCLUDE'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I1fe79f1914c0f2da86c419c578f0f4d2f36df3b7 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 18:11:59 +0000 (14:11 -0400)]
Tracepoint API namespacing 'TRACEPOINT_HEADER_MULTI_READ'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: Ib8d0af6af18882283b239593517a4c33384fcf93 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 17:59:50 +0000 (13:59 -0400)]
Tracepoint API namespacing 'TRACEPOINT_CREATE_PROBES'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: Ibb5e359d4d594b8c7a51852acde8e80d9f79e131 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 17:49:22 +0000 (13:49 -0400)]
Tracepoint API namespacing 'TRACEPOINT_MODEL_EMF_URI'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: Ib0aa6d868dde81bd7deb79d3a41d826bf6ed6419 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 17:17:11 +0000 (13:17 -0400)]
Tracepoint API namespacing 'TRACEPOINT_LOGLEVEL'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I3be1cdd214cfcad38613fdae0e9620f9ee8d0437 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 17:03:34 +0000 (13:03 -0400)]
Tracepoint API namespacing 'TRACEPOINT_ENUM'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I40ce57d796361cc9393d07792e5c5225a38db00f Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 17:00:16 +0000 (13:00 -0400)]
Tracepoint API namespacing 'TRACEPOINT_DEFINE'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: Iffa8f15a1050e8d995bcc94c46f1cd588bb70aac Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 16:42:50 +0000 (12:42 -0400)]
Tracepoint API namespacing 'tracepoint_(un)register'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I4eb585902ed4ec4b2207d4c32b744d9a8b454ae6 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 16:16:36 +0000 (12:16 -0400)]
Tracepoint API namespacing '__tp_provider' and '__tp_name'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: Ic9b1bda1f88a9c5b3384b7fc368effec8c239ee9 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 16:13:28 +0000 (12:13 -0400)]
Tracepoint API namespacing 'TRACEPOINT_PROBE_DYNAMIC_LINKAGE'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: Iee16eccc8fa796c0154a879d5fc04b9d84597e14 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 16:05:13 +0000 (12:05 -0400)]
Tracepoint API namespacing ctor, dtor and sections
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: Ibffb8334fdd001671fb6b9c5e001598648499a54 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 15:53:04 +0000 (11:53 -0400)]
Tracepoint API namespacing '_TP_NARGS'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I8fb892f7a1d1053d5b7b87dc3445bd1f254a3fe3 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 15:17:15 +0000 (11:17 -0400)]
Tracepoint API namespacing '_TP_EXPROTO'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I32f62c8bbe1c8f86a717772324f764ca040c3256 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 15:16:10 +0000 (11:16 -0400)]
Tracepoint API namespacing '_TP_EXDATA'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I106630677f62edaf5cb22b076f1642c7c8a456bb Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 15:14:48 +0000 (11:14 -0400)]
Tracepoint API namespacing '_TP_EXVAR'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I83752deb692413bba6e335fe35a10d127b921bcd Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 15:13:42 +0000 (11:13 -0400)]
Tracepoint API namespacing '_TP_COMBINE_TOKENS'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: Ife2aa364f3a5f60b248b93a00854694eb351b8c8 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 15:05:36 +0000 (11:05 -0400)]
Tracepoint API namespacing 'LTTNG_UST_SDT'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: Ie7e9c62200b6874141e2fdc3c656a9eb95029273 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 20 Apr 2021 14:39:07 +0000 (10:39 -0400)]
Tracepoint API namespacing '__tracepoint_'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I2ecc085f05956cedb58f8e3109a746304aef2ec6 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Mon, 19 Apr 2021 20:28:55 +0000 (16:28 -0400)]
Tracepoint API namespacing 'tracepoint_destructors_syms'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I775858f7533c6fc2fad4a1d51e5a677c1a7d5cbb Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Mon, 19 Apr 2021 20:26:35 +0000 (16:26 -0400)]
Tracepoint API namespacing 'tracepoint_dlopen'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I3349b267ee0c1e119fed509f6e600bc8edb27f1c Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Mon, 19 Apr 2021 19:10:30 +0000 (15:10 -0400)]
Tracepoint API namespacing 'TRACEPOINT_EVENT'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I385cbae2b4adcea8551ab8dca66d2a0efe60f9b9 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Mon, 19 Apr 2021 18:56:24 +0000 (14:56 -0400)]
Tracepoint API namespacing 'TP_FIELDS'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: Ifa379bae616d4c3e6f5a7e99fe436639b65f12ea Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Mon, 19 Apr 2021 17:55:07 +0000 (13:55 -0400)]
Tracepoint API namespacing 'TP_ARGS'
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: Id0a63bc4cf96ac2980690fae0e6b22fdf17a4fc1 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Introduce API compatibility macros, allowing to compile-out backward
compatibility for older API major versions.
The initial use-case introduced here is renaming of the tracepoint(),
do_tracepoint() and tracepoint_enabled() macros to add the lttng_ust_
prefix. The old macros are only defined when API compatibility with
soname 0 is enabled.
Now that we bump the ABI, it's a good opportunity to split the
tracepoint "name" field, which is a concatenation of
#provider_name ':' #event_name
into separate provider and name fields.
Reject tracepoints and callsites which are larger than the maximum
length supported by LTTng-UST rather than silently truncating them.
This emits a warning visible with LTTNG_UST_DEBUG=1 to allow pinpointing
erroneous users.
Note that as long as tracepoints are defined statically with the
tracepoint API, the length of the provider and event names is validated
with a build-time check.
This means the core of tracepoint.c is now agnostic to the length of the
tracepoint provider/event name. If there is ever a change to the
LTTng-UST protocol allowing larger length for those, changing the
length validations will be straightforward.
Michael Jeanson [Mon, 19 Apr 2021 19:49:19 +0000 (15:49 -0400)]
lttng-gen-tp: no linker flags when compiling .o
The lttng-gen-tp scripts appends the content of the LDFLAGS variable to
the cc command use to compile object files, this is unnecessary since we
are not linking an executable or shared object and will generate
warnings with recent clang.
Change-Id: I87812028f145e0fc3848cf9d58de998abc98e57e Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>