tracepoint: split provider and event name
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 15 Apr 2021 18:00:13 +0000 (14:00 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 22 Apr 2021 14:59:16 +0000 (10:59 -0400)
commit34f7f1421e4869381acf65d59cb1abb37df440df
treeac26011602cfe9d9599207d3271292e6242409ec
parentd619cda8578e0d27ce0de14b09c4dc8e8056d534
tracepoint: split provider and event name

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.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I770cf57e1f19ec6f4d8c1c7b05e537a176a046cb
include/lttng/tracepoint-types.h
include/lttng/tracepoint.h
src/common/tracepoint.h
src/lib/lttng-ust-tracepoint/tracepoint.c
src/lib/lttng-ust-tracepoint/tracepoint.h
src/lib/lttng-ust/lttng-events.c
This page took 0.025253 seconds and 4 git commands to generate.