aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>2008-11-14 17:47:47 -0500
committerIngo Molnar <mingo@elte.hu>2008-11-16 03:01:36 -0500
commit7e066fb870fcd1025ec3ba7bbde5d541094f4ce1 (patch)
tree52acda06de25c029b9834110d7bf6b4abc50353b /Documentation
parent32f85742778dfc2c74975cf0b9f5bdb13470cb32 (diff)
tracepoints: add DECLARE_TRACE() and DEFINE_TRACE()
Impact: API *CHANGE*. Must update all tracepoint users. Add DEFINE_TRACE() to tracepoints to let them declare the tracepoint structure in a single spot for all the kernel. It helps reducing memory consumption, especially when declaring a lot of tracepoints, e.g. for kmalloc tracing. *API CHANGE WARNING*: now, DECLARE_TRACE() must be used in headers for tracepoint declarations rather than DEFINE_TRACE(). This is the sane way to do it. The name previously used was misleading. Updates scheduler instrumentation to follow this API change. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/tracepoints.txt7
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
45DEFINE_TRACE(subsys_eventname, 45DECLARE_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
53DEFINE_TRACE(subsys_eventname);
54
53void somefct(void) 55void somefct(void)
54{ 56{
55 ... 57 ...
@@ -86,6 +88,9 @@ to limit collisions. Tracepoint names are global to the kernel: they are
86considered as being the same whether they are in the core kernel image or in 88considered as being the same whether they are in the core kernel image or in
87modules. 89modules.
88 90
91If the tracepoint has to be used in kernel modules, an
92EXPORT_TRACEPOINT_SYMBOL_GPL() or EXPORT_TRACEPOINT_SYMBOL() can be used to
93export the defined tracepoints.
89 94
90* Probe / tracepoint example 95* Probe / tracepoint example
91 96