perf test: Remove event_group test for events in multiple PMUs
PATCH 1/1 perf test: Remove event_group test for events in multiple PMUs
The test fails on various environments, since not all the combinations of events in a group work. Based on fact, that perf contains code that re-organizes events in groups (and also removes groups when it does not make sense), I assume that there is no rule an arbitrary combination of arbitrary events *should* be supported.
When an uncore event is grouped together with cycles and cs (a sw event):
# perf stat -e '{uncore_cbox_0/clockticks/,cs,cycles}'Quoted 3 lines
WARNING: events were regrouped to match PMUs
WARNING: grouped events cpus do not match.
Events with CPUs not matching the leader will be removed from the group.
anon group { uncore_cbox_0/clockticks/, cs }
^C(the CPU used is Haswell (Intel, family 6, model 60)
The test uses perf_event_open() syscall and bypasses the algorithms perf tool uses to prevent scheduling invalid groups.
Remove the test-case then.
--- tools/perf/tests/Build | 1 - tools/perf/tests/builtin-test.c | 1 - tools/perf/tests/event_groups.c | 136 -------------------------------- tools/perf/tests/tests.h | 1 - 4 files changed, 139 deletions(-) delete mode 100644 tools/perf/tests/event_groups.c
tools/perf/tests/Build +0 -1
@@ -57,21 +57,20 @@ perf-y += genelf.o perf-y += api-io.o perf-y += demangle-java-test.o perf-y += demangle-ocaml-test.o perf-y += pfm.o perf-y += parse-metric.o perf-y += pe-file-parsing.o perf-y += expand-cgroup.o perf-y += perf-time-to-tsc.o perf-y += dlfilter-test.o perf-y += sigtrap.o -perf-y += event_groups.o perf-y += symbols.o ifeq ($(SRCARCH),$(filter $(SRCARCH),x86 arm arm64 powerpc)) perf-$(CONFIG_DWARF_UNWIND) += dwarf-unwind.o endif CFLAGS_attr.o += -DBINDIR="BUILD_STR($(bindir_SQ))" -DPYTHON="BUILD_STR($(PYTHON_WORD))" CFLAGS_python-use.o += -DPYTHONPATH="BUILD_STR($(OUTPUT)python)" -DPYTHON="BUILD_STR($(PYTHON_WORD))" CFLAGS_dwarf-unwind.o += -fno-optimize-sibling-calls
tools/perf/tests/builtin-test.c +0 -1
@@ -114,21 +114,20 @@ static struct test_suite *generic_tests[] = { &suite__api_io, &suite__maps__merge_in, &suite__demangle_java, &suite__demangle_ocaml, &suite__parse_metric, &suite__pe_file_parsing, &suite__expand_cgroup_events, &suite__perf_time_to_tsc, &suite__dlfilter, &suite__sigtrap, - &suite__event_groups, &suite__symbols, NULL, };static struct test_suite **tests[] = { generic_tests, arch_tests, }; static struct test_workload *workloads[] = {
tools/perf/tests/event_groups.c deleted +0 -136
136 lines not on this page · raw message
tools/perf/tests/tests.h +0 -1
@@ -136,21 +136,20 @@ DECLARE_SUITE(jit_write_elf);DECLARE_SUITE (api_io);DECLARE_SUITE (demangle_java);DECLARE_SUITE (demangle_ocaml);DECLARE_SUITE (pfm);DECLARE_SUITE (parse_metric);DECLARE_SUITE (pe_file_parsing);DECLARE_SUITE (expand_cgroup_events);DECLARE_SUITE (perf_time_to_tsc);DECLARE_SUITE (dlfilter);DECLARE_SUITE (sigtrap); -DECLARE_SUITE (event_groups);DECLARE_SUITE (symbols);/* * PowerPC and S390 do not support creation of instruction breakpoints using the * perf_event interface. * * ARM requires explicit rounding down of the instruction pointer in Thumb mode, * and then requires the single-step to be handled explicitly in the overflow * handler to avoid stepping into the SIGIO handler and getting stuck on the * breakpointed instruction.
Signature · 1 line
2.18.4
Hi Michael,
Quoted 11 lines · Michael Petlan
The test fails on various environments, since not all the combinations of events in a group work. Based on fact, that perf contains code that re-organizes events in groups (and also removes groups when it does not make sense), I assume that there is no rule an arbitrary combination of arbitrary events *should* be supported.
When an uncore event is grouped together with cycles and cs (a sw event):
# perf stat -e '{uncore_cbox_0/clockticks/,cs,cycles}'Quoted 3 lines
WARNING: events were regrouped to match PMUs
WARNING: grouped events cpus do not match.
Events with CPUs not matching the leader will be removed from the group.
Quoted 8 lines
anon group { uncore_cbox_0/clockticks/, cs } ^C(the CPU used is Haswell (Intel, family 6, model 60)
The test uses
perf_event_open()syscall and bypasses the algorithms perf tool uses to prevent scheduling invalid groups.Remove the test-case then.
Event group of different hw pmus is not allowed by kernel. This selftest is to validate the kernel code, not the perf tool. Please see:
https://git.kernel.org/torvalds/c/bf480f93856673
Can you please rather fix the test instead of removing it.
Thanks,
Ravi