Implement per-context filtering
[lttng-tools.git] / src / lib / lttng-ctl / filter / filter-bytecode.h
index 06dace84c7dbadc514763bf472502a21248ae2c4..b9991284f636c3c0f82af1e9f7863fedacd2bd74 100644 (file)
 struct field_ref {
        /* Initially, symbol offset. After link, field offset. */
        uint16_t offset;
-} __attribute__((packed));
+} LTTNG_PACKED;
 
 struct literal_numeric {
        int64_t v;
-} __attribute__((packed));
+} LTTNG_PACKED;
 
 struct literal_double {
        double v;
-} __attribute__((packed));
+} LTTNG_PACKED;
 
 struct literal_string {
        char string[0];
-} __attribute__((packed));
+} LTTNG_PACKED;
 
 enum filter_op {
        FILTER_OP_UNKNOWN                       = 0,
@@ -126,13 +126,14 @@ enum filter_op {
        FILTER_OP_AND                           = 57,
        FILTER_OP_OR                            = 58,
 
-       /* load */
+       /* load field ref */
        FILTER_OP_LOAD_FIELD_REF                = 59,
        FILTER_OP_LOAD_FIELD_REF_STRING         = 60,
        FILTER_OP_LOAD_FIELD_REF_SEQUENCE       = 61,
        FILTER_OP_LOAD_FIELD_REF_S64            = 62,
        FILTER_OP_LOAD_FIELD_REF_DOUBLE         = 63,
 
+       /* load immediate from operand */
        FILTER_OP_LOAD_STRING                   = 64,
        FILTER_OP_LOAD_S64                      = 65,
        FILTER_OP_LOAD_DOUBLE                   = 66,
@@ -142,6 +143,12 @@ enum filter_op {
        FILTER_OP_CAST_DOUBLE_TO_S64            = 68,
        FILTER_OP_CAST_NOP                      = 69,
 
+       /* get context ref */
+       FILTER_OP_GET_CONTEXT_REF               = 70,
+       FILTER_OP_GET_CONTEXT_REF_STRING        = 71,
+       FILTER_OP_GET_CONTEXT_REF_S64           = 72,
+       FILTER_OP_GET_CONTEXT_REF_DOUBLE        = 73,
+
        NR_FILTER_OPS,
 };
 
@@ -151,29 +158,29 @@ struct load_op {
        filter_opcode_t op;
        char data[0];
        /* data to load. Size known by enum filter_opcode and null-term char. */
-} __attribute__((packed));
+} LTTNG_PACKED;
 
 struct binary_op {
        filter_opcode_t op;
-} __attribute__((packed));
+} LTTNG_PACKED;
 
 struct unary_op {
        filter_opcode_t op;
-} __attribute__((packed));
+} LTTNG_PACKED;
 
 /* skip_offset is absolute from start of bytecode */
 struct logical_op {
        filter_opcode_t op;
        uint16_t skip_offset;   /* bytecode insn, if skip second test */
-} __attribute__((packed));
+} LTTNG_PACKED;
 
 struct cast_op {
        filter_opcode_t op;
-} __attribute__((packed));
+} LTTNG_PACKED;
 
 struct return_op {
        filter_opcode_t op;
-} __attribute__((packed));
+} LTTNG_PACKED;
 
 struct lttng_filter_bytecode_alloc {
        uint32_t alloc_len;
This page took 0.025616 seconds and 5 git commands to generate.