summaryrefslogtreecommitdiffstats
path: root/crypto/hash_info.c
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2020-09-24 12:30:20 -0400
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2020-09-25 18:01:35 -0400
commitafbe7973173a7ce0a68af8b33e44c967582297be (patch)
treee3275757d5e04d8adde4d731c3e159d0d0bcc6f1 /crypto/hash_info.c
parent720dee53ad8dfd528941fbbc264574601b04488a (diff)
downloadlinux-stable-afbe7973173a7ce0a68af8b33e44c967582297be.tar.gz
linux-stable-afbe7973173a7ce0a68af8b33e44c967582297be.tar.bz2
linux-stable-afbe7973173a7ce0a68af8b33e44c967582297be.zip
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>
Diffstat (limited to 'crypto/hash_info.c')
0 files changed, 0 insertions, 0 deletions