Filter: add floating point support
[lttng-tools.git] / src / lib / lttng-ctl / filter-bytecode.h
index fc2d6c8d4c5cf78f8e9965673040b112c6d5bbc8..07cf99b2dcd46f8f06423046857dcd193812c117 100644 (file)
@@ -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;
 }
This page took 0.023637 seconds and 4 git commands to generate.