linux/tools/perf/lib
Andi Kleen a2408a7036 perf evlist: Maintain evlist->all_cpus
Maintain a cpumap in the evlist that is the union of all the cpus of the
events.

This needs a cpumap merge operation, which is added together with tests.

v2:
Add tests for cpu map merge
Fix handling of duplicates
Rename _update to _merge
Factor out sorting.
Fix handling of NULL maps in merge

v3:
Add comments and empty lines to _merge

Committer testing:

  # perf test "Merge cpu map"
  52: Merge cpu map                                         : Ok
  #

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Link: http://lore.kernel.org/lkml/20191121001522.180827-5-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2019-11-29 12:20:45 -03:00
..
Documentation libperf: Initial documentation 2019-07-29 18:34:47 -03:00
include perf evlist: Maintain evlist->all_cpus 2019-11-29 12:20:45 -03:00
tests libperf: Keep count of failed tests 2019-10-19 15:35:01 -03:00
Build libperf: Add perf_mmap__init() function 2019-10-10 09:37:25 -03:00
core.c perf tools: Propagate CFLAGS to libperf 2019-10-11 10:55:22 -03:00
cpumap.c perf evlist: Maintain evlist->all_cpus 2019-11-29 12:20:45 -03:00
evlist.c perf evlist: Maintain evlist->all_cpus 2019-11-29 12:20:45 -03:00
evsel.c perf evsel: Avoid close(-1) 2019-11-06 15:43:05 -03:00
internal.h libperf: Add pr_err() macro 2019-10-19 15:35:01 -03:00
lib.c libperf: Move 'page_size' global variable to libperf 2019-09-25 09:51:48 -03:00
libperf.map libperf: Do not export perf_evsel__init()/perf_evlist__init() 2019-10-19 15:35:01 -03:00
libperf.pc.template libperf: Add install targets 2019-07-29 18:34:46 -03:00
Makefile libperf: Link static tests with libapi.a 2019-10-19 15:35:01 -03:00
mmap.c libperf: Introduce perf_evlist__for_each_mmap() 2019-10-19 15:35:01 -03:00
threadmap.c libperf: Add perf_thread_map__nr/perf_thread_map__pid functions 2019-08-22 17:16:57 -03:00
xyarray.c libperf: Adopt xyarray class from perf 2019-07-29 18:34:45 -03:00