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