linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] perf: Support event alias in form foo-bar-baz
@ 2022-01-17 15:10 John Garry
  2022-01-17 15:10 ` [PATCH 1/3] perf parse-events: " John Garry
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: John Garry @ 2022-01-17 15:10 UTC (permalink / raw)
  To: peterz, mingo, acme, mark.rutland, alexander.shishkin, jolsa,
	namhyung, irogers, kjain
  Cc: linux-perf-users, linux-kernel, linuxarm, liuqi115, zhangshaokun,
	John Garry

Currently event aliases in the form foo-bar-baz are not supported.

The HiSilicon D06 platform has uncore event aliases in that form, and
using those aliases fail:

$ ./perf list sdir-home-migrate 
  
List of pre-defined events (to be used in -e): 
  
uncore hha:
  sdir-home-migrate 
 [Unit: hisi_sccl,hha]  

$ sudo ./perf stat -e sdir-home-migrate  
event syntax error: 'sdir-home-migrate'  
                        \___ parser error  
Run 'perf list' for a list of valid events  
  
 Usage: perf stat [<options>] [<command>]
  
 -e, --event <event>event selector. use 'perf list' to list available events

This series added support for such an event alias form.

I am no expert on l+y, so any and all review here would be appreciated,
especially the last patch which is marked as RFC (for that same reason).

The series is based on acme perf/core @ 9bce13ea88f8.

John Garry (3):
  perf parse-events: Support event alias in form foo-bar-baz
  perf test: Add pmu-events test for aliases with hyphens
  perf test: Add parse-events test for aliases with hyphens

 .../arch/test/test_soc/cpu/uncore.json        | 16 +++++
 tools/perf/tests/parse-events.c               | 49 ++++++++++++++
 tools/perf/tests/pmu-events.c                 | 32 +++++++++
 tools/perf/util/parse-events.c                | 67 ++++++++++++++++---
 tools/perf/util/parse-events.h                |  1 +
 tools/perf/util/parse-events.l                |  2 +
 tools/perf/util/parse-events.y                | 17 ++++-
 7 files changed, 171 insertions(+), 13 deletions(-)

-- 
2.26.2


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

end of thread, other threads:[~2022-01-22 20:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-17 15:10 [PATCH 0/3] perf: Support event alias in form foo-bar-baz John Garry
2022-01-17 15:10 ` [PATCH 1/3] perf parse-events: " John Garry
2022-01-17 15:10 ` [PATCH 2/3] perf test: Add pmu-events test for aliases with hyphens John Garry
2022-01-17 15:10 ` [PATCH 3/3] perf test: Add parse-events " John Garry
2022-01-17 16:21 ` [PATCH 0/3] perf: Support event alias in form foo-bar-baz Ian Rogers
2022-01-22 20:22   ` Arnaldo Carvalho de Melo

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).