summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/syscall-counts.py
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2024-12-19 23:12:04 +0300
committerSteven Rostedt (Google) <rostedt@goodmis.org>2024-12-26 18:38:36 +0300
commit59980d9b0b2dbe8945734162bb3014eac8b885bd (patch)
tree6a56b85a3fafcc8fd109742dab4146dfced8fa7c /tools/perf/scripts/python/syscall-counts.py
parent4b8d63e5b61dc2ee7958fb36d41c643f56de0d4d (diff)
downloadlinux-59980d9b0b2dbe8945734162bb3014eac8b885bd.tar.xz
tracing: Switch trace_events.c code over to use guard()
There are several functions in trace_events.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. Some locations did some simple arithmetic after releasing the lock. As this causes no real overhead for holding a mutex while processing the file position (*ppos += cnt;) let the lock be held over this logic too. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/20241219201345.522546095@goodmis.org 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