#include <lttng/condition/condition-internal.h>
#include <lttng/condition/buffer-usage-internal.h>
-#include <lttng/condition/event-rule-internal.h>
+#include <lttng/condition/on-event-internal.h>
#include <lttng/condition/session-consumed-size-internal.h>
#include <lttng/condition/session-rotation-internal.h>
#include <common/macros.h>
case LTTNG_CONDITION_TYPE_SESSION_ROTATION_COMPLETED:
create_from_payload = lttng_condition_session_rotation_completed_create_from_payload;
break;
- case LTTNG_CONDITION_TYPE_EVENT_RULE_HIT:
- create_from_payload = lttng_condition_event_rule_create_from_payload;
+ case LTTNG_CONDITION_TYPE_ON_EVENT:
+ create_from_payload = lttng_condition_on_event_create_from_payload;
break;
default:
ERR("Attempted to create condition of unknown type (%i)",
condition->type = type;
urcu_ref_init(&condition->ref);
}
+
+LTTNG_HIDDEN
+const char *lttng_condition_type_str(enum lttng_condition_type type)
+{
+ switch (type) {
+ case LTTNG_CONDITION_TYPE_UNKNOWN:
+ return "unknown";
+
+ case LTTNG_CONDITION_TYPE_SESSION_CONSUMED_SIZE:
+ return "session consumed size";
+
+ case LTTNG_CONDITION_TYPE_BUFFER_USAGE_HIGH:
+ return "buffer usage high";
+
+ case LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW:
+ return "buffer usage low";
+
+ case LTTNG_CONDITION_TYPE_SESSION_ROTATION_ONGOING:
+ return "session rotation ongoing";
+
+ case LTTNG_CONDITION_TYPE_SESSION_ROTATION_COMPLETED:
+ return "session rotation completed";
+
+ case LTTNG_CONDITION_TYPE_ON_EVENT:
+ return "event rule hit";
+
+ default:
+ return "???";
+ }
+}