blob: 9330a58e26517d0e80111fc435477bda151c3cc7 [file] [log] [blame]
Chunyan Zhang478409d2016-11-21 15:57:18 +08001#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 */
18struct trace_export {
19 struct trace_export __rcu *next;
20 void (*write)(const void *, unsigned int);
21};
22
23int register_ftrace_export(struct trace_export *export);
24int unregister_ftrace_export(struct trace_export *export);
25
26#endif /* CONFIG_TRACING */
27
28#endif /* _LINUX_TRACE_H */