linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v1 0/3] Retirement latency perf stat support
@ 2024-04-25 22:34 Ian Rogers
  2024-04-25 22:34 ` [RFC PATCH v1 1/3] perf evsel: Don't open tool events Ian Rogers
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Ian Rogers @ 2024-04-25 22:34 UTC (permalink / raw)
  To: weilin.wang, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
	Kan Liang, Ze Gao, Leo Yan, Ravi Bangoria, Dmitrii Dolgov,
	Song Liu, James Clark, linux-perf-users, linux-kernel

Support 'R' as a retirement latency modifier on events. When present
the evsel will fork perf record and perf report commands, parsing the
perf report output as the count value. The intent is to do something
similar to Weilin's series:
https://lore.kernel.org/lkml/20240402214436.1409476-1-weilin.wang@intel.com/

While the 'R' and the retirement latency are Intel specific, in the
future I can imagine more evsel like commands that require child
processes. We can make the logic more generic at that point.

The code is untested on hardware that supports retirement latency, and
with metrics with retirement latency in them. The record is also of
sleep and various things need tweaking but I think v1 is good enough
for people to give input.

The first patch stops opening a dummy event for tool events. I came
across this while looking into the issue and we can likely just pick
it first. I kept it in the series for cleanliness sake.

The code has benefitted greatly from Weilin's work and Namhyung's
great review input.

Ian Rogers (3):
  perf evsel: Don't open tool events
  perf parse-events: Add a retirement latency modifier
  perf evsel: Add retirement latency event support

 tools/perf/util/evsel.c        | 186 ++++++++++++++++++++++++++++++++-
 tools/perf/util/evsel.h        |   4 +
 tools/perf/util/parse-events.c |   2 +
 tools/perf/util/parse-events.h |   1 +
 tools/perf/util/parse-events.l |   3 +-
 5 files changed, 192 insertions(+), 4 deletions(-)

-- 
2.44.0.769.g3c40516874-goog


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

end of thread, other threads:[~2024-04-26 17:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-25 22:34 [RFC PATCH v1 0/3] Retirement latency perf stat support Ian Rogers
2024-04-25 22:34 ` [RFC PATCH v1 1/3] perf evsel: Don't open tool events Ian Rogers
2024-04-25 22:34 ` [RFC PATCH v1 2/3] perf parse-events: Add a retirement latency modifier Ian Rogers
2024-04-25 22:34 ` [RFC PATCH v1 3/3] perf evsel: Add retirement latency event support Ian Rogers
2024-04-25 22:41 ` [RFC PATCH v1 0/3] Retirement latency perf stat support Ian Rogers
2024-04-26 17:22 ` Liang, Kan
2024-04-26 17:34   ` 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).