1 #ifndef _LTTNG_FILTER_H
2 #define _LTTNG_FILTER_H
7 * LTTng UST filter header.
9 * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; only
14 * version 2.1 of the License.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this library; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
29 #include <lttng/ust-events.h>
35 #include <usterr-signal-safe.h>
36 #include "filter-bytecode.h"
41 #define min_t(type, a, b) \
42 ((type) (a) < (type) (b) ? (type) (a) : (type) (b))
46 #define likely(x) __builtin_expect(!!(x), 1)
50 #define unlikely(x) __builtin_expect(!!(x), 0)
54 #define dbg_printf(fmt, args...) printf("[debug bytecode] " fmt, ## args)
56 #define dbg_printf(fmt, args...) \
58 /* do nothing but check printf format */ \
60 printf("[debug bytecode] " fmt, ## args); \
65 struct bytecode_runtime
{
77 /* Validation registers */
80 int literal
; /* is string literal ? */
83 /* Execution registers */
91 int literal
; /* is string literal ? */
94 const char *print_op(enum filter_op op
);
96 int lttng_filter_validate_bytecode(struct bytecode_runtime
*bytecode
);
97 int lttng_filter_specialize_bytecode(struct bytecode_runtime
*bytecode
);
99 int lttng_filter_false(void *filter_data
,
100 const char *filter_stack_data
);
101 int lttng_filter_interpret_bytecode(void *filter_data
,
102 const char *filter_stack_data
);
104 #endif /* _LTTNG_FILTER_H */
This page took 0.032434 seconds and 5 git commands to generate.