kernel_optimize_test/tools/perf
Masami Hiramatsu b4bf1130cd perf probe: Show error code and description in verbose mode
Show error code and description only in verbose mode if 'perf probe'
command failed.

Current 'perf probe' shows error code with final error message, and that
is meaningless for many users.

This changes error messages to show the error code and its description
only in verbose mode (-v option).

Without this patch:
  -----
  # perf probe -a do_execve@hoge
  Probe point 'do_execve@hoge' not found.
    Error: Failed to add events. (-2)
  -----

With this patch, normally the message doesn't show the misterious error
number:
  -----
  # perf probe -a do_execve@hoge
  Probe point 'do_execve@hoge' not found.
    Error: Failed to add events.
  -----

And in verbose mode, it also shows additional error messages as below:
  -----
  # perf probe -va do_execve@hoge
  probe-definition(0): do_execve@hoge
  symbol:do_execve file:hoge line:0 offset:0 return:0 lazy:(null)
  0 arguments
  Looking at the vmlinux_path (6 entries long)
  Using /lib/modules/3.15.0-rc8+/build/vmlinux for symbols
  Open Debuginfo file: /lib/modules/3.15.0-rc8+/build/vmlinux
  Try to find probe point from debuginfo.
  Probe point 'do_execve@hoge' not found.
    Error: Failed to add events. Reason: No such file or directory (Code: -2)
  -----

Reported-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20140606071352.6788.76943.stgit@kbuild-fedora.novalocal
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2014-06-09 14:34:09 -03:00
..
arch perf tools: Add libdw DWARF post unwind support for ARM 2014-05-16 11:39:29 +02:00
bench
config perf tools: Emit more precise message for missing glibc static library 2014-06-09 12:14:08 -03:00
Documentation perf/documentation: Add description for conditional branch filter 2014-06-05 12:30:27 +02:00
python
scripts
tests perf tests: Show the inner make output when an error happens 2014-06-09 12:14:22 -03:00
ui perf tools: Move elide bool into perf_hpp_fmt struct 2014-06-03 21:34:59 +02:00
util perf probe: Improve error message for unknown member of data structure 2014-06-09 12:15:07 -03:00
.gitignore
builtin-annotate.c perf hists: Check if accumulated when adding a hist entry 2014-06-01 14:34:56 +02:00
builtin-bench.c
builtin-buildid-cache.c
builtin-buildid-list.c
builtin-diff.c perf hists: Check if accumulated when adding a hist entry 2014-06-01 14:34:56 +02:00
builtin-evlist.c
builtin-help.c
builtin-inject.c perf tools: Use tid for finding thread 2014-05-12 11:09:50 +02:00
builtin-kmem.c perf tools: Use tid for finding thread 2014-05-12 11:09:50 +02:00
builtin-kvm.c
builtin-list.c
builtin-lock.c
builtin-mem.c
builtin-probe.c perf probe: Show error code and description in verbose mode 2014-06-09 14:34:09 -03:00
builtin-record.c perf/tool: Add conditional branch filter 'cond' to perf record 2014-06-05 12:30:19 +02:00
builtin-report.c perf tools: Add callback function to hist_entry_iter 2014-06-01 14:35:05 +02:00
builtin-sched.c perf tools: Introduce hists__inc_nr_samples() 2014-06-01 14:34:55 +02:00
builtin-script.c
builtin-stat.c
builtin-timechart.c
builtin-top.c perf top: Add top.children config option 2014-06-01 14:35:07 +02:00
builtin-trace.c
builtin.h
command-list.txt
CREDITS
design.txt
Makefile
Makefile.perf perf tools: Fix 'make help' message error 2014-06-03 21:35:12 +02:00
MANIFEST tools: Consolidate types.h 2014-05-01 21:22:39 +02:00
perf-archive.sh
perf-completion.sh
perf-sys.h perf tools: Move sys_perf_event_open function from perf.h 2014-05-05 17:48:51 +02:00
perf.c perf trace: Warn the user when not available 2014-06-03 21:34:00 +02:00
perf.h perf tools: Move ACCESS_ONCE from perf.h header 2014-05-05 17:49:07 +02:00