lttng-ctl: add event expression API
This new API having the prefix `lttng_event_expr` makes it possible to
create event expressions.
An event expression is an expression which can be evaluated by an LTTng
when an event occurs. An LTTng event filter expression, for example, is
an event expression, although the current interface to specify an event
filter expression is to use the string version, while this new API
offers functions to build an expression tree.
Currently, the event expressions API offers functions to create the
following types of expressions:
Event payload field expression:
The named payload field of an event.
Equivalent CLI string example:
next_prio
Channel context field:
The named per-channel context field of an event.
Equivalent CLI string example:
$ctx.vpid
Application-specific context field:
The named application-specific context field of an event.
Equivalent CLI string example:
$app.iga:active-clients
Array field element:
The element of an array field.
Equivalent CLI string examples:
my_field[4]
$ctx.some_context[5]
The attentive reader will have discovered that you cannot create all the
expressions needed to create any supported filter expression. This is
because the goal of this patch is to pave the way for the capture
descriptor feature of notify trigger actions, which, for the moment,
only need the expressions above. However, the event expression API can
be extended to support all the filtering subexpressions in the future.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I34770fa8900f0bfb90bb2cbf4a7de59a1645b738
Depends-on: lttng-ust: I5a800fc92e588c2a6a0e26282b0ad5f31c044479
This page took 0.025898 seconds and 4 git commands to generate.