-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf bench: Add feature that measures the performance of the arch/x86…
…/lib/memcpy_64.S memcpy routines via 'perf bench mem' This patch ports arch/x86/lib/memcpy_64.S to perf bench mem memcpy for benchmarking memcpy() in userland with tricky and dirty way. util/include/asm/cpufeature.h, util/include/asm/dwarf2.h, and util/include/linux/linkage.h are mostly dummy files with small wrappers, so that we are able to include memcpy_64.S unmodified. Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp> Cc: h.mitake@gmail.com Cc: Miao Xie <miaox@cn.fujitsu.com> Cc: Ma Ling <ling.ma@intel.com> Cc: Zhao Yakui <yakui.zhao@intel.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Andi Kleen <andi@firstfloor.org> LKML-Reference: <1290668693-27068-2-git-send-email-mitake@dcl.info.waseda.ac.jp> Signed-off-by: Ingo Molnar <mingo@elte.hu>
- Loading branch information
Hitoshi Mitake
authored and
Ingo Molnar
committed
Nov 26, 2010
1 parent
49ce8fc
commit ea7872b
Showing
7 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
#ifdef ARCH_X86_64 | ||
|
||
#define MEMCPY_FN(fn, name, desc) \ | ||
extern void *fn(void *, const void *, size_t); | ||
|
||
#include "mem-memcpy-x86-64-asm-def.h" | ||
|
||
#undef MEMCPY_FN | ||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
MEMCPY_FN(__memcpy, | ||
"x86-64-unrolled", | ||
"unrolled memcpy() in arch/x86/lib/memcpy_64.S") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
#include "../../../arch/x86/lib/memcpy_64.S" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
#ifndef PERF_CPUFEATURE_H | ||
#define PERF_CPUFEATURE_H | ||
|
||
/* cpufeature.h ... dummy header file for including arch/x86/lib/memcpy_64.S */ | ||
|
||
#define X86_FEATURE_REP_GOOD 0 | ||
|
||
#endif /* PERF_CPUFEATURE_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
#ifndef PERF_DWARF2_H | ||
#define PERF_DWARF2_H | ||
|
||
/* dwarf2.h ... dummy header file for including arch/x86/lib/memcpy_64.S */ | ||
|
||
#define CFI_STARTPROC | ||
#define CFI_ENDPROC | ||
|
||
#endif /* PERF_DWARF2_H */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
#ifndef PERF_LINUX_LINKAGE_H_ | ||
#define PERF_LINUX_LINKAGE_H_ | ||
|
||
/* linkage.h ... for including arch/x86/lib/memcpy_64.S */ | ||
|
||
#define ENTRY(name) \ | ||
.globl name; \ | ||
name: | ||
|
||
#define ENDPROC(name) | ||
|
||
#endif /* PERF_LINUX_LINKAGE_H_ */ |