mirror of
https://github.com/torvalds/linux.git
synced 2026-04-19 07:13:56 -04:00
Move libperf from its current location under tools/perf to a separate directory under tools/lib/. Also change various paths (mainly includes) to reflect the libperf move to a separate directory and add a new directory under MANIFEST. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20191206210612.8676-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
29 lines
1.1 KiB
C
29 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __LIBPERF_CPUMAP_H
|
|
#define __LIBPERF_CPUMAP_H
|
|
|
|
#include <perf/core.h>
|
|
#include <stdio.h>
|
|
#include <stdbool.h>
|
|
|
|
struct perf_cpu_map;
|
|
|
|
LIBPERF_API struct perf_cpu_map *perf_cpu_map__dummy_new(void);
|
|
LIBPERF_API struct perf_cpu_map *perf_cpu_map__new(const char *cpu_list);
|
|
LIBPERF_API struct perf_cpu_map *perf_cpu_map__read(FILE *file);
|
|
LIBPERF_API struct perf_cpu_map *perf_cpu_map__get(struct perf_cpu_map *map);
|
|
LIBPERF_API struct perf_cpu_map *perf_cpu_map__merge(struct perf_cpu_map *orig,
|
|
struct perf_cpu_map *other);
|
|
LIBPERF_API void perf_cpu_map__put(struct perf_cpu_map *map);
|
|
LIBPERF_API int perf_cpu_map__cpu(const struct perf_cpu_map *cpus, int idx);
|
|
LIBPERF_API int perf_cpu_map__nr(const struct perf_cpu_map *cpus);
|
|
LIBPERF_API bool perf_cpu_map__empty(const struct perf_cpu_map *map);
|
|
LIBPERF_API int perf_cpu_map__max(struct perf_cpu_map *map);
|
|
|
|
#define perf_cpu_map__for_each_cpu(cpu, idx, cpus) \
|
|
for ((idx) = 0, (cpu) = perf_cpu_map__cpu(cpus, idx); \
|
|
(idx) < perf_cpu_map__nr(cpus); \
|
|
(idx)++, (cpu) = perf_cpu_map__cpu(cpus, idx))
|
|
|
|
#endif /* __LIBPERF_CPUMAP_H */
|