X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fevaluation.c;h=6b59949e39f00c45d867cad761715a85dffef6c1;hb=a0377dfefe40662ba7d68617bce6ff467114136c;hp=b76d349fa40526225d9b7199a0d919955a1d8bfb;hpb=3e6e0df2f8f9f23d252c2508b6d741916dfcc4b3;p=lttng-tools.git diff --git a/src/common/evaluation.c b/src/common/evaluation.c index b76d349fa..6b59949e3 100644 --- a/src/common/evaluation.c +++ b/src/common/evaluation.c @@ -5,14 +5,15 @@ * */ +#include #include #include #include #include +#include #include #include #include -#include LTTNG_HIDDEN void lttng_evaluation_init(struct lttng_evaluation *evaluation, @@ -48,6 +49,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 +116,20 @@ ssize_t lttng_evaluation_create_from_payload( } evaluation_size += ret; break; + case LTTNG_CONDITION_TYPE_EVENT_RULE_MATCHES: + LTTNG_ASSERT(condition); + LTTNG_ASSERT(condition->type == + LTTNG_CONDITION_TYPE_EVENT_RULE_MATCHES); + ret = lttng_evaluation_event_rule_matches_create_from_payload( + container_of(condition, + const struct lttng_condition_event_rule_matches, + 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); @@ -138,6 +154,6 @@ void lttng_evaluation_destroy(struct lttng_evaluation *evaluation) return; } - assert(evaluation->destroy); + LTTNG_ASSERT(evaluation->destroy); evaluation->destroy(evaluation); }