[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-f7fa827f5f432a0b1f34e10fc49da93aeef9f817@git.kernel.org>
Date: Wed, 13 Jun 2018 23:21:13 -0700
From: tip-bot for Jiri Olsa <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: eranian@...gle.com, namhyung@...nel.org, peterz@...radead.org,
alexander.shishkin@...ux.intel.com, linux-kernel@...r.kernel.org,
tglx@...utronix.de, dsahern@...il.com, jolsa@...nel.org,
milian.wolff@...b.com, frederic@...nel.org, mingo@...nel.org,
andi@...stfloor.org, acme@...hat.com, hpa@...or.com
Subject: [tip:perf/urgent] perf tools: Fix error index for pmu event parser
Commit-ID: f7fa827f5f432a0b1f34e10fc49da93aeef9f817
Gitweb: https://git.kernel.org/tip/f7fa827f5f432a0b1f34e10fc49da93aeef9f817
Author: Jiri Olsa <jolsa@...nel.org>
AuthorDate: Thu, 7 Jun 2018 00:15:05 +0200
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Thu, 7 Jun 2018 15:50:14 -0300
perf tools: Fix error index for pmu event parser
For events we provide specific error message we need to set error column
index, PMU parser is missing that, adding it.
Before:
$ perf stat -e cycles,krava/cycles/ kill
event syntax error: 'cycles,krava/cycles/'
\___ Cannot find PMU `krava'. Missing kernel support?
After:
$ perf stat -e cycles,krava/cycles/ kill
event syntax error: 'cycles,krava/cycles/'
\___ Cannot find PMU `krava'. Missing kernel support?
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Andi Kleen <andi@...stfloor.org>
Cc: David Ahern <dsahern@...il.com>
Cc: Frederic Weisbecker <frederic@...nel.org>
Cc: Milian Wolff <milian.wolff@...b.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stephane Eranian <eranian@...gle.com>
Link: http://lkml.kernel.org/r/20180606221513.11302-3-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/parse-events.y | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index 155d2570274f..da8fe57691b8 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -227,11 +227,16 @@ event_def: event_pmu |
event_pmu:
PE_NAME opt_pmu_config
{
+ struct parse_events_state *parse_state = _parse_state;
+ struct parse_events_error *error = parse_state->error;
struct list_head *list, *orig_terms, *terms;
if (parse_events_copy_term_list($2, &orig_terms))
YYABORT;
+ if (error)
+ error->idx = @1.first_column;
+
ALLOC_LIST(list);
if (parse_events_add_pmu(_parse_state, list, $1, $2, false, false)) {
struct perf_pmu *pmu = NULL;
Powered by blists - more mailing lists