[ FILTER_OP_MOD ] = "MOD",
[ FILTER_OP_PLUS ] = "PLUS",
[ FILTER_OP_MINUS ] = "MINUS",
- [ FILTER_OP_RSHIFT ] = "RSHIFT",
- [ FILTER_OP_LSHIFT ] = "LSHIFT",
+ [ FILTER_OP_BIT_RSHIFT ] = "BIT_RSHIFT",
+ [ FILTER_OP_BIT_LSHIFT ] = "BIT_LSHIFT",
[ FILTER_OP_BIT_AND ] = "BIT_AND",
[ FILTER_OP_BIT_OR ] = "BIT_OR",
[ FILTER_OP_BIT_XOR ] = "BIT_XOR",
[ FILTER_OP_LOAD_FIELD_STRING ] = "LOAD_FIELD_STRING",
[ FILTER_OP_LOAD_FIELD_SEQUENCE ] = "LOAD_FIELD_SEQUENCE",
[ FILTER_OP_LOAD_FIELD_DOUBLE ] = "LOAD_FIELD_DOUBLE",
+
+ [ FILTER_OP_UNARY_BIT_NOT ] = "UNARY_BIT_NOT",
+
+ [ FILTER_OP_RETURN_S64 ] = "RETURN_S64",
};
const char *print_op(enum filter_op op)
op->op = FILTER_OP_LOAD_FIELD_REF_S64;
break;
case atype_array:
+ {
+ const struct lttng_basic_type *elem_type = &field->type.u.array.elem_type;
+
+ if (elem_type->atype != atype_integer || elem_type->u.basic.integer.encoding == lttng_encode_none)
+ return -EINVAL;
+ op->op = FILTER_OP_LOAD_FIELD_REF_SEQUENCE;
+ break;
+ }
case atype_sequence:
+ {
+ const struct lttng_basic_type *elem_type = &field->type.u.sequence.elem_type;
+
+ if (elem_type->atype != atype_integer || elem_type->u.basic.integer.encoding == lttng_encode_none)
+ return -EINVAL;
op->op = FILTER_OP_LOAD_FIELD_REF_SEQUENCE;
break;
+ }
case atype_string:
op->op = FILTER_OP_LOAD_FIELD_REF_STRING;
break;
op->op = FILTER_OP_GET_CONTEXT_REF_S64;
break;
/* Sequence and array supported as string */
- case atype_string:
case atype_array:
+ {
+ const struct lttng_basic_type *elem_type = &ctx_field->event_field.type.u.array.elem_type;
+
+ if (elem_type->atype != atype_integer || elem_type->u.basic.integer.encoding == lttng_encode_none)
+ return -EINVAL;
+ op->op = FILTER_OP_GET_CONTEXT_REF_STRING;
+ break;
+ }
case atype_sequence:
+ {
+ const struct lttng_basic_type *elem_type = &ctx_field->event_field.type.u.sequence.elem_type;
+
+ if (elem_type->atype != atype_integer || elem_type->u.basic.integer.encoding == lttng_encode_none)
+ return -EINVAL;
+ op->op = FILTER_OP_GET_CONTEXT_REF_STRING;
+ break;
+ }
+ case atype_string:
op->op = FILTER_OP_GET_CONTEXT_REF_STRING;
break;
case atype_float: