linux-stable/tools/perf
Masami Hiramatsu 69e96eaa4f perf probe: Improve an error message of perf probe --vars mode
Fix an error message when failed to find given address in --vars
mode.

Without this fix, perf probe -V doesn't show the final "Error"
message if it fails to find given source line. Moreover, it
tells it fails to find "variables" instead of the source line.
  -----
  # perf probe -V foo@bar
  Failed to find variables at foo@bar (0)
  -----
The result also shows mysterious error code. Actually the error
returns 0 or -ENOENT means that it just fails to find the address
of given source line. (0 means there is no matching address,
and -ENOENT means there is an entry(DIE) but it has no instance,
e.g. an empty inlined function)

This fixes it to show what happened and the final error message
as below.
  -----
  # perf probe -V foo@bar
  Failed to find the address of foo@bar
    Error: Failed to show vars.
  -----

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
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/20140606071359.6788.84716.stgit@kbuild-fedora.novalocal
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2014-06-09 14:35:58 -03:00
..
arch perf tools: Add libdw DWARF post unwind support for ARM 2014-05-16 11:39:29 +02:00
bench Merge branch 'perf-core-for-mingo' into perf/urgent 2014-04-14 16:45:39 +02:00
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 perf python: Remove duplicate TID bit from mask 2013-08-07 17:35:25 -03:00
scripts perf tools: Finish the removal of 'self' arguments 2013-11-05 15:32:36 -03:00
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 an error message of perf probe --vars mode 2014-06-09 14:35:58 -03:00
.gitignore perf tools: Ignore 'perf timechart' output file 2013-10-11 12:17:37 -03:00
builtin-annotate.c perf hists: Check if accumulated when adding a hist entry 2014-06-01 14:34:56 +02:00
builtin-bench.c perf bench: Fix segfault at the end of an 'all' execution 2014-04-14 12:55:53 +02:00
builtin-buildid-cache.c perf buildid-cache: Check relocation when checking for existing kcore 2014-01-31 17:21:54 -03:00
builtin-buildid-list.c perf session: Separating data file properties from session 2013-10-21 17:33:25 -03:00
builtin-diff.c perf hists: Check if accumulated when adding a hist entry 2014-06-01 14:34:56 +02:00
builtin-evlist.c perf evlist: Introduce evlist__for_each() & friends 2014-01-13 10:06:25 -03:00
builtin-help.c perf help: Fix --help for builtins 2012-10-22 12:35:49 -02:00
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 perf kvm: Fix 'Min time' counting in report command 2014-04-20 00:14:08 +02:00
builtin-list.c perf list: Add usage 2013-11-05 14:26:41 -03:00
builtin-lock.c perf lock: Introduce --list-cmds for use by scripts 2014-04-16 17:16:04 +02:00
builtin-mem.c perf mem: Introduce --list-cmds for use by scripts 2014-04-16 17:16:04 +02:00
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 perf evlist: Introduce evlist__for_each() & friends 2014-01-13 10:06:25 -03:00
builtin-stat.c perf stat: Initialize statistics correctly 2014-04-14 12:56:06 +02:00
builtin-timechart.c perf symbols: Record the reason for filtering an address_location 2014-03-18 18:16:57 -03:00
builtin-top.c perf top: Add top.children config option 2014-06-01 14:35:07 +02:00
builtin-trace.c perf trace: Decode architecture-specific signal numbers 2014-03-10 11:10:45 -03:00
builtin.h perf tools: Add new mem command for memory access profiling 2013-04-01 12:21:44 -03:00
command-list.txt perf tools: Add new mem command for memory access profiling 2013-04-01 12:21:44 -03:00
CREDITS
design.txt perf tools: Update some code references in design.txt 2014-03-18 18:17:06 -03:00
Makefile perf tools: Add 'build-test' make target 2014-01-16 16:26:26 -03:00
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 archive: Make 'f' the last parameter for tar 2012-09-17 13:10:42 -03:00
perf-completion.sh perf sched: Introduce --list-cmds for use by scripts 2014-04-16 17:16:05 +02:00
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