linux/tools/perf
Namhyung Kim 00dc865798 perf record: Do not save pathname in ./debug/.build-id directory for vmlinux
When perf record finishes a session, it pre-processes samples in order
to write build-id info from DSOs that had samples.

During this process it'll call map__load() for the kernel map, and it
ends up calling dso__load_vmlinux_path() which replaces dso->long_name.

But this function checks kernel's build-id before searching vmlinux path
so it'll end up with a cryptic name, the pathname for the entry in the
~/.debug cache, which can be confusing to users.

This patch adds a flag to skip the build-id check during record, so
that it'll have the original vmlinux path for the kernel dso->long_name,
not the entry in the ~/.debug cache.

Before:
  # perf record -va sleep 3
  mmap size 528384B
  [ perf record: Woken up 1 times to write data ]
  [ perf record: Captured and wrote 0.196 MB perf.data (~8545 samples) ]
  Looking at the vmlinux_path (7 entries long)
  Using /home/namhyung/.debug/.build-id/f0/6e17aa50adf4d00b88925e03775de107611551 for symbols

After:
  # perf record -va sleep 3
  mmap size 528384B
  [ perf record: Woken up 1 times to write data ]
  [ perf record: Captured and wrote 0.193 MB perf.data (~8432 samples) ]
  Looking at the vmlinux_path (7 entries long)
  Using /lib/modules/3.16.4-1-ARCH/build/vmlinux for symbols

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: 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/1415063674-17206-7-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2014-11-05 10:14:08 -03:00
..
arch perf tools: A thread's machine can be found via thread->mg->machine 2014-10-29 10:32:46 -02:00
bench perf bench futex: Sanitize -q option in requeue 2014-09-29 15:43:26 -03:00
config perf tools: Add gzip decompression support for kernel module 2014-11-05 10:11:26 -03:00
Documentation perf script: Add period data column 2014-10-17 15:21:30 -03:00
python
scripts perf tools: Add call information to Python export 2014-11-03 18:10:06 -03:00
tests perf tests: Use thread->mg->machine 2014-10-29 10:32:47 -02:00
ui perf top: Add a visual cue for toggle zeroing of samples 2014-10-15 15:47:48 -03:00
util perf record: Do not save pathname in ./debug/.build-id directory for vmlinux 2014-11-05 10:14:08 -03:00
.gitignore
builtin-annotate.c perf tools: Remove hists from evsel 2014-10-14 17:32:52 -03:00
builtin-bench.c
builtin-buildid-cache.c
builtin-buildid-list.c
builtin-diff.c perf diff: Add missing hists__init() call at tool start 2014-10-22 16:31:06 -03:00
builtin-evlist.c perf tools: Modify error code for when perf_session__new() fails 2014-09-26 12:32:58 -03:00
builtin-help.c
builtin-inject.c perf tools: Add id index 2014-10-29 11:24:47 -02:00
builtin-kmem.c perf tools: Modify error code for when perf_session__new() fails 2014-09-26 12:32:58 -03:00
builtin-kvm.c perf kvm: Print kvm specific --help output 2014-10-29 10:32:47 -02:00
builtin-list.c
builtin-lock.c perf tools: Modify error code for when perf_session__new() fails 2014-09-26 12:32:58 -03:00
builtin-mem.c perf tools: Modify error code for when perf_session__new() fails 2014-09-26 12:32:58 -03:00
builtin-probe.c perf probe: Add --quiet option to suppress output result message 2014-10-29 10:32:49 -02:00
builtin-record.c perf record: Do not save pathname in ./debug/.build-id directory for vmlinux 2014-11-05 10:14:08 -03:00
builtin-report.c perf report: Set callchain_param.record_mode for future use 2014-10-15 16:20:03 -03:00
builtin-sched.c perf sched: Stop updating hists stats, not used 2014-10-09 11:46:35 -03:00
builtin-script.c perf tools: Export usage string and option table of perf record 2014-10-29 10:32:47 -02:00
builtin-stat.c perf evsel: No need to drag util/cgroup.h 2014-10-17 12:17:40 -03:00
builtin-timechart.c perf tools: Export usage string and option table of perf record 2014-10-29 10:32:47 -02:00
builtin-top.c perf tools: Remove hists from evsel 2014-10-14 17:32:52 -03:00
builtin-trace.c perf tools: A thread's machine can be found via thread->mg->machine 2014-10-29 10:32:46 -02:00
builtin.h
command-list.txt
CREDITS
design.txt
Makefile
Makefile.perf perf tools: Add gzip decompression support for kernel module 2014-11-05 10:11:26 -03:00
MANIFEST
perf-archive.sh
perf-completion.sh
perf-read-vdso.c perf tools: Build programs to copy 32-bit compatibility 2014-10-29 10:32:48 -02:00
perf-sys.h perf tools: Make CPUINFO_PROC an array to support different kernel versions 2014-10-29 10:27:36 -02:00
perf-with-kcore.sh
perf.c
perf.h perf tools: Export usage string and option table of perf record 2014-10-29 10:32:47 -02:00