]> git.itanic.dy.fi Git - linux-stable/blob - tools/perf/bench/bench.h
80208ac077715c0cbdbd4f3b82e6ae5f37f9a5a8
[linux-stable] / tools / perf / bench / bench.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef BENCH_H
3 #define BENCH_H
4
5 /*
6  * The madvise transparent hugepage constants were added in glibc
7  * 2.13. For compatibility with older versions of glibc, define these
8  * tokens if they are not already defined.
9  */
10 # ifndef MADV_HUGEPAGE
11 #  define MADV_HUGEPAGE         14
12 # endif
13 # ifndef MADV_NOHUGEPAGE
14 #  define MADV_NOHUGEPAGE       15
15 # endif
16
17 int bench_numa(int argc, const char **argv);
18 int bench_sched_messaging(int argc, const char **argv);
19 int bench_sched_pipe(int argc, const char **argv);
20 int bench_mem_memcpy(int argc, const char **argv);
21 int bench_mem_memset(int argc, const char **argv);
22 int bench_futex_hash(int argc, const char **argv);
23 int bench_futex_wake(int argc, const char **argv);
24 int bench_futex_wake_parallel(int argc, const char **argv);
25 int bench_futex_requeue(int argc, const char **argv);
26 /* pi futexes */
27 int bench_futex_lock_pi(int argc, const char **argv);
28
29 #define BENCH_FORMAT_DEFAULT_STR        "default"
30 #define BENCH_FORMAT_DEFAULT            0
31 #define BENCH_FORMAT_SIMPLE_STR         "simple"
32 #define BENCH_FORMAT_SIMPLE             1
33
34 #define BENCH_FORMAT_UNKNOWN            -1
35
36 extern int bench_format;
37 extern unsigned int bench_repeat;
38
39 #endif