2 * Copyright (C) 2019 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #ifndef LTTNG_EVENT_RULE_KPROBE_H
9 #define LTTNG_EVENT_RULE_KPROBE_H
11 #include <lttng/event-rule/event-rule.h>
18 * Create a newly allocated kprobe event rule.
20 * Returns a new event rule on success, NULL on failure. The returned event rule
21 * must be destroyed using lttng_event_rule_destroy().
23 extern struct lttng_event_rule
*lttng_event_rule_kprobe_create(void);
26 * Set the source of a kprobe event rule.
28 * Possible formats for the source argument:
29 * Address (0x prefix supported)
31 * Symbol name and offset (SYMBOL+OFFSET format)
33 * Return LTTNG_EVENT_RULE_STATUS_OK on success, LTTNG_EVENT_RULE_STATUS_INVALID
34 * if invalid parameters are passed.
36 extern enum lttng_event_rule_status
lttng_event_rule_kprobe_set_source(
37 struct lttng_event_rule
*rule
, const char *source
);
40 * Set the name of a kprobe event rule.
42 * The name is copied internally.
44 * Return LTTNG_EVENT_RULE_STATUS_OK on success, LTTNG_EVENT_RULE_STATUS_INVALID
45 * if invalid parameters are passed.
47 extern enum lttng_event_rule_status
lttng_event_rule_kprobe_set_name(
48 struct lttng_event_rule
*rule
, const char *name
);
51 * Get the name of a kprobe event rule.
53 * The caller does not assume the ownership of the returned name.
54 * The name shall only only be used for the duration of the event
55 * rule's lifetime, or before a different name is set.
57 * Returns LTTNG_EVENT_RULE_STATUS_OK and a pointer to the event rule's name on
58 * success, LTTNG_EVENT_RULE_STATUS_INVALID if an invalid parameter is passed,
59 * or LTTNG_EVENT_RULE_STATUS_UNSET if a name was not set prior to this call.
61 extern enum lttng_event_rule_status
lttng_event_rule_kprobe_get_name(
62 const struct lttng_event_rule
*rule
, const char **name
);
68 #endif /* LTTNG_EVENT_RULE_KPROBE_H */
This page took 0.036721 seconds and 5 git commands to generate.