aboutsummaryrefslogtreecommitdiff
path: root/Documentation/trace
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/trace')
-rw-r--r--Documentation/trace/ftrace.txt4
-rw-r--r--Documentation/trace/tracepoints.txt19
2 files changed, 19 insertions, 4 deletions
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
index b937c6e2163..ea2d35d64d2 100644
--- a/Documentation/trace/ftrace.txt
+++ b/Documentation/trace/ftrace.txt
@@ -735,7 +735,7 @@ Here are the available options:
function as well as the function being traced.
print-parent:
- bash-4000 [01] 1477.606694: simple_strtoul <-strict_strtoul
+ bash-4000 [01] 1477.606694: simple_strtoul <-kstrtoul
noprint-parent:
bash-4000 [01] 1477.606694: simple_strtoul
@@ -759,7 +759,7 @@ Here are the available options:
latency-format option is enabled.
bash 4000 1 0 00000000 00010a95 [58127d26] 1720.415ms \
- (+0.000ms): simple_strtoul (strict_strtoul)
+ (+0.000ms): simple_strtoul (kstrtoul)
raw - This will display raw numbers. This option is best for
use with user applications that can translate the raw
diff --git a/Documentation/trace/tracepoints.txt b/Documentation/trace/tracepoints.txt
index da49437d5ae..ac4170dd0f2 100644
--- a/Documentation/trace/tracepoints.txt
+++ b/Documentation/trace/tracepoints.txt
@@ -40,7 +40,13 @@ Two elements are required for tracepoints :
In order to use tracepoints, you should include linux/tracepoint.h.
-In include/trace/subsys.h :
+In include/trace/events/subsys.h :
+
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM subsys
+
+#if !defined(_TRACE_SUBSYS_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_SUBSYS_H
#include <linux/tracepoint.h>
@@ -48,10 +54,16 @@ DECLARE_TRACE(subsys_eventname,
TP_PROTO(int firstarg, struct task_struct *p),
TP_ARGS(firstarg, p));
+#endif /* _TRACE_SUBSYS_H */
+
+/* This part must be outside protection */
+#include <trace/define_trace.h>
+
In subsys/file.c (where the tracing statement must be added) :
-#include <trace/subsys.h>
+#include <trace/events/subsys.h>
+#define CREATE_TRACE_POINTS
DEFINE_TRACE(subsys_eventname);
void somefct(void)
@@ -72,6 +84,9 @@ Where :
- TP_ARGS(firstarg, p) are the parameters names, same as found in the
prototype.
+- if you use the header in multiple source files, #define CREATE_TRACE_POINTS
+ should appear only in one source file.
+
Connecting a function (probe) to a tracepoint is done by providing a
probe (function to call) for the specific tracepoint through
register_trace_subsys_eventname(). Removing a probe is done through