Skip to content

perf: Support event alias in form foo-bar-baz

John Garry linux-perf-users lkml 1 version Applied

Status from this message: Thanks, applied.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3perf parse-events: Support event alias in form foo-bar-baztools/perf/util/parse-events.c tools/perf/util/parse-events.h tools/perf/util/parse-events.l +1 more+41 -40 replies
2/3perf test: Add pmu-events test for aliases with hyphenstools/perf/pmu-events/arch/test/test_soc/cpu/uncore.json tools/perf/tests/pmu-events.c+48 -00 replies
3/3perf test: Add parse-events test for aliases with hyphenstools/perf/tests/parse-events.c tools/perf/util/parse-events.c+82 -90 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchIan Rogers
SeriesA-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] perf: Support event alias in form foo-bar-baz

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(-)
Signature · 1 line
2.26.2