diff options
author | 2024-04-25 12:16:14 +0200 | |
---|---|---|
committer | 2024-05-18 11:15:13 +0200 | |
commit | cd84351c8c1baec86342d784feb884ace007d51c (patch) | |
tree | 8ccd6c21b7cd6cc44cf710e2379fb37ccaac474f /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | perf/x86/cstate: Remove unused 'struct perf_cstate_msr' (diff) | |
download | wireguard-linux-cd84351c8c1baec86342d784feb884ace007d51c.tar.xz wireguard-linux-cd84351c8c1baec86342d784feb884ace007d51c.zip |
perf/x86/amd: Use try_cmpxchg() in events/amd/{un,}core.c
Replace this pattern in events/amd/{un,}core.c:
cmpxchg(*ptr, old, new) == old
... with the simpler and faster:
try_cmpxchg(*ptr, &old, new)
The x86 CMPXCHG instruction returns success in the ZF flag, so this change
saves a compare after the CMPXCHG.
No functional change intended.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20240425101708.5025-1-ubizjak@gmail.com
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions