aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorIan Rogers <[email protected]>2024-01-31 13:49:40 +0000
committerNamhyung Kim <[email protected]>2024-02-02 21:08:05 +0000
commitfd7b8e8fb20f51d60dfee7792806548f3c6a4c2c (patch)
tree32bbf96c55e2b943a6c56818f2c6c14d4f2ea66c /tools/perf/util/scripting-engines/trace-event-python.c
parentperf parse-events: Improve error location of terms cloned from an event (diff)
downloadkernel-fd7b8e8fb20f51d60dfee7792806548f3c6a4c2c.tar.gz
kernel-fd7b8e8fb20f51d60dfee7792806548f3c6a4c2c.zip
perf parse-events: Print all errors
Prior to this patch the first and the last error encountered during parsing are printed. To see other errors verbose needs enabling. Unfortunately this can drop useful errors, in particular on terms. This patch changes the errors so that instead of the first and last all errors are recorded and printed, the underlying data structure is changed to a list. Before: ``` $ perf stat -e 'slots/edge=2/' true event syntax error: 'slots/edge=2/' \___ Bad event or PMU Unable to find PMU or event on a PMU of 'slots' Initial error: event syntax error: 'slots/edge=2/' \___ Cannot find PMU `slots'. Missing kernel support? 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 ``` After: ``` $ perf stat -e 'slots/edge=2/' true event syntax error: 'slots/edge=2/' \___ Bad event or PMU Unable to find PMU or event on a PMU of 'slots' event syntax error: 'slots/edge=2/' \___ value too big for format (edge), maximum is 1 event syntax error: 'slots/edge=2/' \___ Cannot find PMU `slots'. Missing kernel support? 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 ``` Signed-off-by: Ian Rogers <[email protected]> Reviewed-by: James Clark <[email protected]> Cc: Mark Rutland <[email protected]> Cc: [email protected] Cc: Kan Liang <[email protected]> Cc: Michael Petlan <[email protected]> Signed-off-by: Namhyung Kim <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions