Skip to content

perf tools: Enhance parsing events tracepoint error output

Jiri Olsa lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 36 repliesIn review
  2. v1 RFC11 patches 21 repliesSuperseded

Changes in v2 from the cover letter

- debugfs/tracefs changes went already in through separate patchset
- more commentary on err.h interface
- fixed callers of err.h enhanced functions
- added extra tags/cscope fix

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5tools: Add err.h with ERR_PTR PTR_ERR interfacetools/include/linux/err.h+49 -015 replies
2/5perf tools: Add tools/include into tags directoriestools/perf/Makefile.perf+1 -10 replies
3/5perf tools: Propagate error info for the tracepoint parsingtools/perf/util/parse-events.c tools/perf/util/parse-events.h tools/perf/util/parse-events.y+20 -143 replies
4/5perf tools: Propagate error info from tp_formattools/perf/builtin-trace.c tools/perf/tests/evsel-tp-sched.c tools/perf/tests/openat-syscall-all-cpus.c +7 more+53 -219 replies
5/5perf tools: Enhance parsing events tracepoint error outputtools/perf/util/parse-events.c tools/perf/util/parse-events.y+41 -1010 replies

Reviews trailers per patch

2 of 5 patches have a Reviewed-by or Acked-by.

PatchRaphaël BeamonteMatt Fleming
1/5R-b
2/5
3/5R-b R-b
4/5
5/5

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

Read the v2 thread

Cover letter [PATCHv2 0/5] perf tools: Enhance parsing events tracepoint error output

hi,
enhancing parsing events tracepoint error output. Adding more verbose output when the tracepoint is not found or the tracing event path cannot be access.

  $ sudo perf record -e sched:sched_krava ls
  event syntax error: 'sched:sched_krava'
                       \___ unknown tracepoint

Error: File /sys/kernel/debug/tracing//tracing/events/sched/sched_krava not found.
Hint: Perhaps this kernel misses some CONFIG_ setting to enable this feature?.

Run 'perf list' for a list of valid events
...

  $ perf record -e sched:sched_krava ls
  event syntax error: 'sched:sched_krava'
                       \___ can't access trace events

Error: No permissions to read /sys/kernel/debug/tracing//tracing/events/sched/sched_krava
Hint: Try 'sudo mount -o remount,mode=755 /sys/kernel/debug'

Run 'perf list' for a list of valid events
...

v2 changes:
- debugfs/tracefs changes went already in through separate patchset
- more commentary on err.h interface
- fixed callers of err.h enhanced functions
- added extra tags/cscope fix

Also available in:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/tp

thanks,
jirka

---
Jiri Olsa (5):
tools: Add err.h with ERR_PTR PTR_ERR interface perf tools: Add tools/include into tags directories perf tools: Propagate error info for the tracepoint parsing perf tools: Propagate error info from tp_format perf tools: Enhance parsing events tracepoint error output

 tools/include/linux/err.h                   | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 tools/perf/Makefile.perf                    |  2 +-
 tools/perf/builtin-trace.c                  | 19 +++++++++++--------
 tools/perf/tests/evsel-tp-sched.c           | 10 ++++++++--
 tools/perf/tests/openat-syscall-all-cpus.c  |  3 ++-
 tools/perf/tests/openat-syscall-tp-fields.c |  3 ++-
 tools/perf/tests/openat-syscall.c           |  3 ++-
 tools/perf/util/evlist.c                    |  3 ++-
 tools/perf/util/evsel.c                     | 11 +++++++++--
 tools/perf/util/evsel.h                     |  3 +++
 tools/perf/util/parse-events.c              | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++----------------
 tools/perf/util/parse-events.h              |  3 ++-
 tools/perf/util/parse-events.y              | 16 +++++++++-------
 tools/perf/util/trace-event.c               | 13 +++++++++++--
 14 files changed, 161 insertions(+), 43 deletions(-)
 create mode 100644 tools/include/linux/err.h