SoW-2019-0002: Dynamic Snapshot
[lttng-tools.git] / include / lttng / event-rule / event-rule.h
CommitLineData
1831ae68
FD
1/*
2 * Copyright (C) 2019 - Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
3 *
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.
7 *
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
11 * for more details.
12 *
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
16 */
17
18#ifndef LTTNG_EVENT_RULE_H
19#define LTTNG_EVENT_RULE_H
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25struct lttng_event_rule;
26
27enum 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,
34};
35
36
37enum 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,
44};
45
46/**
47 * Event rule describe a set of criteria to be used as a discriminant in regards
48 * to a set of events.
49 *
50 * Event rule have the following base properties:
51 * - the instrumentation type for the event rule,
52 * - tracepoint
53 * - syscall
54 * - probe
55 * - userspace-probe
56 * - the domain the event rule covers.
57 */
58
59/*
60 * Get the event rule type.
61 *
62 * Returns the type of an event rule on success, LTTNG_EVENT_RULE_UNKNOWN on
63 * error.
64 */
65extern enum lttng_event_rule_type lttng_event_rule_get_type(
66 const struct lttng_event_rule *event_rule);
67
68/*
69 * Destroy (release) a event_rule object.
70 */
71extern void lttng_event_rule_destroy(struct lttng_event_rule *rule);
72
73#ifdef __cplusplus
74}
75#endif
76
77#endif /* LTTNG_EVENT_RULE_H */
This page took 0.02588 seconds and 5 git commands to generate.