diff options
author | Andi Kleen <ak@linux.intel.com> | 2019-11-21 01:15:14 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-11-29 16:20:45 +0100 |
commit | a2408a70368ade9c99de27da78d49416313b8833 (patch) | |
tree | e34ab005c4f25808202ab03420b643faca142155 /tools/perf/tests/tests.h | |
parent | perf cpumap: Maintain cpumaps ordered and without dups (diff) | |
download | linux-a2408a70368ade9c99de27da78d49416313b8833.tar.xz linux-a2408a70368ade9c99de27da78d49416313b8833.zip |
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>
Diffstat (limited to 'tools/perf/tests/tests.h')
-rw-r--r-- | tools/perf/tests/tests.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h index 25aea387e2bf..4f9ae6af78ec 100644 --- a/tools/perf/tests/tests.h +++ b/tools/perf/tests/tests.h @@ -98,6 +98,7 @@ int test__event_update(struct test *test, int subtest); int test__event_times(struct test *test, int subtest); int test__backward_ring_buffer(struct test *test, int subtest); int test__cpu_map_print(struct test *test, int subtest); +int test__cpu_map_merge(struct test *test, int subtest); int test__sdt_event(struct test *test, int subtest); int test__is_printable_array(struct test *test, int subtest); int test__bitmap_print(struct test *test, int subtest); |