*/
#include "filter-ast.h"
+#include "../../common/sessiond-comm/sessiond-comm.h"
/*
* offsets are absolute from start of bytecode.
REG_ERROR,
};
-enum field_ref_type {
- FIELD_REF_UNKNOWN = 0,
- FIELD_REF_STRING,
- FIELD_REF_SEQUENCE,
- FIELD_REF_S64,
-};
-
struct field_ref {
/* Initially, symbol offset. After link, field offset. */
uint16_t offset;
- uint8_t type; /* enum field_ref_type */
} __attribute__((packed));
struct literal_numeric {
int64_t v;
} __attribute__((packed));
+struct literal_double {
+ double v;
+} __attribute__((packed));
+
struct literal_string {
char string[0];
} __attribute__((packed));
/* load */
FILTER_OP_LOAD_FIELD_REF,
+ FILTER_OP_LOAD_FIELD_REF_STRING,
+ FILTER_OP_LOAD_FIELD_REF_SEQUENCE,
+ FILTER_OP_LOAD_FIELD_REF_S64,
+ FILTER_OP_LOAD_FIELD_REF_DOUBLE,
+
FILTER_OP_LOAD_STRING,
FILTER_OP_LOAD_S64,
+ FILTER_OP_LOAD_DOUBLE,
NR_FILTER_OPS,
};
filter_opcode_t op;
} __attribute__((packed));
-/*
- * The reloc table is located at the end of the bytecode. It is made of
- * tuples: (uint16_t, var. len. string). It starts at
- * reloc_table_offset.
- */
-struct filter_bytecode {
- uint16_t len;
- uint16_t reloc_table_offset;
- char data[0];
-};
-
-struct filter_bytecode_alloc {
+struct lttng_filter_bytecode_alloc {
uint16_t alloc_len;
- struct filter_bytecode b;
+ struct lttng_filter_bytecode b;
};
static inline
-unsigned int bytecode_get_len(struct filter_bytecode *bytecode)
+unsigned int bytecode_get_len(struct lttng_filter_bytecode *bytecode)
{
return bytecode->len;
}