aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py
diff options
context:
space:
mode:
authorUros Bizjak <[email protected]>2023-03-05 16:55:32 +0100
committerSteven Rostedt (Google) <[email protected]>2023-03-21 13:59:48 -0400
commit8328e36da9cd8cb051394630e910cbb461f7e3ec (patch)
tree35d10a2205d1f1ca0467cc06c0e27863352f8843 /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py
parentbc92b9562abc831a65e505d2e675b51528d22d8b (diff)
ring_buffer: Use try_cmpxchg instead of cmpxchg
Use try_cmpxchg instead of cmpxchg (*ptr, old, new) == old. x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). Also, try_cmpxchg implicitly assigns old *ptr value to "old" when cmpxchg fails. There is no need to re-read the value in the loop. No functional change intended. Link: https://lkml.kernel.org/r/[email protected] Cc: Masami Hiramatsu <[email protected]> Signed-off-by: Uros Bizjak <[email protected]> Acked-by: Mukesh Ojha <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py')
0 files changed, 0 insertions, 0 deletions