aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/event_analyzing_sample.py
diff options
context:
space:
mode:
authorUros Bizjak <[email protected]>2022-10-18 16:51:54 +0200
committerAndrew Morton <[email protected]>2022-11-08 17:37:13 -0800
commit70ec04f3486103819807b061b50a99f6e1d2bf36 (patch)
tree21d513186676f0f3b97bfacb075675b1733b45e4 /tools/perf/scripts/python/event_analyzing_sample.py
parent9fb6beea79c6e7c959adf4fb7b94cf9a6028b941 (diff)
zram: use try_cmpxchg in update_used_max
Use try_cmpxchg instead of cmpxchg (*ptr, old, new) == old in update_used_max. 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, reorder code a bit to remove additional compare and conditional jump from the assembly code. Together, hese two changes save 15 bytes from the function when compiled for x86_64. No functional change intended. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Uros Bizjak <[email protected]> Reviewed-by: Sergey Senozhatsky <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Nitin Gupta <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions