| .. | .. |
|---|
| 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> |
|---|
| .. | .. |
|---|
| 90 | 91 | } |
|---|
| 91 | 92 | |
|---|
| 92 | 93 | static void block_threads(pthread_t *w, |
|---|
| 93 | | - pthread_attr_t thread_attr, struct cpu_map *cpu) |
|---|
| 94 | + pthread_attr_t thread_attr, struct perf_cpu_map *cpu) |
|---|
| 94 | 95 | { |
|---|
| 95 | 96 | cpu_set_t cpuset; |
|---|
| 96 | 97 | unsigned int i; |
|---|
| .. | .. |
|---|
| 123 | 124 | unsigned int i, j; |
|---|
| 124 | 125 | struct sigaction act; |
|---|
| 125 | 126 | pthread_attr_t thread_attr; |
|---|
| 126 | | - struct cpu_map *cpu; |
|---|
| 127 | + struct perf_cpu_map *cpu; |
|---|
| 127 | 128 | |
|---|
| 128 | 129 | argc = parse_options(argc, argv, options, bench_futex_wake_usage, 0); |
|---|
| 129 | 130 | if (argc) { |
|---|
| .. | .. |
|---|
| 131 | 132 | exit(EXIT_FAILURE); |
|---|
| 132 | 133 | } |
|---|
| 133 | 134 | |
|---|
| 134 | | - cpu = cpu_map__new(NULL); |
|---|
| 135 | + cpu = perf_cpu_map__new(NULL); |
|---|
| 135 | 136 | if (!cpu) |
|---|
| 136 | 137 | err(EXIT_FAILURE, "calloc"); |
|---|
| 137 | 138 | |
|---|
| 139 | + memset(&act, 0, sizeof(act)); |
|---|
| 138 | 140 | sigfillset(&act.sa_mask); |
|---|
| 139 | 141 | act.sa_sigaction = toggle_done; |
|---|
| 140 | 142 | sigaction(SIGINT, &act, NULL); |
|---|
| .. | .. |
|---|
| 208 | 210 | print_summary(); |
|---|
| 209 | 211 | |
|---|
| 210 | 212 | free(worker); |
|---|
| 213 | + perf_cpu_map__put(cpu); |
|---|
| 211 | 214 | return ret; |
|---|
| 212 | 215 | } |
|---|