2 #ifndef __PERF_CPUMAP_H 3 #define __PERF_CPUMAP_H 7 #include <linux/refcount.h> 38 if (!sock || s > sock->
nr || s < 0)
55 return map ? map->
nr : 1;
60 return map ? map->
map[0] == -1 :
true;
struct cpu_map * cpu_map__get(struct cpu_map *map)
static int cpu_map__id_to_socket(int id)
struct cpu_map * cpu_map__read(FILE *file)
int cpu_map__get_core(struct cpu_map *map, int idx, void *data)
static int cpu_map__nr(const struct cpu_map *map)
size_t cpu_map__fprintf(struct cpu_map *map, FILE *fp)
static int cpu_map__id_to_cpu(int id)
struct cpu_map * cpu_map__new_data(struct cpu_map_data *data)
int cpu_map__cpu(struct cpu_map *cpus, int idx)
int cpu__max_present_cpu(void)
size_t cpu_map__snprint(struct cpu_map *map, char *buf, size_t size)
int cpu_map__get_socket(struct cpu_map *map, int idx, void *data)
void cpu_map__put(struct cpu_map *map)
int cpu__get_node(int cpu)
int cpu_map__get_core_id(int cpu)
struct cpu_map * cpu_map__new(const char *cpu_list)
struct cpu_map * cpu_map__empty_new(int nr)
static bool cpu_map__empty(const struct cpu_map *map)
int cpu__setup_cpunode_map(void)
static const char * cpu_list
int cpu_map__build_socket_map(struct cpu_map *cpus, struct cpu_map **sockp)
int cpu_map__build_map(struct cpu_map *cpus, struct cpu_map **res, int(*f)(struct cpu_map *map, int cpu, void *data), void *data)
int cpu_map__get_socket_id(int cpu)
int cpu_map__idx(struct cpu_map *cpus, int cpu)
struct cpu_map * cpu_map__dummy_new(void)
size_t cpu_map__snprint_mask(struct cpu_map *map, char *buf, size_t size)
bool cpu_map__has(struct cpu_map *cpus, int cpu)
static int cpu_map__socket(struct cpu_map *sock, int s)
int cpu_map__build_core_map(struct cpu_map *cpus, struct cpu_map **corep)