linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/4] Add support for cpu event term
@ 2025-02-10 18:38 Ian Rogers
  2025-02-10 18:38 ` [PATCH v5 1/4] libperf cpumap: Add ability to create CPU from a single CPU number Ian Rogers
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Ian Rogers @ 2025-02-10 18:38 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Kan Liang, Leo Yan, Yoshihiro Furudera,
	Weilin Wang, Andi Kleen, James Clark, Dominique Martinet,
	Yicong Yang, linux-perf-users, linux-kernel

Being able to set the cpu mask per event was discussed in the context
of a sysfs event.cpus file is discussed here:
https://lore.kernel.org/lkml/CAP-5=fXXuWchzUK0n5KTH8kamr=DQoEni+bUoo8f-4j8Y+eMBg@mail.gmail.com/
Ultimately Kan preferred to have multiple PMUs with a cpumask each
rather than an event.cpus file per event. It is still useful to have
the cpu event term and so the sysfs part of the original patch series
is dropped.

v5: Purely a rebase.
v4: Add the stat-display output change for zero counters Namhyung
    requested as part of the series:
    https://lore.kernel.org/lkml/Zvx9VbJWtmkcuSBs@google.com/
    This skips zero values for CPUs not in the evsel's cpumask rather
    than the evsel's PMU's cpumask.
v3: Drop sysfs event.cpus file support patch from series.  Reference
    to using cpu to modify uncore events is dropped from the commit
    message. Reference counting issues on the cpumap are addressed.
v2: Add support for multiple cpu terms on an event that are
    merged. For example, an event of "l1d-misses/cpu=4,cpu=5/" will
    now be opened on both CPU 4 and 5 rather than just CPU 4.

Ian Rogers (4):
  libperf cpumap: Add ability to create CPU from a single CPU number
  perf stat: Use counter cpumask to skip zero values
  perf parse-events: Set is_pmu_core for legacy hardware events
  perf parse-events: Add "cpu" term to set the CPU an event is recorded
    on

 tools/lib/perf/cpumap.c                |  10 +++
 tools/lib/perf/include/perf/cpumap.h   |   2 +
 tools/perf/Documentation/perf-list.txt |   9 ++
 tools/perf/tests/event_update.c        |   1 +
 tools/perf/util/evsel_config.h         |   1 +
 tools/perf/util/parse-events.c         | 113 ++++++++++++++++++-------
 tools/perf/util/parse-events.h         |   3 +-
 tools/perf/util/parse-events.l         |   1 +
 tools/perf/util/pmu.c                  |   3 +-
 tools/perf/util/stat-display.c         |  21 +++--
 10 files changed, 125 insertions(+), 39 deletions(-)

-- 
2.48.1.502.g6dc24dfdaf-goog


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

end of thread, other threads:[~2025-04-03 19:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-10 18:38 [PATCH v5 0/4] Add support for cpu event term Ian Rogers
2025-02-10 18:38 ` [PATCH v5 1/4] libperf cpumap: Add ability to create CPU from a single CPU number Ian Rogers
2025-02-10 18:38 ` [PATCH v5 2/4] perf stat: Use counter cpumask to skip zero values Ian Rogers
2025-02-10 18:38 ` [PATCH v5 3/4] perf parse-events: Set is_pmu_core for legacy hardware events Ian Rogers
2025-04-03 15:16   ` Liang, Kan
2025-04-03 15:44     ` Ian Rogers
2025-04-03 19:25       ` Liang, Kan
2025-04-03 19:27         ` Ian Rogers
2025-02-10 18:38 ` [PATCH v5 4/4] perf parse-events: Add "cpu" term to set the CPU an event is recorded on Ian Rogers
2025-03-17 16:22 ` [PATCH v5 0/4] Add support for cpu event term Ian Rogers
2025-04-02 21:57   ` Ian Rogers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).