linux/tools/perf/tests
Namhyung Kim 0a7e6d1b68 perf tools: Check recorded kernel version when finding vmlinux
Currently vmlinux_path__init() only tries to find vmlinux file from
current directory, /boot and some canonical directories with version
number of the running kernel.  This can be a problem when reporting old
data recorded on a kernel version not running currently.

We can use --symfs option for this but it's annoying for user to do it
always.  As we already have the info in the perf.data file, it can be
changed to use it for the search automatically.

Before:

  $ perf report
  ...
  # Samples: 4K of event 'cpu-clock'
  # Event count (approx.): 1067250000
  #
  # Overhead  Command     Shared Object      Symbol
  # ........  ..........  .................  ..............................
      71.87%     swapper  [kernel.kallsyms]  [k] recover_probed_instruction

After:

  # Overhead  Command     Shared Object      Symbol
  # ........  ..........  .................  ....................
      71.87%     swapper  [kernel.kallsyms]  [k] native_safe_halt

This requires to change signature of symbol__init() to receive struct
perf_session_env *.

Reported-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1407825645-24586-14-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2014-08-13 16:42:21 -03:00
..
attr perf tests: Update attr test with PERF_FLAG_FD_CLOEXEC flag 2014-07-18 09:09:53 +02:00
attr.c tools: Consolidate types.h 2014-05-01 21:22:39 +02:00
attr.py perf tests: Make attr script test event cpu 2013-03-15 13:06:00 -03:00
bp_signal_overflow.c perf tools: Enable close-on-exec flag on perf file descriptor 2014-07-18 09:09:34 +02:00
bp_signal.c perf tools: Enable close-on-exec flag on perf file descriptor 2014-07-18 09:09:34 +02:00
builtin-test.c perf tools: Check recorded kernel version when finding vmlinux 2014-08-13 16:42:21 -03:00
code-reading.c perf tools: Use tid for finding thread 2014-05-12 11:09:50 +02:00
dso-data.c perf tools: Move pr_* debug macros into debug object 2014-07-17 12:58:39 -03:00
dwarf-unwind.c Revert "perf: Disable PERF_RECORD_MMAP2 support" 2014-06-09 13:34:46 +02:00
evsel-roundtrip-name.c perf tools: Move pr_* debug macros into debug object 2014-07-17 12:58:39 -03:00
evsel-tp-sched.c perf tools: Move pr_* debug macros into debug object 2014-07-17 12:58:39 -03:00
hists_common.c perf tests: Add a test case for cumulating callchains 2014-06-01 14:35:11 +02:00
hists_common.h perf tests: Define and use symbolic names for fake symbols 2014-06-01 14:35:11 +02:00
hists_cumulate.c perf tests: Add a test case for cumulating callchains 2014-06-01 14:35:11 +02:00
hists_filter.c perf tests: Define and use symbolic names for fake symbols 2014-06-01 14:35:11 +02:00
hists_link.c perf tests: Define and use symbolic names for fake symbols 2014-06-01 14:35:11 +02:00
hists_output.c perf tests: Define and use symbolic names for fake symbols 2014-06-01 14:35:11 +02:00
keep-tracking.c tools: Consolidate types.h 2014-05-01 21:22:39 +02:00
make perf tests: Show the inner make output when an error happens 2014-06-09 12:14:22 -03:00
mmap-basic.c perf evlist: Introduce evlist__for_each() & friends 2014-01-13 10:06:25 -03:00
mmap-thread-lookup.c perf tests: Add thread maps lookup automated tests 2014-04-28 13:42:52 +02:00
open-syscall-all-cpus.c perf evsel: Remove idx parm from constructor 2013-11-11 15:56:39 -03:00
open-syscall-tp-fields.c perf tools: Move pr_* debug macros into debug object 2014-07-17 12:58:39 -03:00
open-syscall.c perf evsel: Remove idx parm from constructor 2013-11-11 15:56:39 -03:00
parse-events.c perf tools: Move pr_* debug macros into debug object 2014-07-17 12:58:39 -03:00
parse-no-sample-id-all.c perf tools: Move pr_* debug macros into debug object 2014-07-17 12:58:39 -03:00
perf-record.c perf record: Rename --no-delay to --no-buffering 2014-01-14 17:57:04 -03:00
perf-targz-src-pkg perf tools: Add test for building detached source tarballs 2014-01-13 10:06:26 -03:00
perf-time-to-tsc.c perf tools: Move rdtsc() function 2014-07-23 11:48:11 -03:00
pmu.c perf tests: Use ARRAY_SIZE() were applicable 2013-01-24 16:40:51 -03:00
python-use.c perf tests: Check python path on attr and binding test 2013-01-24 16:40:10 -03:00
rdpmc.c perf tools: Enable close-on-exec flag on perf file descriptor 2014-07-18 09:09:34 +02:00
sample-parsing.c perf tools: Move pr_* debug macros into debug object 2014-07-17 12:58:39 -03:00
sw-clock.c perf evlist: Auto unmap on destructor 2014-01-13 10:06:22 -03:00
task-exit.c perf evlist: Auto unmap on destructor 2014-01-13 10:06:22 -03:00
tests.h perf tests: Add test for closing dso objects on EMFILE error 2014-06-12 16:53:23 +02:00
thread-mg-share.c perf tools: Move pr_* debug macros into debug object 2014-07-17 12:58:39 -03:00
vmlinux-kallsyms.c perf tests: No need to set up ref_reloc_sym 2014-01-31 17:21:52 -03:00