Linux Perf Users
 help / color / mirror / Atom feed
* [PATCH v1 0/2] perf tool_pmu: Support enable/disable for tool PMU events
@ 2026-05-18 18:39 Ian Rogers
  2026-05-18 18:39 ` [PATCH v1 1/2] perf tool_pmu: Make tool PMU events respect enable/disable Ian Rogers
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Ian Rogers @ 2026-05-18 18:39 UTC (permalink / raw)
  To: Francesco Nigro, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Namhyung Kim, Jiri Olsa, Ian Rogers,
	Adrian Hunter, James Clark, Thomas Richter, linux-perf-users,
	linux-kernel

A regression in perf stat was reported where tool PMU events (like
duration_time used in CPUs_utilized metric) incorrectly included the
delay period when using the delay option (-D).

This series fixes the regression by making tool PMU events
(duration_time, user_time, system_time) behave more like regular
counters by implementing proper enable and disable support. They now
correctly accumulate values only when enabled.

The first patch implements the core enable/disable support for tool PMU
events, and the second patch adds a shell test to verify that
duration_time correctly excludes the delay period.

Ian Rogers (2):
  perf tool_pmu: Make tool PMU events respect enable/disable
  perf tests: Add test for stat delay option with duration_time

 tools/perf/tests/shell/stat.sh |  33 +++++
 tools/perf/util/evsel.c        |  85 +++++++------
 tools/perf/util/evsel.h        |  10 +-
 tools/perf/util/tool_pmu.c     | 212 ++++++++++++++++++++++++---------
 tools/perf/util/tool_pmu.h     |   2 +
 5 files changed, 249 insertions(+), 93 deletions(-)

-- 
2.54.0.631.ge1b05301d1-goog


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

end of thread, other threads:[~2026-05-20 23:06 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-18 18:39 [PATCH v1 0/2] perf tool_pmu: Support enable/disable for tool PMU events Ian Rogers
2026-05-18 18:39 ` [PATCH v1 1/2] perf tool_pmu: Make tool PMU events respect enable/disable Ian Rogers
2026-05-18 19:26   ` sashiko-bot
2026-05-18 18:39 ` [PATCH v1 2/2] perf tests: Add test for stat delay option with duration_time Ian Rogers
2026-05-18 19:33   ` sashiko-bot
2026-05-18 20:14 ` [PATCH v2 0/2] perf tool_pmu: Support enable/disable for tool PMU events Ian Rogers
2026-05-18 20:14   ` [PATCH v2 1/2] perf tool_pmu: Make tool PMU events respect enable/disable Ian Rogers
2026-05-18 20:49     ` sashiko-bot
2026-05-18 20:14   ` [PATCH v2 2/2] perf tests: Add test for stat delay option with duration_time Ian Rogers
2026-05-18 20:55     ` sashiko-bot
2026-05-18 22:37   ` [PATCH v3 0/2] perf tool_pmu: Support enable/disable for tool PMU events Ian Rogers
2026-05-18 22:37     ` [PATCH v3 1/2] perf tool_pmu: Make tool PMU events respect enable/disable Ian Rogers
2026-05-18 23:02       ` sashiko-bot
2026-05-18 22:37     ` [PATCH v3 2/2] perf tests: Add test for stat delay option with duration_time Ian Rogers
2026-05-19  1:41     ` [PATCH v4 0/2] perf tool_pmu: Support enable/disable for tool PMU events Ian Rogers
2026-05-19  1:41       ` [PATCH v4 1/2] perf tool_pmu: Make tool PMU events respect enable/disable Ian Rogers
2026-05-19  6:43         ` Namhyung Kim
2026-05-19  8:13           ` Ian Rogers
2026-05-20 23:06             ` Namhyung Kim
2026-05-19  1:41       ` [PATCH v4 2/2] perf tests: Add test for stat delay option with duration_time Ian Rogers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox