2 * Copyright (C) 2019 - Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License, version 2.1 only,
6 * as published by the Free Software Foundation.
8 * This library is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library; if not, write to the Free Software Foundation,
15 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 #ifndef LTTNG_EVENT_RULE_H
19 #define LTTNG_EVENT_RULE_H
25 struct lttng_event_rule
;
27 enum lttng_event_rule_type
{
28 LTTNG_EVENT_RULE_TYPE_UNKNOWN
= -1,
29 LTTNG_EVENT_RULE_TYPE_TRACEPOINT
= 100,
30 LTTNG_EVENT_RULE_TYPE_SYSCALL
= 101,
31 LTTNG_EVENT_RULE_TYPE_KPROBE
= 102,
32 LTTNG_EVENT_RULE_TYPE_KRETPROBE
= 103,
33 LTTNG_EVENT_RULE_TYPE_UPROBE
= 104,
37 enum lttng_event_rule_status
{
38 LTTNG_EVENT_RULE_STATUS_OK
= 0,
39 LTTNG_EVENT_RULE_STATUS_ERROR
= -1,
40 LTTNG_EVENT_RULE_STATUS_UNKNOWN
= -2,
41 LTTNG_EVENT_RULE_STATUS_INVALID
= -3,
42 LTTNG_EVENT_RULE_STATUS_UNSET
= -4,
43 LTTNG_EVENT_RULE_STATUS_UNSUPPORTED
= -5,
47 * Event rule describe a set of criteria to be used as a discriminant in regards
50 * Event rule have the following base properties:
51 * - the instrumentation type for the event rule,
56 * - the domain the event rule covers.
60 * Get the event rule type.
62 * Returns the type of an event rule on success, LTTNG_EVENT_RULE_UNKNOWN on
65 extern enum lttng_event_rule_type
lttng_event_rule_get_type(
66 const struct lttng_event_rule
*event_rule
);
69 * Destroy (release) a event_rule object.
71 extern void lttng_event_rule_destroy(struct lttng_event_rule
*rule
);
77 #endif /* LTTNG_EVENT_RULE_H */