+
+ condition_status
+ = lttng_condition_on_event_get_capture_descriptor_count(
+ condition, &cap_desc_count);
+ assert(condition_status == LTTNG_CONDITION_STATUS_OK);
+
+ error_count = lttng_condition_on_event_get_error_count(condition);
+ MSG(" tracer notifications discarded: %ld", error_count);
+
+ if (cap_desc_count > 0) {
+ MSG(" captures:");
+
+ for (i = 0; i < cap_desc_count; i++) {
+ const struct lttng_event_expr *cap_desc =
+ lttng_condition_on_event_get_capture_descriptor_at_index(
+ condition, i);
+
+ _MSG(" - ");
+ print_one_event_expr(cap_desc);
+ MSG("");
+ }
+ }
+}
+
+static
+void print_map_key(const struct lttng_map_key *key)
+{
+ unsigned int i, token_count;
+ enum lttng_map_key_status key_status;
+
+ _MSG(" key: `");
+ key_status = lttng_map_key_get_token_count(key, &token_count);
+ assert(key_status == LTTNG_MAP_KEY_STATUS_OK);
+
+ for (i = 0; i < token_count; i++) {
+ const struct lttng_map_key_token *token =
+ lttng_map_key_get_token_at_index(key, i);
+ assert(token);
+
+ switch (token->type) {
+ case LTTNG_MAP_KEY_TOKEN_TYPE_STRING:
+ {
+ const struct lttng_map_key_token_string *str_token;
+ str_token = (typeof(str_token)) token;
+ _MSG("%s", str_token->string);
+ break;
+ }
+ case LTTNG_MAP_KEY_TOKEN_TYPE_VARIABLE:
+ {
+ const struct lttng_map_key_token_variable *var_token;
+ var_token = (typeof(var_token)) token;
+
+ switch (var_token->type) {
+ case LTTNG_MAP_KEY_TOKEN_VARIABLE_TYPE_EVENT_NAME:
+ _MSG("${EVENT_NAME}");
+ break;
+ case LTTNG_MAP_KEY_TOKEN_VARIABLE_TYPE_PROVIDER_NAME:
+ _MSG("${PROVIDER_NAME}");
+ break;
+ default:
+ abort();
+ }
+
+ break;
+ }
+ default:
+ abort();
+ }
+ }
+ MSG("`");
+}
+
+static
+void print_one_incr_value_action(const struct lttng_action *action)
+{
+ enum lttng_action_status action_status;
+ const char *session_name, *map_name;
+ const struct lttng_map_key *key;
+
+ action_status = lttng_action_incr_value_get_session_name(
+ action, &session_name);
+ assert(action_status == LTTNG_ACTION_STATUS_OK);
+
+ action_status = lttng_action_incr_value_get_map_name(
+ action, &map_name);
+ assert(action_status == LTTNG_ACTION_STATUS_OK);
+
+ action_status = lttng_action_incr_value_get_key(
+ action, &key);
+ assert(action_status == LTTNG_ACTION_STATUS_OK);
+
+ MSG("increment value:");
+ MSG(" session: `%s`", session_name);
+ MSG(" map: `%s`", map_name);
+ print_map_key(key);