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