Extract synchronize tracer notifier functions
[lttng-tools.git] / src / common / evaluation.c
index b76d349fa40526225d9b7199a0d919955a1d8bfb..2b06be614a73ddc788987b7ce711bf19e8cef6df 100644 (file)
@@ -5,10 +5,12 @@
  *
  */
 
+#include <lttng/condition/condition-internal.h>
 #include <lttng/condition/evaluation-internal.h>
 #include <lttng/condition/buffer-usage-internal.h>
 #include <lttng/condition/session-consumed-size-internal.h>
 #include <lttng/condition/session-rotation-internal.h>
+#include <lttng/condition/on-event-internal.h>
 #include <common/macros.h>
 #include <common/error.h>
 #include <stdbool.h>
@@ -48,6 +50,7 @@ end:
 
 LTTNG_HIDDEN
 ssize_t lttng_evaluation_create_from_payload(
+               const struct lttng_condition *condition,
                struct lttng_payload_view *src_view,
                struct lttng_evaluation **evaluation)
 {
@@ -114,6 +117,19 @@ ssize_t lttng_evaluation_create_from_payload(
                }
                evaluation_size += ret;
                break;
+       case LTTNG_CONDITION_TYPE_ON_EVENT:
+               assert(condition);
+               assert(condition->type == LTTNG_CONDITION_TYPE_ON_EVENT);
+               ret = lttng_evaluation_on_event_create_from_payload(
+                               container_of(condition,
+                                               const struct lttng_condition_on_event,
+                                               parent),
+                               &evaluation_view, evaluation);
+               if (ret < 0) {
+                       goto end;
+               }
+               evaluation_size += ret;
+               break;
        default:
                ERR("Attempted to create evaluation of unknown type (%i)",
                                (int) evaluation_comm->type);
This page took 0.024624 seconds and 4 git commands to generate.