X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Ffilter-bytecode.h;h=07cf99b2dcd46f8f06423046857dcd193812c117;hp=fc2d6c8d4c5cf78f8e9965673040b112c6d5bbc8;hb=e90d856165cc1110ac0d4c657a001c47236d6de8;hpb=953192ba6eb2118c22bcfcb4bcd813f141b407e7 diff --git a/src/lib/lttng-ctl/filter-bytecode.h b/src/lib/lttng-ctl/filter-bytecode.h index fc2d6c8d4..07cf99b2d 100644 --- a/src/lib/lttng-ctl/filter-bytecode.h +++ b/src/lib/lttng-ctl/filter-bytecode.h @@ -23,6 +23,7 @@ */ #include "filter-ast.h" +#include "../../common/sessiond-comm/sessiond-comm.h" /* * offsets are absolute from start of bytecode. @@ -39,6 +40,7 @@ enum field_ref_type { FIELD_REF_STRING, FIELD_REF_SEQUENCE, FIELD_REF_S64, + FIELD_REF_DOUBLE, }; struct field_ref { @@ -51,6 +53,10 @@ struct literal_numeric { int64_t v; } __attribute__((packed)); +struct literal_double { + double v; +} __attribute__((packed)); + struct literal_string { char string[0]; } __attribute__((packed)); @@ -91,6 +97,7 @@ enum filter_op { FILTER_OP_LOAD_FIELD_REF, FILTER_OP_LOAD_STRING, FILTER_OP_LOAD_S64, + FILTER_OP_LOAD_DOUBLE, NR_FILTER_OPS, }; @@ -123,24 +130,13 @@ struct return_op { 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; }