lttng-ctl: add event expression API
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 31 Mar 2020 01:23:25 +0000 (21:23 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 5 Mar 2021 19:39:08 +0000 (14:39 -0500)
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


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