Commit Graph

3 Commits

Author SHA1 Message Date
Sarat Mandava 7a225ece71 trace doc: Minor grammatical correction
Use the correct relative pronoun.

Signed-off-by: Sarat Mandava <mandavasarat@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20240321112757.17502-1-mandavasarat@gmail.com
2024-04-02 10:07:51 -06:00
Steven Rostedt (VMware) afbe797317 tracepoints: Add helper to test if tracepoint is enabled in a header
As tracepoints are discouraged from being added in a header because it can
cause side effects if other tracepoints are in headers, as well as bloat the
kernel as the trace_<tracepoint>() function is not a small inline, the common
workaround is to add a function call that calls a wrapper function in a
C file that then calls the tracepoint. But as function calls add overhead,
this function should only be called when the tracepoint in question is
enabled. To get around this overhead, a static_branch can be used to only
have the tracepoint wrapper get called when the tracepoint is enabled.

Add a tracepoint_enabled(tp) macro that gets passed the name of the
tracepoint, and this becomes a static_branch that is enabled when the
tracepoint is enabled and is a nop when the tracepoint is disabled.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2020-09-25 18:01:35 -04:00
Changbin Du 837e716de2 trace doc: convert trace/tracepoints.txt to rst format
This converts the plain text documentation to reStructuredText format and
add it into Sphinx TOC tree. No essential content change.

Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Changbin Du <changbin.du@intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2018-03-07 10:23:23 -07:00