diff options
author | Steven Rostedt <rostedt@goodmis.org> | 2024-12-20 19:06:21 +0300 |
---|---|---|
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2024-12-26 18:38:37 +0300 |
commit | 63c72641683891c5087c77e9ae7a8b43433214e7 (patch) | |
tree | 97b1503b1e64c3a471c70abf5b165835835835d7 /tools/perf/scripts/python/syscall-counts.py | |
parent | 2b36a97aeeb71b1e4a48bfedc7f21f44aeb1e6fb (diff) | |
download | linux-63c72641683891c5087c77e9ae7a8b43433214e7.tar.xz |
tracing: Switch trace_events_trigger.c code over to use guard()
There are a few functions in trace_events_trigger.c that have "goto out" or
equivalent on error in order to release locks that were taken. This can be
error prone or just simply make the code more complex.
Switch every location that ends with unlocking a mutex on error over to
using the guard(mutex)() infrastructure to let the compiler worry about
releasing locks. This makes the code easier to read and understand.
Also use __free() for free a temporary buffer in event_trigger_regex_write().
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/20241220110621.639d3bc8@gandalf.local.home
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions