+void print_one_event_expr(const struct lttng_event_expr *event_expr)
+{
+ enum lttng_event_expr_type type;
+
+ type = lttng_event_expr_get_type(event_expr);
+
+ switch (type) {
+ case LTTNG_EVENT_EXPR_TYPE_EVENT_PAYLOAD_FIELD:
+ {
+ const char *name;
+
+ name = lttng_event_expr_event_payload_field_get_name(
+ event_expr);
+ _MSG("%s", name);
+
+ break;
+ }
+ case LTTNG_EVENT_EXPR_TYPE_CHANNEL_CONTEXT_FIELD:
+ {
+ const char *name;
+
+ name = lttng_event_expr_channel_context_field_get_name(
+ event_expr);
+ _MSG("$ctx.%s", name);
+
+ break;
+ }
+ case LTTNG_EVENT_EXPR_TYPE_APP_SPECIFIC_CONTEXT_FIELD:
+ {
+ const char *provider_name;
+ const char *type_name;
+
+ provider_name = lttng_event_expr_app_specific_context_field_get_provider_name(
+ event_expr);
+ type_name = lttng_event_expr_app_specific_context_field_get_type_name(
+ event_expr);
+
+ _MSG("$app.%s:%s", provider_name, type_name);
+
+ break;
+ }
+ case LTTNG_EVENT_EXPR_TYPE_ARRAY_FIELD_ELEMENT:
+ {
+ unsigned int index;
+ const struct lttng_event_expr *parent_expr;
+ enum lttng_event_expr_status status;
+
+ parent_expr = lttng_event_expr_array_field_element_get_parent_expr(
+ event_expr);
+ assert(parent_expr != NULL);
+
+ print_one_event_expr(parent_expr);
+
+ status = lttng_event_expr_array_field_element_get_index(
+ event_expr, &index);
+ assert(status == LTTNG_EVENT_EXPR_STATUS_OK);
+
+ _MSG("[%u]", index);
+
+ break;
+ }
+ default:
+ abort();
+ }
+}
+
+static
+void print_condition_on_event(const struct lttng_condition *condition)