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,
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,
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,
};
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;