Skip to content

Commit

Permalink
perf bench: Make "default" memcpy() selection actually use glibc's im…
Browse files Browse the repository at this point in the history
…plementation

Since arch/x86/lib/memcpy_64.S implements not only __memcpy, but also
memcpy, without further precautions this function will get chose by the
static linker for resolving all references, and hence the "default"
measurement didn't really measure anything else than the
"x86-64-unrolled" one.

Fix this by renaming (through the pre-processor) the conflicting symbol.

On my Westmere system, the glibc variant turns out to require about 4%
less instructions, but 15% more cycles for the default 1Mb block size
measured.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/4F16D6FD020000780006D72F@nat28.tlf.novell.com
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Jan Beulich authored and Arnaldo Carvalho de Melo committed Jan 24, 2012
1 parent 0d37aa3 commit 9ea8119
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/bench/mem-memcpy-x86-64-asm.S
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

#define memcpy MEMCPY /* don't hide glibc's memcpy() */
#include "../../../arch/x86/lib/memcpy_64.S"

0 comments on commit 9ea8119

Please sign in to comment.