Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf/bench: Fix mem* routines usage after alternatives change

Adjust perf bench to the new changes in the alternatives code for
memcpy/memset.

Reviewed-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Borislav Petkov <bp@suse.de>

+7 -10
+3 -3
tools/perf/bench/mem-memcpy-x86-64-asm-def.h
··· 1 1 2 - MEMCPY_FN(__memcpy, 2 + MEMCPY_FN(memcpy_orig, 3 3 "x86-64-unrolled", 4 4 "unrolled memcpy() in arch/x86/lib/memcpy_64.S") 5 5 6 - MEMCPY_FN(memcpy_c, 6 + MEMCPY_FN(__memcpy, 7 7 "x86-64-movsq", 8 8 "movsq-based memcpy() in arch/x86/lib/memcpy_64.S") 9 9 10 - MEMCPY_FN(memcpy_c_e, 10 + MEMCPY_FN(memcpy_erms, 11 11 "x86-64-movsb", 12 12 "movsb-based memcpy() in arch/x86/lib/memcpy_64.S")
-2
tools/perf/bench/mem-memcpy-x86-64-asm.S
··· 1 1 #define memcpy MEMCPY /* don't hide glibc's memcpy() */ 2 2 #define altinstr_replacement text 3 3 #define globl p2align 4; .globl 4 - #define Lmemcpy_c globl memcpy_c; memcpy_c 5 - #define Lmemcpy_c_e globl memcpy_c_e; memcpy_c_e 6 4 #include "../../../arch/x86/lib/memcpy_64.S" 7 5 /* 8 6 * We need to provide note.GNU-stack section, saying that we want
+3 -3
tools/perf/bench/mem-memset-x86-64-asm-def.h
··· 1 1 2 - MEMSET_FN(__memset, 2 + MEMSET_FN(memset_orig, 3 3 "x86-64-unrolled", 4 4 "unrolled memset() in arch/x86/lib/memset_64.S") 5 5 6 - MEMSET_FN(memset_c, 6 + MEMSET_FN(__memset, 7 7 "x86-64-stosq", 8 8 "movsq-based memset() in arch/x86/lib/memset_64.S") 9 9 10 - MEMSET_FN(memset_c_e, 10 + MEMSET_FN(memset_erms, 11 11 "x86-64-stosb", 12 12 "movsb-based memset() in arch/x86/lib/memset_64.S")
-2
tools/perf/bench/mem-memset-x86-64-asm.S
··· 1 1 #define memset MEMSET /* don't hide glibc's memset() */ 2 2 #define altinstr_replacement text 3 3 #define globl p2align 4; .globl 4 - #define Lmemset_c globl memset_c; memset_c 5 - #define Lmemset_c_e globl memset_c_e; memset_c_e 6 4 #include "../../../arch/x86/lib/memset_64.S" 7 5 8 6 /*
+1
tools/perf/util/include/asm/alternative-asm.h
··· 4 4 /* Just disable it so we can build arch/x86/lib/memcpy_64.S for perf bench: */ 5 5 6 6 #define altinstruction_entry # 7 + #define ALTERNATIVE_2 # 7 8 8 9 #endif