diff options
author | Borislav Petkov <bp@suse.de> | 2015-02-26 12:38:16 -0500 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2015-03-03 12:01:10 -0500 |
commit | 0cf55934ecace74bb7d26c0e9679fb41675a8903 (patch) | |
tree | daefadffc2e370c8d3e4111f3fe095a80cd6f16a /tools/perf | |
parent | e0bc8d179e39a31bb3a56974374e55374fbf29be (diff) |
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>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/bench/mem-memcpy-x86-64-asm-def.h | 6 | ||||
-rw-r--r-- | tools/perf/bench/mem-memcpy-x86-64-asm.S | 2 | ||||
-rw-r--r-- | tools/perf/bench/mem-memset-x86-64-asm-def.h | 6 | ||||
-rw-r--r-- | tools/perf/bench/mem-memset-x86-64-asm.S | 2 | ||||
-rw-r--r-- | tools/perf/util/include/asm/alternative-asm.h | 1 |
5 files changed, 7 insertions, 10 deletions
diff --git a/tools/perf/bench/mem-memcpy-x86-64-asm-def.h b/tools/perf/bench/mem-memcpy-x86-64-asm-def.h index d66ab799b35f..8c0c1a2770c8 100644 --- a/tools/perf/bench/mem-memcpy-x86-64-asm-def.h +++ b/tools/perf/bench/mem-memcpy-x86-64-asm-def.h | |||
@@ -1,12 +1,12 @@ | |||
1 | 1 | ||
2 | MEMCPY_FN(__memcpy, | 2 | MEMCPY_FN(memcpy_orig, |
3 | "x86-64-unrolled", | 3 | "x86-64-unrolled", |
4 | "unrolled memcpy() in arch/x86/lib/memcpy_64.S") | 4 | "unrolled memcpy() in arch/x86/lib/memcpy_64.S") |
5 | 5 | ||
6 | MEMCPY_FN(memcpy_c, | 6 | MEMCPY_FN(__memcpy, |
7 | "x86-64-movsq", | 7 | "x86-64-movsq", |
8 | "movsq-based memcpy() in arch/x86/lib/memcpy_64.S") | 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 | "x86-64-movsb", | 11 | "x86-64-movsb", |
12 | "movsb-based memcpy() in arch/x86/lib/memcpy_64.S") | 12 | "movsb-based memcpy() in arch/x86/lib/memcpy_64.S") |
diff --git a/tools/perf/bench/mem-memcpy-x86-64-asm.S b/tools/perf/bench/mem-memcpy-x86-64-asm.S index fcd9cf00600a..e4c2c30143b9 100644 --- a/tools/perf/bench/mem-memcpy-x86-64-asm.S +++ b/tools/perf/bench/mem-memcpy-x86-64-asm.S | |||
@@ -1,8 +1,6 @@ | |||
1 | #define memcpy MEMCPY /* don't hide glibc's memcpy() */ | 1 | #define memcpy MEMCPY /* don't hide glibc's memcpy() */ |
2 | #define altinstr_replacement text | 2 | #define altinstr_replacement text |
3 | #define globl p2align 4; .globl | 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 | #include "../../../arch/x86/lib/memcpy_64.S" | 4 | #include "../../../arch/x86/lib/memcpy_64.S" |
7 | /* | 5 | /* |
8 | * We need to provide note.GNU-stack section, saying that we want | 6 | * We need to provide note.GNU-stack section, saying that we want |
diff --git a/tools/perf/bench/mem-memset-x86-64-asm-def.h b/tools/perf/bench/mem-memset-x86-64-asm-def.h index a71dff97c1f5..f02d028771d9 100644 --- a/tools/perf/bench/mem-memset-x86-64-asm-def.h +++ b/tools/perf/bench/mem-memset-x86-64-asm-def.h | |||
@@ -1,12 +1,12 @@ | |||
1 | 1 | ||
2 | MEMSET_FN(__memset, | 2 | MEMSET_FN(memset_orig, |
3 | "x86-64-unrolled", | 3 | "x86-64-unrolled", |
4 | "unrolled memset() in arch/x86/lib/memset_64.S") | 4 | "unrolled memset() in arch/x86/lib/memset_64.S") |
5 | 5 | ||
6 | MEMSET_FN(memset_c, | 6 | MEMSET_FN(__memset, |
7 | "x86-64-stosq", | 7 | "x86-64-stosq", |
8 | "movsq-based memset() in arch/x86/lib/memset_64.S") | 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 | "x86-64-stosb", | 11 | "x86-64-stosb", |
12 | "movsb-based memset() in arch/x86/lib/memset_64.S") | 12 | "movsb-based memset() in arch/x86/lib/memset_64.S") |
diff --git a/tools/perf/bench/mem-memset-x86-64-asm.S b/tools/perf/bench/mem-memset-x86-64-asm.S index 9e5af89ed13a..de278784c866 100644 --- a/tools/perf/bench/mem-memset-x86-64-asm.S +++ b/tools/perf/bench/mem-memset-x86-64-asm.S | |||
@@ -1,8 +1,6 @@ | |||
1 | #define memset MEMSET /* don't hide glibc's memset() */ | 1 | #define memset MEMSET /* don't hide glibc's memset() */ |
2 | #define altinstr_replacement text | 2 | #define altinstr_replacement text |
3 | #define globl p2align 4; .globl | 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 | #include "../../../arch/x86/lib/memset_64.S" | 4 | #include "../../../arch/x86/lib/memset_64.S" |
7 | 5 | ||
8 | /* | 6 | /* |
diff --git a/tools/perf/util/include/asm/alternative-asm.h b/tools/perf/util/include/asm/alternative-asm.h index 6789d788d494..3a3a0f16456a 100644 --- a/tools/perf/util/include/asm/alternative-asm.h +++ b/tools/perf/util/include/asm/alternative-asm.h | |||
@@ -4,5 +4,6 @@ | |||
4 | /* Just disable it so we can build arch/x86/lib/memcpy_64.S for perf bench: */ | 4 | /* Just disable it so we can build arch/x86/lib/memcpy_64.S for perf bench: */ |
5 | 5 | ||
6 | #define altinstruction_entry # | 6 | #define altinstruction_entry # |
7 | #define ALTERNATIVE_2 # | ||
7 | 8 | ||
8 | #endif | 9 | #endif |