.. | .. |
---|
20 | 20 | #include <linux/kernel.h> |
---|
21 | 21 | #include <linux/time64.h> |
---|
22 | 22 | #include <errno.h> |
---|
| 23 | +#include <internal/cpumap.h> |
---|
| 24 | +#include <perf/cpumap.h> |
---|
23 | 25 | #include "bench.h" |
---|
24 | 26 | #include "futex.h" |
---|
25 | | -#include "cpumap.h" |
---|
26 | 27 | |
---|
27 | 28 | #include <err.h> |
---|
28 | 29 | #include <stdlib.h> |
---|
.. | .. |
---|
84 | 85 | } |
---|
85 | 86 | |
---|
86 | 87 | static void block_threads(pthread_t *w, |
---|
87 | | - pthread_attr_t thread_attr, struct cpu_map *cpu) |
---|
| 88 | + pthread_attr_t thread_attr, struct perf_cpu_map *cpu) |
---|
88 | 89 | { |
---|
89 | 90 | cpu_set_t cpuset; |
---|
90 | 91 | unsigned int i; |
---|
.. | .. |
---|
117 | 118 | unsigned int i, j; |
---|
118 | 119 | struct sigaction act; |
---|
119 | 120 | pthread_attr_t thread_attr; |
---|
120 | | - struct cpu_map *cpu; |
---|
| 121 | + struct perf_cpu_map *cpu; |
---|
121 | 122 | |
---|
122 | 123 | argc = parse_options(argc, argv, options, bench_futex_requeue_usage, 0); |
---|
123 | 124 | if (argc) |
---|
124 | 125 | goto err; |
---|
125 | 126 | |
---|
126 | | - cpu = cpu_map__new(NULL); |
---|
| 127 | + cpu = perf_cpu_map__new(NULL); |
---|
127 | 128 | if (!cpu) |
---|
128 | 129 | err(EXIT_FAILURE, "cpu_map__new"); |
---|
129 | 130 | |
---|
| 131 | + memset(&act, 0, sizeof(act)); |
---|
130 | 132 | sigfillset(&act.sa_mask); |
---|
131 | 133 | act.sa_sigaction = toggle_done; |
---|
132 | 134 | sigaction(SIGINT, &act, NULL); |
---|
.. | .. |
---|
214 | 216 | print_summary(); |
---|
215 | 217 | |
---|
216 | 218 | free(worker); |
---|
| 219 | + perf_cpu_map__put(cpu); |
---|
217 | 220 | return ret; |
---|
218 | 221 | err: |
---|
219 | 222 | usage_with_options(bench_futex_requeue_usage, options); |
---|