All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/4] perf: Rework event forwarding logic
@ 2023-05-04 10:59 Ravi Bangoria
  2023-05-04 11:00 ` [PATCH v4 1/4] perf/core: Rework forwarding of {task|cpu}-clock events Ravi Bangoria
                   ` (3 more replies)
  0 siblings, 4 replies; 35+ messages in thread
From: Ravi Bangoria @ 2023-05-04 10:59 UTC (permalink / raw)
  To: peterz
  Cc: ravi.bangoria, namhyung, eranian, acme, mark.rutland, jolsa,
	irogers, bp, kan.liang, adrian.hunter, maddy, x86,
	linux-perf-users, linux-kernel, sandipan.das, ananth.narayan,
	santosh.shukla

Usually, events are opened on the same pmu as requested by user via
perf_event_attr->type argument. But certain special events are
internally redirected to different pmu. Currently such pmus needs to
be treated specially and thus requires some gruesome hacks.

An approach, suggested by Peter Zijlstra, to get rid of these hacks
was to overwrite event attributes with new pmu's attribute values
within the kernel and let perf_event_init() retry opening the event
with overwritten values. This patch series implements it.

v3: https://lore.kernel.org/r/20230425142205.762-1-ravi.bangoria@amd.com
v3->v4:
 - Split pmu linear searching changes into a separate patch with few
   additional changes.
 - Use special pointer value (void *)(~0) instead of introducing new
   variable to skip creating sysfs/dev files.
 - Move AMD IBS unit test under tools/perf/arch/x86/tests/

Patches are prepared on v6.3.

Ravi Bangoria (4):
  perf/core: Rework forwarding of {task|cpu}-clock events
  perf/ibs: Fix interface via core pmu events
  perf/core: Remove pmu linear searching code
  perf test: Add selftest to test IBS invocation via core pmu events

 arch/x86/events/amd/core.c                    |   2 +-
 arch/x86/events/amd/ibs.c                     |  53 ++++----
 arch/x86/include/asm/perf_event.h             |   2 +
 include/linux/perf_event.h                    |  10 ++
 kernel/events/core.c                          | 114 +++++++++---------
 tools/perf/arch/x86/include/arch-tests.h      |   1 +
 tools/perf/arch/x86/tests/Build               |   1 +
 .../arch/x86/tests/amd-ibs-via-core-pmu.c     |  71 +++++++++++
 tools/perf/arch/x86/tests/arch-tests.c        |   2 +
 9 files changed, 168 insertions(+), 88 deletions(-)
 create mode 100644 tools/perf/arch/x86/tests/amd-ibs-via-core-pmu.c

-- 
2.40.0


^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2024-02-29  3:46 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-04 10:59 [PATCH v4 0/4] perf: Rework event forwarding logic Ravi Bangoria
2023-05-04 11:00 ` [PATCH v4 1/4] perf/core: Rework forwarding of {task|cpu}-clock events Ravi Bangoria
2023-05-10 13:33   ` [tip: perf/core] " tip-bot2 for Ravi Bangoria
2024-02-20  8:41   ` [PATCH v4 1/4] " Pengfei Xu
2024-02-23  5:27     ` Ravi Bangoria
2024-02-28 12:49       ` Ravi Bangoria
2024-02-29  3:41         ` Pengfei Xu
2023-05-04 11:00 ` [PATCH v4 2/4] perf/ibs: Fix interface via core pmu events Ravi Bangoria
2023-05-10 13:33   ` [tip: perf/core] " tip-bot2 for Ravi Bangoria
2023-05-04 11:00 ` [PATCH v4 3/4] perf/core: Remove pmu linear searching code Ravi Bangoria
2023-05-10 13:33   ` [tip: perf/core] " tip-bot2 for Ravi Bangoria
2023-05-24 21:41   ` [PATCH v4 3/4] " Nathan Chancellor
2023-05-25  5:16     ` Ravi Bangoria
2023-05-25  7:11       ` Oliver Upton
2023-05-25 14:20         ` Peter Zijlstra
2023-05-25 15:56           ` Oliver Upton
2023-05-26 23:00             ` Ian Rogers
2023-05-27 13:32               ` Marc Zyngier
2023-05-27 17:00                 ` Ian Rogers
2023-05-27 17:05                   ` Ian Rogers
2023-05-27 18:38                   ` Marc Zyngier
2023-05-27 19:50                     ` Ian Rogers
2023-05-30  7:45                     ` Thomas Richter
2023-05-30 14:00                       ` Ian Rogers
2023-05-31  9:09                         ` Thomas Richter
2023-05-31 20:20                           ` Ian Rogers
2023-06-01 11:02                             ` Thomas Richter
2023-06-01 11:18                               ` Peter Zijlstra
2023-06-01 11:20                                 ` Peter Zijlstra
2023-05-25 15:55         ` Nathan Chancellor
2023-05-04 11:00 ` [PATCH v4 4/4] perf test: Add selftest to test IBS invocation via core pmu events Ravi Bangoria
2023-05-05  9:16   ` Peter Zijlstra
2023-05-15 21:31     ` Arnaldo Carvalho de Melo
2023-05-15 21:33       ` Arnaldo Carvalho de Melo
2023-05-10 13:33   ` [tip: perf/core] " tip-bot2 for Ravi Bangoria

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.