LTTng control library C API
Loading...
Searching...
No Matches
kernel-probe.h
1/*
2 * SPDX-FileCopyrightText: 2020 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 *
6 */
7
8#ifndef LTTNG_KERNEL_PROBE_H
9#define LTTNG_KERNEL_PROBE_H
10
11#include <lttng/lttng-export.h>
12
13#include <stdint.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
32
44
62
76LTTNG_EXPORT extern enum lttng_kernel_probe_location_type
78
90LTTNG_EXPORT extern void
92
117LTTNG_EXPORT extern struct lttng_kernel_probe_location *
118lttng_kernel_probe_location_symbol_create(const char *symbol_name, uint64_t offset);
119
145LTTNG_EXPORT extern const char *
147
172LTTNG_EXPORT extern enum lttng_kernel_probe_location_status
174 uint64_t *offset);
175
195LTTNG_EXPORT extern struct lttng_kernel_probe_location *
197
220LTTNG_EXPORT extern enum lttng_kernel_probe_location_status
222 uint64_t *address);
223
225
226#ifdef __cplusplus
227}
228#endif
229
230#endif /* LTTNG_KERNEL_PROBE_H */
void lttng_kernel_probe_location_destroy(struct lttng_kernel_probe_location *location)
Destroys the Linux kprobe location location.
lttng_kernel_probe_location_status
Return type of Linux kprobe location API functions.
Definition kernel-probe.h:37
enum lttng_kernel_probe_location_type lttng_kernel_probe_location_get_type(const struct lttng_kernel_probe_location *location)
Returns the type of the Linux kprobe location location.
enum lttng_kernel_probe_location_status lttng_kernel_probe_location_address_get_address(const struct lttng_kernel_probe_location *location, uint64_t *address)
Sets *address to the address within the kernel of the Linux kprobe location location.
struct lttng_kernel_probe_location * lttng_kernel_probe_location_symbol_create(const char *symbol_name, uint64_t offset)
Creates a Linux kprobe location at the offset offset bytes from the kernel symbol named symbol.
lttng_kernel_probe_location_type
Linux kprobe location type.
Definition kernel-probe.h:52
enum lttng_kernel_probe_location_status lttng_kernel_probe_location_symbol_get_offset(const struct lttng_kernel_probe_location *location, uint64_t *offset)
Sets *offset to the offset from symbol of the Linux kprobe location location.
struct lttng_kernel_probe_location * lttng_kernel_probe_location_address_create(uint64_t address)
Creates a Linux kprobe location at the address address bytes within the kernel.
const char * lttng_kernel_probe_location_symbol_get_name(const struct lttng_kernel_probe_location *location)
Returns the symbol name of the Linux kprobe location location.
@ LTTNG_KERNEL_PROBE_LOCATION_STATUS_INVALID
Unsatisfied precondition.
Definition kernel-probe.h:42
@ LTTNG_KERNEL_PROBE_LOCATION_STATUS_OK
Success.
Definition kernel-probe.h:39
@ LTTNG_KERNEL_PROBE_LOCATION_TYPE_UNKNOWN
Unknown (error).
Definition kernel-probe.h:60
@ LTTNG_KERNEL_PROBE_LOCATION_TYPE_ADDRESS
Address within the kernel.
Definition kernel-probe.h:57
@ LTTNG_KERNEL_PROBE_LOCATION_TYPE_SYMBOL_OFFSET
Offset from a named symbol.
Definition kernel-probe.h:54
Linux kprobe location (opaque type).