tracing: Add hook to function tracing for other subsystems to use
authorChunyan Zhang <zhang.chunyan@linaro.org>
Mon, 21 Nov 2016 07:57:18 +0000 (15:57 +0800)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 22 Nov 2016 22:40:00 +0000 (17:40 -0500)
commit478409dd683db76cbcfe7bf8332a37f01deb0a2d
treeaceb894271a28bea11df6930c6ca7227ea5c6c03
parent153aae5f996d4cb3e8a64990b6b09cde4a1529b0
tracing: Add hook to function tracing for other subsystems to use

Currently Function traces can be only exported to the ring buffer. This
adds a trace_export concept which can process traces and export
them to a registered destination as an addition to the current
one that outputs to Ftrace - i.e. ring buffer.

In this way, if we want function traces to be sent to other destinations
rather than only to the ring buffer, we just need to register a new
trace_export and implement its own .write() function for writing traces to
storage.

With this patch, only function tracing (trace type is TRACE_FN)
is supported.

Link: http://lkml.kernel.org/r/1479715043-6534-2-git-send-email-zhang.chunyan@linaro.org
Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
include/linux/trace.h [new file with mode: 0644]
kernel/trace/trace.c