]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tools/perf: Allow inherit + PERF_SAMPLE_READ when opening events
authorBen Gainey <ben.gainey@arm.com>
Tue, 1 Oct 2024 12:15:05 +0000 (13:15 +0100)
committerNamhyung Kim <namhyung@kernel.org>
Wed, 2 Oct 2024 21:58:03 +0000 (14:58 -0700)
commit90035d3cd876cb71f98868d44ee60f5c5aa5ad69
tree3466c937feaa806b84204d7e7e5895c9fa489229
parent80c281fca252827facd05875b8d9d36d7aad0f8d
tools/perf: Allow inherit + PERF_SAMPLE_READ when opening events

The "perf record" tool will now default to this new mode if the user
specifies a sampling group when not in system-wide mode, and when
"--no-inherit" is not specified.

This change updates evsel to allow the combination of inherit
and PERF_SAMPLE_READ.

A fallback is implemented for kernel versions where this feature is not
supported.

Signed-off-by: Ben Gainey <ben.gainey@arm.com>
Cc: james.clark@arm.com
Link: https://lore.kernel.org/r/20241001121505.1009685-3-ben.gainey@arm.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/tests/attr/README
tools/perf/tests/attr/test-record-C0
tools/perf/tests/attr/test-record-dummy-C0
tools/perf/tests/attr/test-record-group-sampling
tools/perf/tests/attr/test-record-group-sampling1 [new file with mode: 0644]
tools/perf/tests/attr/test-record-group-sampling2 [new file with mode: 0644]
tools/perf/tests/attr/test-record-group2
tools/perf/tests/attr/test-record-group3 [new file with mode: 0644]
tools/perf/util/evsel.c
tools/perf/util/evsel.h