aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-bench.c
diff options
context:
space:
mode:
authorHitoshi Mitake <mitake@dcl.info.waseda.ac.jp>2009-11-17 10:20:09 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-19 00:21:48 -0500
commit827f3b4974c5db2968d4979fe6a0ae00ab37bdd8 (patch)
tree63d9a4b655553c484b05137e06b69d578c9a66a4 /tools/perf/builtin-bench.c
parentb269876c8d57fb8c801bea1fc34b461646c5abd0 (diff)
perf bench: Add memcpy() benchmark
'perf bench mem memcpy' is a benchmark suite for measuring memcpy() performance. Example on a Intel(R) Core(TM)2 Duo CPU E6850 @ 3.00GHz: | % perf bench mem memcpy -l 1GB | # Running mem/memcpy benchmark... | # Copying 1MB Bytes from 0xb7d98008 to 0xb7e99008 ... | | 726.216412 MB/Sec Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <1258471212-30281-1-git-send-email-mitake@dcl.info.waseda.ac.jp> [ v2: updated changelog, clarified history of builtin-bench.c ] Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-bench.c')
-rw-r--r--tools/perf/builtin-bench.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/perf/builtin-bench.c b/tools/perf/builtin-bench.c
index 90c39baae0de..e043eb83092a 100644
--- a/tools/perf/builtin-bench.c
+++ b/tools/perf/builtin-bench.c
@@ -12,6 +12,7 @@
12 * 12 *
13 * Available subsystem list: 13 * Available subsystem list:
14 * sched ... scheduler and IPC mechanism 14 * sched ... scheduler and IPC mechanism
15 * mem ... memory access performance
15 * 16 *
16 */ 17 */
17 18
@@ -43,6 +44,15 @@ static struct bench_suite sched_suites[] = {
43 NULL } 44 NULL }
44}; 45};
45 46
47static struct bench_suite mem_suites[] = {
48 { "memcpy",
49 "Simple memory copy in various ways",
50 bench_mem_memcpy },
51 { NULL,
52 NULL,
53 NULL }
54};
55
46struct bench_subsys { 56struct bench_subsys {
47 const char *name; 57 const char *name;
48 const char *summary; 58 const char *summary;
@@ -53,9 +63,12 @@ static struct bench_subsys subsystems[] = {
53 { "sched", 63 { "sched",
54 "scheduler and IPC mechanism", 64 "scheduler and IPC mechanism",
55 sched_suites }, 65 sched_suites },
66 { "mem",
67 "memory access performance",
68 mem_suites },
56 { NULL, 69 { NULL,
57 NULL, 70 NULL,
58 NULL } 71 NULL }
59}; 72};
60 73
61static void dump_suites(int subsys_index) 74static void dump_suites(int subsys_index)