X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=liblttng-ust%2Flttng-filter.c;h=1a0921fd72ac0ca78b4cc7c3f08667ab5767c300;hb=94c9c48da8ea6424c01d17409cc6788f7ea70450;hp=d5b2e2077a8aad11d211c7680c6b153ecde2a167;hpb=97b58163ffe6cced54c3d37ae79d4113a9d26455;p=lttng-ust.git diff --git a/liblttng-ust/lttng-filter.c b/liblttng-ust/lttng-filter.c index d5b2e207..1a0921fd 100644 --- a/liblttng-ust/lttng-filter.c +++ b/liblttng-ust/lttng-filter.c @@ -71,6 +71,20 @@ static const char *opnames[] = { [ FILTER_OP_GE_DOUBLE ] = "GE_DOUBLE", [ FILTER_OP_LE_DOUBLE ] = "LE_DOUBLE", + /* Mixed S64-double binary comparators */ + [ FILTER_OP_EQ_DOUBLE_S64 ] = "EQ_DOUBLE_S64", + [ FILTER_OP_NE_DOUBLE_S64 ] = "NE_DOUBLE_S64", + [ FILTER_OP_GT_DOUBLE_S64 ] = "GT_DOUBLE_S64", + [ FILTER_OP_LT_DOUBLE_S64 ] = "LT_DOUBLE_S64", + [ FILTER_OP_GE_DOUBLE_S64 ] = "GE_DOUBLE_S64", + [ FILTER_OP_LE_DOUBLE_S64 ] = "LE_DOUBLE_S64", + + [ FILTER_OP_EQ_S64_DOUBLE ] = "EQ_S64_DOUBLE", + [ FILTER_OP_NE_S64_DOUBLE ] = "NE_S64_DOUBLE", + [ FILTER_OP_GT_S64_DOUBLE ] = "GT_S64_DOUBLE", + [ FILTER_OP_LT_S64_DOUBLE ] = "LT_S64_DOUBLE", + [ FILTER_OP_GE_S64_DOUBLE ] = "GE_S64_DOUBLE", + [ FILTER_OP_LE_S64_DOUBLE ] = "LE_S64_DOUBLE", /* unary */ [ FILTER_OP_UNARY_PLUS ] = "UNARY_PLUS", @@ -170,7 +184,7 @@ int apply_field_reloc(struct ltt_event *event, return -EINVAL; /* Check if field offset is too large for 16-bit offset */ - if (field_offset > FILTER_BYTECODE_MAX_LEN) + if (field_offset > FILTER_BYTECODE_MAX_LEN - 1) return -EINVAL; /* set type */ @@ -277,7 +291,7 @@ void lttng_filter_event_link_bytecode(struct ltt_event *event, ret = _lttng_filter_event_link_bytecode(event, filter_bytecode); if (ret) { - fprintf(stderr, "[lttng filter] error linking event bytecode\n"); + dbg_printf("[lttng filter] warning: cannot link event bytecode\n"); } } @@ -301,7 +315,7 @@ void lttng_filter_wildcard_link_bytecode(struct session_wildcard *wildcard) ret = _lttng_filter_event_link_bytecode(event, wildcard->filter_bytecode); if (ret) { - fprintf(stderr, "[lttng filter] error linking wildcard bytecode\n"); + dbg_printf("[lttng filter] error linking wildcard bytecode"); } }