summaryrefslogtreecommitdiffstats
path: root/Documentation/trace/tracepoints.txt
AgeCommit message (Collapse)AuthorFilesLines
2014-05-07tracing: Add trace_<tracepoint>_enabled() functionSteven Rostedt (Red Hat)1-0/+24
There are some code paths in the kernel that need to do some preparations before it calls a tracepoint. As that code is worthless overhead when the tracepoint is not enabled, it would be prudent to have that code only run when the tracepoint is active. To accomplish this, all tracepoints now get a static inline function called "trace_<tracepoint-name>_enabled()" which returns true when the tracepoint is enabled and false otherwise. As an added bonus, that function uses the static_key of the tracepoint such that no branch is needed. if (trace_mytracepoint_enabled()) { arg = process_tp_arg(); trace_mytracepoint(arg); } Will keep the "process_tp_arg()" (which may be expensive to run) from being executed when the tracepoint isn't enabled. It's best to encapsulate the tracepoint itself in the if statement just to keep races. For example, if you had: if (trace_mytracepoint_enabled()) arg = process_tp_arg(); trace_mytracepoint(arg); There's a chance that the tracepoint could be enabled just after the if statement, and arg will be undefined when calling the tracepoint. Link: http://lkml.kernel.org/r/20140506094407.507b6435@gandalf.local.home Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-11-13Documentation/trace/tracepoints.txt: add links to TRACE_EVENT documentationStefan Raspl1-0/+5
Existing tracepoint documentation doesn't mention the popular TRACE_EVENT macro. Since an excellent series of articles on proper usage already exists, respective links are added to the existing documentation. Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com> Cc: Rob Landley <rob@landley.net> Cc: Jiri Kosina <jkosina@suse.cz> Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Zoltan Kiss <zoltan.kiss@citrix.com> Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-08-27Documentation/trace: Correcting and extending tracepoint documentationZoltan Kiss1-2/+17
The sample missed the moving of the header files into the events subdirectory. I've also extended it based on the existing headers, and mentioned the tiny but important role of CREATE_TRACE_POINTS. Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com> Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-03-21doc: Remove text on tracepoint samplesPaul Bolle1-15/+0
The tracepoint sample code got removed. Remove a few lines on its usage too. Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Acked-by: Rob Landley <rob@landley.net> Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-04-09tracing: consolidate documentsLi Zefan1-0/+116
Move kmemtrace.txt, tracepoints.txt, ftrace.txt and mmiotrace.txt to the new trace/ directory. I didnt find any references to those documents in both source files and documents, so no extra work needs to be done. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Pekka Paalanen <pq@iki.fi> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> LKML-Reference: <49DD6E2B.6090200@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>