X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-filter-specialize.c;h=39730f8cd954a0428ff419fe1d9114a70caf7a33;hb=8306baea3da8b1f429e14218b1ef7413ee56ed19;hp=6de25047787d2b09954d1ce88815f53988463cea;hpb=0039e2d8d79c3260d29591fc10a07d57bcc535b3;p=lttng-ust.git diff --git a/liblttng-ust/lttng-filter-specialize.c b/liblttng-ust/lttng-filter-specialize.c index 6de25047..39730f8c 100644 --- a/liblttng-ust/lttng-filter-specialize.c +++ b/liblttng-ust/lttng-filter-specialize.c @@ -25,6 +25,9 @@ */ #define _LGPL_SOURCE +#include +#include + #include "lttng-filter.h" #include @@ -422,7 +425,7 @@ static int specialize_load_object(const struct lttng_event_field *field, break; case atype_dynamic: load->object_type = OBJECT_TYPE_DYNAMIC; - return -EINVAL; + break; case atype_struct: ERR("Structure type cannot be loaded."); return -EINVAL; @@ -621,6 +624,17 @@ int lttng_filter_specialize_bytecode(struct lttng_event *event, goto end; case FILTER_OP_RETURN: + if (vstack_ax(stack)->type == REG_S64) + *(filter_opcode_t *) pc = FILTER_OP_RETURN_S64; + ret = 0; + goto end; + + case FILTER_OP_RETURN_S64: + if (vstack_ax(stack)->type != REG_S64) { + ERR("Unexpected register type\n"); + ret = -EINVAL; + goto end; + } ret = 0; goto end;