blob: 64ed7064f1fa6510ed8b8611fd1f0d90ad33c6ad [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Andi Kleenbd2a6342015-12-01 17:00:58 -08002#ifndef TRACEPOINT_DEFS_H
3#define TRACEPOINT_DEFS_H 1
4
5/*
6 * File can be included directly by headers who only want to access
Vlastimil Babka20f6e032016-03-15 14:55:42 -07007 * tracepoint->key to guard out of line trace calls, or the definition of
8 * trace_print_flags{_u64}. Otherwise linux/tracepoint.h should be used.
Andi Kleenbd2a6342015-12-01 17:00:58 -08009 */
10
11#include <linux/atomic.h>
12#include <linux/static_key.h>
13
Vlastimil Babka20f6e032016-03-15 14:55:42 -070014struct trace_print_flags {
15 unsigned long mask;
16 const char *name;
17};
18
19struct trace_print_flags_u64 {
20 unsigned long long mask;
21 const char *name;
22};
23
Andi Kleenbd2a6342015-12-01 17:00:58 -080024struct tracepoint_func {
25 void *func;
26 void *data;
27 int prio;
28};
29
30struct tracepoint {
31 const char *name; /* Tracepoint name */
32 struct static_key key;
Steven Rostedt (Red Hat)8cf868a2016-11-28 13:03:21 -050033 int (*regfunc)(void);
Andi Kleenbd2a6342015-12-01 17:00:58 -080034 void (*unregfunc)(void);
35 struct tracepoint_func __rcu *funcs;
36};
37
38#endif