From: Philippe Proulx Date: Tue, 31 Mar 2020 01:23:25 +0000 (-0400) Subject: lttng-ctl: add event expression API X-Git-Tag: v2.13.0-rc1~270 X-Git-Url: https://git.lttng.org/?a=commitdiff_plain;h=48c475643635d97d56fc251ca0b54e67ff25a51f;hp=48c475643635d97d56fc251ca0b54e67ff25a51f;p=lttng-tools.git 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 Signed-off-by: Jérémie Galarneau Change-Id: I34770fa8900f0bfb90bb2cbf4a7de59a1645b738 Depends-on: lttng-ust: I5a800fc92e588c2a6a0e26282b0ad5f31c044479 ---