diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-06-08 02:24:07 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-06-08 02:24:07 -0400 |
commit | a292241cccb7e20e8b997a9a44177e7c98141859 (patch) | |
tree | a0b0bb95e7dce3233a2d8b203f9e326cdec7a00e /tools/perf/builtin-bench.c | |
parent | d49cb7aeebb974713f9f7ab2991352d3050b095b (diff) | |
parent | 68807a0c2015cb40df4869e16651f0ce5cc14d52 (diff) |
Merge branch 'next' into for-linus
Prepare input updates for 3.16.
Diffstat (limited to 'tools/perf/builtin-bench.c')
-rw-r--r-- | tools/perf/builtin-bench.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/perf/builtin-bench.c b/tools/perf/builtin-bench.c index e47f90cc7b98..1e6e77710545 100644 --- a/tools/perf/builtin-bench.c +++ b/tools/perf/builtin-bench.c | |||
@@ -12,6 +12,7 @@ | |||
12 | * sched ... scheduler and IPC performance | 12 | * sched ... scheduler and IPC performance |
13 | * mem ... memory access performance | 13 | * mem ... memory access performance |
14 | * numa ... NUMA scheduling and MM performance | 14 | * numa ... NUMA scheduling and MM performance |
15 | * futex ... Futex performance | ||
15 | */ | 16 | */ |
16 | #include "perf.h" | 17 | #include "perf.h" |
17 | #include "util/util.h" | 18 | #include "util/util.h" |
@@ -54,6 +55,14 @@ static struct bench mem_benchmarks[] = { | |||
54 | { NULL, NULL, NULL } | 55 | { NULL, NULL, NULL } |
55 | }; | 56 | }; |
56 | 57 | ||
58 | static struct bench futex_benchmarks[] = { | ||
59 | { "hash", "Benchmark for futex hash table", bench_futex_hash }, | ||
60 | { "wake", "Benchmark for futex wake calls", bench_futex_wake }, | ||
61 | { "requeue", "Benchmark for futex requeue calls", bench_futex_requeue }, | ||
62 | { "all", "Test all futex benchmarks", NULL }, | ||
63 | { NULL, NULL, NULL } | ||
64 | }; | ||
65 | |||
57 | struct collection { | 66 | struct collection { |
58 | const char *name; | 67 | const char *name; |
59 | const char *summary; | 68 | const char *summary; |
@@ -61,11 +70,12 @@ struct collection { | |||
61 | }; | 70 | }; |
62 | 71 | ||
63 | static struct collection collections[] = { | 72 | static struct collection collections[] = { |
64 | { "sched", "Scheduler and IPC benchmarks", sched_benchmarks }, | 73 | { "sched", "Scheduler and IPC benchmarks", sched_benchmarks }, |
65 | { "mem", "Memory access benchmarks", mem_benchmarks }, | 74 | { "mem", "Memory access benchmarks", mem_benchmarks }, |
66 | #ifdef HAVE_LIBNUMA_SUPPORT | 75 | #ifdef HAVE_LIBNUMA_SUPPORT |
67 | { "numa", "NUMA scheduling and MM benchmarks", numa_benchmarks }, | 76 | { "numa", "NUMA scheduling and MM benchmarks", numa_benchmarks }, |
68 | #endif | 77 | #endif |
78 | {"futex", "Futex stressing benchmarks", futex_benchmarks }, | ||
69 | { "all", "All benchmarks", NULL }, | 79 | { "all", "All benchmarks", NULL }, |
70 | { NULL, NULL, NULL } | 80 | { NULL, NULL, NULL } |
71 | }; | 81 | }; |
@@ -76,7 +86,7 @@ static struct collection collections[] = { | |||
76 | 86 | ||
77 | /* Iterate over all benchmarks within a collection: */ | 87 | /* Iterate over all benchmarks within a collection: */ |
78 | #define for_each_bench(coll, bench) \ | 88 | #define for_each_bench(coll, bench) \ |
79 | for (bench = coll->benchmarks; bench->name; bench++) | 89 | for (bench = coll->benchmarks; bench && bench->name; bench++) |
80 | 90 | ||
81 | static void dump_benchmarks(struct collection *coll) | 91 | static void dump_benchmarks(struct collection *coll) |
82 | { | 92 | { |