All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>,
	David Ahern <dsahern@gmail.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: [RFC 0/6] perf tools: Report event parsing errors
Date: Sat, 18 Apr 2015 19:25:40 +0200	[thread overview]
Message-ID: <1429377946-2147-1-git-send-email-jolsa@kernel.org> (raw)

hi,
adding support to report error from event string parsing.

This patchset contains support for standard parsing errors
and more logic to recognize tracepoint and 'pmu//' terms,
like:

  $ perf record -e 'sched:krava' ls
  invalid or unsupported event: 'sched:krava'
                                 \___ unknown tracepoint

  $ ./perf record -e 'cpu/even=0x1/' ls
  invalid or unsupported event: 'cpu/even=0x1/'
                                     \___ unknown term

  $ perf record -e cycles,cache-mises ls
  invalid or unsupported event: '..es,cache-mises'
                                           \___ parser error

any feedback about the error string shape would be great ;-)

Changes are also reachable in here:
  git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
  perf/event_parse_error

thanks
jirka


---
Jiri Olsa (6):
      perf tools: Add parse_events_error interface
      perf tools: Add flex support for parse_events_error
      perf tools: Change parse_events_add_pmu interface
      perf tools: Add location to pmu event terms
      perf tools: Add term support for parse_events_error
      perf tools: Add tracepoint support for parse_events_error

 tools/perf/builtin-stat.c               |   2 +-
 tools/perf/tests/code-reading.c         |   2 +-
 tools/perf/tests/evsel-roundtrip-name.c |   4 +--
 tools/perf/tests/hists_cumulate.c       |   2 +-
 tools/perf/tests/hists_filter.c         |   4 +--
 tools/perf/tests/hists_link.c           |   4 +--
 tools/perf/tests/hists_output.c         |   2 +-
 tools/perf/tests/keep-tracking.c        |   4 +--
 tools/perf/tests/parse-events.c         |   2 +-
 tools/perf/tests/perf-time-to-tsc.c     |   2 +-
 tools/perf/tests/pmu.c                  |   2 +-
 tools/perf/tests/switch-tracking.c      |   8 +++---
 tools/perf/util/parse-events.c          | 135 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------
 tools/perf/util/parse-events.h          |  32 ++++++++++++++--------
 tools/perf/util/parse-events.l          |  37 ++++++++++++++++++++++---
 tools/perf/util/parse-events.y          |  35 ++++++++++++++----------
 tools/perf/util/pmu.c                   |  23 +++++++++++-----
 tools/perf/util/pmu.h                   |   6 +++--
 tools/perf/util/record.c                |   4 +--
 19 files changed, 230 insertions(+), 80 deletions(-)

             reply	other threads:[~2015-04-18 17:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-18 17:25 Jiri Olsa [this message]
2015-04-18 17:25 ` [PATCH 1/6] perf tools: Add parse_events_error interface Jiri Olsa
2015-04-18 17:25 ` [PATCH 2/6] perf tools: Add flex support for parse_events_error Jiri Olsa
2015-04-18 17:25 ` [PATCH 3/6] perf tools: Change parse_events_add_pmu interface Jiri Olsa
2015-04-18 17:25 ` [PATCH 4/6] perf tools: Add location to pmu event terms Jiri Olsa
2015-04-18 17:25 ` [PATCH 5/6] perf tools: Add term support for parse_events_error Jiri Olsa
2015-04-18 17:25 ` [PATCH 6/6] perf tools: Add tracepoint " Jiri Olsa
2015-04-18 17:39 ` [RFC 0/6] perf tools: Report event parsing errors Ingo Molnar
2015-04-18 20:42   ` Jiri Olsa
2015-04-20 20:09     ` Arnaldo Carvalho de Melo
2015-04-20 20:15       ` Jiri Olsa
2015-04-20 20:38         ` Arnaldo Carvalho de Melo
2015-04-22 14:08           ` Jiri Olsa
2015-04-22 14:37             ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1429377946-2147-1-git-send-email-jolsa@kernel.org \
    --to=jolsa@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.