mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-13 21:56:47 +07:00
8cf868affd
Some tracepoints have a registration function that gets enabled when the tracepoint is enabled. There may be cases that the registraction function must fail (for example, can't allocate enough memory). In this case, the tracepoint should also fail to register, otherwise the user would not know why the tracepoint is not working. Cc: David Howells <dhowells@redhat.com> Cc: Seiji Aguchi <seiji.aguchi@hds.com> Cc: Anton Blanchard <anton@samba.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
38 lines
739 B
C
38 lines
739 B
C
#ifndef TRACEPOINT_DEFS_H
|
|
#define TRACEPOINT_DEFS_H 1
|
|
|
|
/*
|
|
* File can be included directly by headers who only want to access
|
|
* tracepoint->key to guard out of line trace calls, or the definition of
|
|
* trace_print_flags{_u64}. Otherwise linux/tracepoint.h should be used.
|
|
*/
|
|
|
|
#include <linux/atomic.h>
|
|
#include <linux/static_key.h>
|
|
|
|
struct trace_print_flags {
|
|
unsigned long mask;
|
|
const char *name;
|
|
};
|
|
|
|
struct trace_print_flags_u64 {
|
|
unsigned long long mask;
|
|
const char *name;
|
|
};
|
|
|
|
struct tracepoint_func {
|
|
void *func;
|
|
void *data;
|
|
int prio;
|
|
};
|
|
|
|
struct tracepoint {
|
|
const char *name; /* Tracepoint name */
|
|
struct static_key key;
|
|
int (*regfunc)(void);
|
|
void (*unregfunc)(void);
|
|
struct tracepoint_func __rcu *funcs;
|
|
};
|
|
|
|
#endif
|