xref: /linux/include/linux/trace.h (revision fcc8487d477a3452a1d0ccbdd4c5e0e1e3cb8bed)
1 #ifndef _LINUX_TRACE_H
2 #define _LINUX_TRACE_H
3 
4 #ifdef CONFIG_TRACING
5 /*
6  * The trace export - an export of Ftrace output. The trace_export
7  * can process traces and export them to a registered destination as
8  * an addition to the current only output of Ftrace - i.e. ring buffer.
9  *
10  * If you want traces to be sent to some other place rather than ring
11  * buffer only, just need to register a new trace_export and implement
12  * its own .write() function for writing traces to the storage.
13  *
14  * next		- pointer to the next trace_export
15  * write	- copy traces which have been delt with ->commit() to
16  *		  the destination
17  */
18 struct trace_export {
19 	struct trace_export __rcu	*next;
20 	void (*write)(const void *, unsigned int);
21 };
22 
23 int register_ftrace_export(struct trace_export *export);
24 int unregister_ftrace_export(struct trace_export *export);
25 
26 #endif	/* CONFIG_TRACING */
27 
28 #endif	/* _LINUX_TRACE_H */
29