SoW-2019-0002: Dynamic Snapshot
[lttng-tools.git] / include / lttng / event-rule / kretprobe.h
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_KRETPROBE_H
19 #define LTTNG_EVENT_RULE_KRETPROBE_H
20
21 #include <lttng/event-rule/event-rule.h>
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 /*
28 * TODO:
29 */
30 extern struct lttng_event_rule *lttng_event_rule_kretprobe_create(void);
31
32 /*
33 * Set the source of a kretprobe event rule.
34 *
35 * TODO: list possible format
36 *
37 * Return LTTNG_EVENT_RULE_STATUS_OK on success, LTTNG_EVENT_RULE_STATUS_INVALID
38 * if invalid parameters are passed.
39 */
40 extern enum lttng_event_rule_status lttng_event_rule_kretprobe_set_source(
41 struct lttng_event_rule *rule, const char *source);
42
43 /*
44 * Set the name of a kretprobe event rule.
45 *
46 * The name is copied.
47 *
48 * Return LTTNG_EVENT_RULE_STATUS_OK on success, LTTNG_EVENT_RULE_STATUS_INVALID
49 * if invalid parameters are passed.
50 */
51 extern enum lttng_event_rule_status lttng_event_rule_kretprobe_set_name(
52 struct lttng_event_rule *rule, const char *name);
53
54 /*
55 * Get the name of a kretprobe event rule.
56 *
57 * The caller does not assume the ownership of the returned name.
58 * The name shall only only be used for the duration of the event
59 * rule's lifetime, or before a different name is set.
60 *
61 * Returns LTTNG_EVENT_RULE_STATUS_OK and a pointer to the event rule's name on
62 * success, LTTNG_EVENT_RULE_STATUS_INVALID if an invalid parameter is passed,
63 * or LTTNG_EVENT_RULE_STATUS_UNSET if a name was not set prior to this call.
64 */
65 extern enum lttng_event_rule_status lttng_event_rule_kretprobe_get_name(
66 const struct lttng_event_rule *rule, const char **name);
67
68 #ifdef __cplusplus
69 }
70 #endif
71
72 #endif /* LTTNG_EVENT_RULE_KRETPROBE_H */
This page took 0.044527 seconds and 5 git commands to generate.