| 1 | // SPDX-FileCopyrightText: 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
| 2 | // |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | |
| 5 | #ifndef _LTTNG_UST_TRACEPOINT_TYPES_H |
| 6 | #define _LTTNG_UST_TRACEPOINT_TYPES_H |
| 7 | |
| 8 | #include <stdint.h> |
| 9 | |
| 10 | /* |
| 11 | * Tracepoint probe definition |
| 12 | * |
| 13 | * IMPORTANT: this structure is part of the ABI between instrumented |
| 14 | * applications and UST. This structure is fixed-size because it is part |
| 15 | * of a public array of structures. Rather than extending this |
| 16 | * structure, struct lttng_ust_tracepoint should be extended instead. |
| 17 | */ |
| 18 | |
| 19 | struct lttng_ust_tracepoint_probe { |
| 20 | void (*func)(void); |
| 21 | void *data; |
| 22 | }; |
| 23 | |
| 24 | /* |
| 25 | * Tracepoint definition |
| 26 | * |
| 27 | * IMPORTANT: this structure is part of the ABI between instrumented |
| 28 | * applications and UST. Fields need to be only added at the end, never |
| 29 | * reordered, never removed. |
| 30 | * |
| 31 | * The field @struct_size should be used to determine the size of the |
| 32 | * structure. It should be queried before using additional fields added |
| 33 | * at the end of the structure. |
| 34 | */ |
| 35 | |
| 36 | struct lttng_ust_tracepoint { |
| 37 | uint32_t struct_size; |
| 38 | |
| 39 | const char *provider_name; |
| 40 | const char *event_name; |
| 41 | int state; |
| 42 | struct lttng_ust_tracepoint_probe *probes; |
| 43 | int *tracepoint_provider_ref; |
| 44 | const char *signature; |
| 45 | |
| 46 | /* End of base ABI. Fields below should be used after checking struct_size. */ |
| 47 | }; |
| 48 | |
| 49 | #endif /* _LTTNG_UST_TRACEPOINT_TYPES_H */ |