1 #ifndef _FILTER_BYTECODE_H
2 #define _FILTER_BYTECODE_H
7 * LTTng filter bytecode
9 * Copyright 2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 * This library is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU Lesser General Public License, version 2.1 only,
13 * as published by the Free Software Foundation.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this library; if not, write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 #include <lttng/ust-abi.h>
28 * offsets are absolute from start of bytecode.
31 enum filter_register
{
38 /* Initially, symbol offset. After link, field offset. */
40 } __attribute__((packed
));
42 struct literal_numeric
{
44 } __attribute__((packed
));
46 struct literal_double
{
48 } __attribute__((packed
));
50 struct literal_string
{
52 } __attribute__((packed
));
55 FILTER_OP_UNKNOWN
= 0,
79 FILTER_OP_UNARY_MINUS
,
87 FILTER_OP_LOAD_FIELD_REF
,
88 FILTER_OP_LOAD_FIELD_REF_STRING
,
89 FILTER_OP_LOAD_FIELD_REF_SEQUENCE
,
90 FILTER_OP_LOAD_FIELD_REF_S64
,
91 FILTER_OP_LOAD_FIELD_REF_DOUBLE
,
93 FILTER_OP_LOAD_STRING
,
95 FILTER_OP_LOAD_DOUBLE
,
100 typedef uint8_t filter_opcode_t
;
104 uint8_t reg
; /* enum filter_register */
106 /* data to load. Size known by enum filter_opcode and null-term char. */
107 } __attribute__((packed
));
111 } __attribute__((packed
));
115 uint8_t reg
; /* enum filter_register */
116 } __attribute__((packed
));
118 /* skip_offset is absolute from start of bytecode */
121 uint16_t skip_offset
; /* bytecode insn, if skip second test */
122 } __attribute__((packed
));
126 } __attribute__((packed
));
128 #endif /* _FILTER_BYTECODE_H */