diff options
Diffstat (limited to 'Documentation/tracepoints.txt')
-rw-r--r-- | Documentation/tracepoints.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Documentation/tracepoints.txt b/Documentation/tracepoints.txt index 5d354e167494..e8ad47b437f3 100644 --- a/Documentation/tracepoints.txt +++ b/Documentation/tracepoints.txt | |||
@@ -42,7 +42,7 @@ In include/trace/subsys.h : | |||
42 | 42 | ||
43 | #include <linux/tracepoint.h> | 43 | #include <linux/tracepoint.h> |
44 | 44 | ||
45 | DEFINE_TRACE(subsys_eventname, | 45 | DECLARE_TRACE(subsys_eventname, |
46 | TPPTOTO(int firstarg, struct task_struct *p), | 46 | TPPTOTO(int firstarg, struct task_struct *p), |
47 | TPARGS(firstarg, p)); | 47 | TPARGS(firstarg, p)); |
48 | 48 | ||
@@ -50,6 +50,8 @@ In subsys/file.c (where the tracing statement must be added) : | |||
50 | 50 | ||
51 | #include <trace/subsys.h> | 51 | #include <trace/subsys.h> |
52 | 52 | ||
53 | DEFINE_TRACE(subsys_eventname); | ||
54 | |||
53 | void somefct(void) | 55 | void somefct(void) |
54 | { | 56 | { |
55 | ... | 57 | ... |
@@ -86,6 +88,9 @@ to limit collisions. Tracepoint names are global to the kernel: they are | |||
86 | considered as being the same whether they are in the core kernel image or in | 88 | considered as being the same whether they are in the core kernel image or in |
87 | modules. | 89 | modules. |
88 | 90 | ||
91 | If the tracepoint has to be used in kernel modules, an | ||
92 | EXPORT_TRACEPOINT_SYMBOL_GPL() or EXPORT_TRACEPOINT_SYMBOL() can be used to | ||
93 | export the defined tracepoints. | ||
89 | 94 | ||
90 | * Probe / tracepoint example | 95 | * Probe / tracepoint example |
91 | 96 | ||