tracepoint: validate provider/event name length with static assert
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 15 Apr 2021 21:26:32 +0000 (17:26 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 16 Apr 2021 13:22:02 +0000 (09:22 -0400)
Validate the provider/event name length with static assert in both
_DEFINE_TRACEPOINT() and within the tracepoint probe.

Validating the length in _DEFINE_TRACEPOINT() ensures that the
tracepoints don't try to register a callsite with a too long name by
mistake. This will enable handling of too long names with rejection of
the tracepoint rather than truncation of the name in a future patch.

The tracepoint probe was already validating the length, but using a
static assert makes the error message clearer.

Introduce LTTNG_UST_TRACEPOINT_NAME_LEN_MAX which is separate from the
communication protocol's LTTNG_UST_ABI_SYM_NAME_LEN to ensure both
communication protocol and instrumentation API can evolve independently.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ia2e9898ef2f7a5708c692476aff7df6113bccb90


No differences found
This page took 0.024791 seconds and 4 git commands to generate.