Andi Kleen | bd2a634 | 2015-12-01 17:00:58 -0800 | [diff] [blame] | 1 | #ifndef TRACEPOINT_DEFS_H |
| 2 | #define TRACEPOINT_DEFS_H 1 |
| 3 | |
| 4 | /* |
| 5 | * File can be included directly by headers who only want to access |
Vlastimil Babka | 20f6e03 | 2016-03-15 14:55:42 -0700 | [diff] [blame] | 6 | * tracepoint->key to guard out of line trace calls, or the definition of |
| 7 | * trace_print_flags{_u64}. Otherwise linux/tracepoint.h should be used. |
Andi Kleen | bd2a634 | 2015-12-01 17:00:58 -0800 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #include <linux/atomic.h> |
| 11 | #include <linux/static_key.h> |
| 12 | |
Vlastimil Babka | 20f6e03 | 2016-03-15 14:55:42 -0700 | [diff] [blame] | 13 | struct trace_print_flags { |
| 14 | unsigned long mask; |
| 15 | const char *name; |
| 16 | }; |
| 17 | |
| 18 | struct trace_print_flags_u64 { |
| 19 | unsigned long long mask; |
| 20 | const char *name; |
| 21 | }; |
| 22 | |
Andi Kleen | bd2a634 | 2015-12-01 17:00:58 -0800 | [diff] [blame] | 23 | struct tracepoint_func { |
| 24 | void *func; |
| 25 | void *data; |
| 26 | int prio; |
| 27 | }; |
| 28 | |
| 29 | struct tracepoint { |
| 30 | const char *name; /* Tracepoint name */ |
| 31 | struct static_key key; |
| 32 | void (*regfunc)(void); |
| 33 | void (*unregfunc)(void); |
| 34 | struct tracepoint_func __rcu *funcs; |
| 35 | }; |
| 36 | |
| 37 | #endif |