diff options
Diffstat (limited to 'tools/perf/bench')
-rw-r--r-- | tools/perf/bench/epoll-ctl.c | 10 | ||||
-rw-r--r-- | tools/perf/bench/epoll-wait.c | 10 | ||||
-rw-r--r-- | tools/perf/bench/futex-hash.c | 7 | ||||
-rw-r--r-- | tools/perf/bench/futex-lock-pi.c | 9 | ||||
-rw-r--r-- | tools/perf/bench/futex-requeue.c | 9 | ||||
-rw-r--r-- | tools/perf/bench/futex-wake-parallel.c | 9 | ||||
-rw-r--r-- | tools/perf/bench/futex-wake.c | 9 | ||||
-rw-r--r-- | tools/perf/bench/mem-functions.c | 3 | ||||
-rw-r--r-- | tools/perf/bench/numa.c | 2 | ||||
-rw-r--r-- | tools/perf/bench/sched-messaging.c | 3 | ||||
-rw-r--r-- | tools/perf/bench/sched-pipe.c | 3 |
11 files changed, 38 insertions, 36 deletions
diff --git a/tools/perf/bench/epoll-ctl.c b/tools/perf/bench/epoll-ctl.c index 2af067859966..bb617e568841 100644 --- a/tools/perf/bench/epoll-ctl.c +++ b/tools/perf/bench/epoll-ctl.c @@ -14,17 +14,19 @@ #include <inttypes.h> #include <signal.h> #include <stdlib.h> +#include <unistd.h> #include <linux/compiler.h> #include <linux/kernel.h> #include <sys/time.h> #include <sys/resource.h> #include <sys/epoll.h> #include <sys/eventfd.h> +#include <internal/cpumap.h> +#include <perf/cpumap.h> #include "../util/stat.h" #include <subcmd/parse-options.h> #include "bench.h" -#include "cpumap.h" #include <err.h> @@ -219,7 +221,7 @@ static void init_fdmaps(struct worker *w, int pct) } } -static int do_threads(struct worker *worker, struct cpu_map *cpu) +static int do_threads(struct worker *worker, struct perf_cpu_map *cpu) { pthread_attr_t thread_attr, *attrp = NULL; cpu_set_t cpuset; @@ -301,7 +303,7 @@ int bench_epoll_ctl(int argc, const char **argv) int j, ret = 0; struct sigaction act; struct worker *worker = NULL; - struct cpu_map *cpu; + struct perf_cpu_map *cpu; struct rlimit rl, prevrl; unsigned int i; @@ -315,7 +317,7 @@ int bench_epoll_ctl(int argc, const char **argv) act.sa_sigaction = toggle_done; sigaction(SIGINT, &act, NULL); - cpu = cpu_map__new(NULL); + cpu = perf_cpu_map__new(NULL); if (!cpu) goto errmem; diff --git a/tools/perf/bench/epoll-wait.c b/tools/perf/bench/epoll-wait.c index fe85448abd45..7af694437f4e 100644 --- a/tools/perf/bench/epoll-wait.c +++ b/tools/perf/bench/epoll-wait.c @@ -63,6 +63,7 @@ /* For the CLR_() macros */ #include <string.h> #include <pthread.h> +#include <unistd.h> #include <errno.h> #include <inttypes.h> @@ -75,11 +76,12 @@ #include <sys/epoll.h> #include <sys/eventfd.h> #include <sys/types.h> +#include <internal/cpumap.h> +#include <perf/cpumap.h> #include "../util/stat.h" #include <subcmd/parse-options.h> #include "bench.h" -#include "cpumap.h" #include <err.h> @@ -288,7 +290,7 @@ static void print_summary(void) (int) runtime.tv_sec); } -static int do_threads(struct worker *worker, struct cpu_map *cpu) +static int do_threads(struct worker *worker, struct perf_cpu_map *cpu) { pthread_attr_t thread_attr, *attrp = NULL; cpu_set_t cpuset; @@ -415,7 +417,7 @@ int bench_epoll_wait(int argc, const char **argv) struct sigaction act; unsigned int i; struct worker *worker = NULL; - struct cpu_map *cpu; + struct perf_cpu_map *cpu; pthread_t wthread; struct rlimit rl, prevrl; @@ -429,7 +431,7 @@ int bench_epoll_wait(int argc, const char **argv) act.sa_sigaction = toggle_done; sigaction(SIGINT, &act, NULL); - cpu = cpu_map__new(NULL); + cpu = perf_cpu_map__new(NULL); if (!cpu) goto errmem; diff --git a/tools/perf/bench/futex-hash.c b/tools/perf/bench/futex-hash.c index a80797763e1f..8ba0c3330a9a 100644 --- a/tools/perf/bench/futex-hash.c +++ b/tools/perf/bench/futex-hash.c @@ -20,12 +20,13 @@ #include <linux/kernel.h> #include <linux/zalloc.h> #include <sys/time.h> +#include <internal/cpumap.h> +#include <perf/cpumap.h> #include "../util/stat.h" #include <subcmd/parse-options.h> #include "bench.h" #include "futex.h" -#include "cpumap.h" #include <err.h> @@ -124,7 +125,7 @@ int bench_futex_hash(int argc, const char **argv) unsigned int i; pthread_attr_t thread_attr; struct worker *worker = NULL; - struct cpu_map *cpu; + struct perf_cpu_map *cpu; argc = parse_options(argc, argv, options, bench_futex_hash_usage, 0); if (argc) { @@ -132,7 +133,7 @@ int bench_futex_hash(int argc, const char **argv) exit(EXIT_FAILURE); } - cpu = cpu_map__new(NULL); + cpu = perf_cpu_map__new(NULL); if (!cpu) goto errmem; diff --git a/tools/perf/bench/futex-lock-pi.c b/tools/perf/bench/futex-lock-pi.c index d02330a69745..d0cae8125423 100644 --- a/tools/perf/bench/futex-lock-pi.c +++ b/tools/perf/bench/futex-lock-pi.c @@ -14,9 +14,10 @@ #include <linux/kernel.h> #include <linux/zalloc.h> #include <errno.h> +#include <internal/cpumap.h> +#include <perf/cpumap.h> #include "bench.h" #include "futex.h" -#include "cpumap.h" #include <err.h> #include <stdlib.h> @@ -116,7 +117,7 @@ static void *workerfn(void *arg) } static void create_threads(struct worker *w, pthread_attr_t thread_attr, - struct cpu_map *cpu) + struct perf_cpu_map *cpu) { cpu_set_t cpuset; unsigned int i; @@ -150,13 +151,13 @@ int bench_futex_lock_pi(int argc, const char **argv) unsigned int i; struct sigaction act; pthread_attr_t thread_attr; - struct cpu_map *cpu; + struct perf_cpu_map *cpu; argc = parse_options(argc, argv, options, bench_futex_lock_pi_usage, 0); if (argc) goto err; - cpu = cpu_map__new(NULL); + cpu = perf_cpu_map__new(NULL); if (!cpu) err(EXIT_FAILURE, "calloc"); diff --git a/tools/perf/bench/futex-requeue.c b/tools/perf/bench/futex-requeue.c index fc692efa0c05..a00a6891447a 100644 --- a/tools/perf/bench/futex-requeue.c +++ b/tools/perf/bench/futex-requeue.c @@ -20,9 +20,10 @@ #include <linux/kernel.h> #include <linux/time64.h> #include <errno.h> +#include <internal/cpumap.h> +#include <perf/cpumap.h> #include "bench.h" #include "futex.h" -#include "cpumap.h" #include <err.h> #include <stdlib.h> @@ -84,7 +85,7 @@ static void *workerfn(void *arg __maybe_unused) } static void block_threads(pthread_t *w, - pthread_attr_t thread_attr, struct cpu_map *cpu) + pthread_attr_t thread_attr, struct perf_cpu_map *cpu) { cpu_set_t cpuset; unsigned int i; @@ -117,13 +118,13 @@ int bench_futex_requeue(int argc, const char **argv) unsigned int i, j; struct sigaction act; pthread_attr_t thread_attr; - struct cpu_map *cpu; + struct perf_cpu_map *cpu; argc = parse_options(argc, argv, options, bench_futex_requeue_usage, 0); if (argc) goto err; - cpu = cpu_map__new(NULL); + cpu = perf_cpu_map__new(NULL); if (!cpu) err(EXIT_FAILURE, "cpu_map__new"); diff --git a/tools/perf/bench/futex-wake-parallel.c b/tools/perf/bench/futex-wake-parallel.c index 69d8fdc87315..a053cf2b7039 100644 --- a/tools/perf/bench/futex-wake-parallel.c +++ b/tools/perf/bench/futex-wake-parallel.c @@ -29,7 +29,8 @@ int bench_futex_wake_parallel(int argc __maybe_unused, const char **argv __maybe #include <linux/time64.h> #include <errno.h> #include "futex.h" -#include "cpumap.h" +#include <internal/cpumap.h> +#include <perf/cpumap.h> #include <err.h> #include <stdlib.h> @@ -138,7 +139,7 @@ static void *blocked_workerfn(void *arg __maybe_unused) } static void block_threads(pthread_t *w, pthread_attr_t thread_attr, - struct cpu_map *cpu) + struct perf_cpu_map *cpu) { cpu_set_t cpuset; unsigned int i; @@ -224,7 +225,7 @@ int bench_futex_wake_parallel(int argc, const char **argv) struct sigaction act; pthread_attr_t thread_attr; struct thread_data *waking_worker; - struct cpu_map *cpu; + struct perf_cpu_map *cpu; argc = parse_options(argc, argv, options, bench_futex_wake_parallel_usage, 0); @@ -237,7 +238,7 @@ int bench_futex_wake_parallel(int argc, const char **argv) act.sa_sigaction = toggle_done; sigaction(SIGINT, &act, NULL); - cpu = cpu_map__new(NULL); + cpu = perf_cpu_map__new(NULL); if (!cpu) err(EXIT_FAILURE, "calloc"); diff --git a/tools/perf/bench/futex-wake.c b/tools/perf/bench/futex-wake.c index e8181ad7d088..df810096abfe 100644 --- a/tools/perf/bench/futex-wake.c +++ b/tools/perf/bench/futex-wake.c @@ -20,9 +20,10 @@ #include <linux/kernel.h> #include <linux/time64.h> #include <errno.h> +#include <internal/cpumap.h> +#include <perf/cpumap.h> #include "bench.h" #include "futex.h" -#include "cpumap.h" #include <err.h> #include <stdlib.h> @@ -90,7 +91,7 @@ static void print_summary(void) } static void block_threads(pthread_t *w, - pthread_attr_t thread_attr, struct cpu_map *cpu) + pthread_attr_t thread_attr, struct perf_cpu_map *cpu) { cpu_set_t cpuset; unsigned int i; @@ -123,7 +124,7 @@ int bench_futex_wake(int argc, const char **argv) unsigned int i, j; struct sigaction act; pthread_attr_t thread_attr; - struct cpu_map *cpu; + struct perf_cpu_map *cpu; argc = parse_options(argc, argv, options, bench_futex_wake_usage, 0); if (argc) { @@ -131,7 +132,7 @@ int bench_futex_wake(int argc, const char **argv) exit(EXIT_FAILURE); } - cpu = cpu_map__new(NULL); + cpu = perf_cpu_map__new(NULL); if (!cpu) err(EXIT_FAILURE, "calloc"); diff --git a/tools/perf/bench/mem-functions.c b/tools/perf/bench/mem-functions.c index 64dc994c72ea..9235b76501be 100644 --- a/tools/perf/bench/mem-functions.c +++ b/tools/perf/bench/mem-functions.c @@ -8,7 +8,7 @@ */ #include "debug.h" -#include "../perf.h" +#include "../perf-sys.h" #include <subcmd/parse-options.h> #include "../util/header.h" #include "../util/cloexec.h" @@ -20,6 +20,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> #include <sys/time.h> #include <errno.h> #include <linux/time64.h> diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c index 513cb2f2fa32..5797253b9700 100644 --- a/tools/perf/bench/numa.c +++ b/tools/perf/bench/numa.c @@ -9,8 +9,6 @@ /* For the CLR_() macros */ #include <pthread.h> -#include "../perf.h" -#include "../builtin.h" #include <subcmd/parse-options.h> #include "../util/cloexec.h" diff --git a/tools/perf/bench/sched-messaging.c b/tools/perf/bench/sched-messaging.c index f9d7641ae833..97e4a4fb3362 100644 --- a/tools/perf/bench/sched-messaging.c +++ b/tools/perf/bench/sched-messaging.c @@ -10,10 +10,7 @@ * */ -#include "../perf.h" -#include "../util/util.h" #include <subcmd/parse-options.h> -#include "../builtin.h" #include "bench.h" /* Test groups of 20 processes spraying to 20 receivers */ diff --git a/tools/perf/bench/sched-pipe.c b/tools/perf/bench/sched-pipe.c index 0591be008f2a..3c88d1f201f1 100644 --- a/tools/perf/bench/sched-pipe.c +++ b/tools/perf/bench/sched-pipe.c @@ -9,10 +9,7 @@ * http://people.redhat.com/mingo/cfs-scheduler/tools/pipe-test-1m.c * Ported to perf by Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp> */ -#include "../perf.h" -#include "../util/util.h" #include <subcmd/parse-options.h> -#include "../builtin.h" #include "bench.h" #include <unistd.h> |