linux/tools/perf
Jiri Olsa 7dbf4dcfe2 perf tools: Back [vdso] DSO with real data
Storing data for VDSO shared object, because we need it for the post
unwind processing.

The VDSO shared object is same for all process on a running system, so
it makes no difference when we store it inside the tracer - perf.

When [vdso] map memory is hit, we retrieve [vdso] DSO image and store it
into temporary file.

During the build-id processing phase, the [vdso] DSO image is stored in
build-id db, and build-id reference is made inside perf.data. The
build-id vdso file object is called '[vdso]'. We don't use temporary
file name which gets removed when record is finished.

During report phase the vdso build-id object is treated as any other
build-id DSO object.

Adding following API for vdso object:

  bool is_vdso_map(const char *filename)
    - returns true if the filename matches vdso map name

  struct dso *vdso__dso_findnew(struct list_head *head)
    - find/create proper vdso DSO object

  vdso__exit(void)
    - removes temporary VDSO image if there's any

This change makes backtrace dwarf post unwind possible from [vdso] maps.

Following output is current report of [vdso] sample dwarf backtrace:

  # Overhead  Command      Shared Object                         Symbol
  # ........  .......  .................  .............................
  #
      99.52%       ex  [vdso]             [.] 0x00007fff3ace89af
                   |
                   --- 0x7fff3ace89af

Following output is new report of [vdso] sample dwarf backtrace:

  # Overhead  Command      Shared Object                         Symbol
  # ........  .......  .................  .............................
  #
      99.52%       ex  [vdso]             [.] 0x00000000000009af
                   |
                   --- 0x7fff3ace89af
                       main
                       __libc_start_main
                       _start

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1347295819-23177-5-git-send-email-jolsa@redhat.com
[ committer note: s/ALIGN/PERF_ALIGN/g to cope with the android build changes ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-09-11 12:08:30 -03:00
..
arch perf tools: Support for DWARF CFI unwinding on post processing 2012-08-11 15:06:56 -03:00
bench perf bench: fix assert when NDEBUG is defined 2012-09-08 13:18:54 -03:00
config perf tools: add NO_BACKTRACE for application self-debugging 2012-09-07 22:12:30 -03:00
Documentation perf diff: Make diff command work with evsel hists 2012-09-07 21:44:02 -03:00
python perf python: Use attr.watermark in twatch.py 2012-01-30 18:38:23 -02:00
scripts perf script python: Correct handler check and spelling errors 2012-08-09 13:26:19 -03:00
ui perf gtk/browser: Use perf_hpp__format functions 2012-09-08 13:20:21 -03:00
util perf tools: Back [vdso] DSO with real data 2012-09-11 12:08:30 -03:00
.gitignore perf tools: Ignore compiled python binaries 2012-09-07 12:10:58 -03:00
bash_completion perf tools: Support for events bash completion 2012-08-09 15:59:26 -03:00
builtin-annotate.c perf tools: Allow user to indicate path to objdump in command line 2012-09-05 19:41:55 -03:00
builtin-bench.c perf bench: Documentation update 2012-06-27 13:17:48 -03:00
builtin-buildid-cache.c perf tools: Back [vdso] DSO with real data 2012-09-11 12:08:30 -03:00
builtin-buildid-list.c perf symbols: Introduce symbol__elf_init() 2012-08-09 16:19:14 -03:00
builtin-diff.c perf hists: Introduce perf_hpp for hist period printing 2012-09-08 13:19:44 -03:00
builtin-evlist.c perf tools: Move all users of event_name to perf_evsel__name 2012-06-19 13:06:20 -03:00
builtin-help.c perf help: Remove use of die and handle errors 2012-09-05 17:21:10 -03:00
builtin-inject.c perf symbols: Support minimal build without libelf 2012-08-09 16:26:38 -03:00
builtin-kmem.c perf kmem: Remove die() calls 2012-09-09 11:39:02 -03:00
builtin-kvm.c perf kvm: Do guest-only counting by default 2012-01-06 15:47:37 -02:00
builtin-list.c perf tools: Support for events bash completion 2012-08-09 15:59:26 -03:00
builtin-lock.c perf lock: Remove use of die and handle errors 2012-09-05 17:19:38 -03:00
builtin-probe.c perf probe: Detect probe target when m/x options are absent 2012-05-11 13:58:53 -03:00
builtin-record.c perf record: Remove use of die/exit 2012-09-05 17:22:41 -03:00
builtin-report.c perf tools: Allow user to indicate path to objdump in command line 2012-09-05 19:41:55 -03:00
builtin-sched.c perf sched: Remove die() calls 2012-09-09 11:39:02 -03:00
builtin-script.c perf script: Remove use of die/exit 2012-09-05 17:21:39 -03:00
builtin-stat.c perf stat: Remove use of die/exit and handle errors 2012-09-05 17:20:24 -03:00
builtin-test.c perf test: Remove die() calls 2012-09-09 11:39:02 -03:00
builtin-timechart.c perf report: Accept fifos as input file 2011-12-23 17:01:03 -02:00
builtin-top.c perf evlist: Introduce evsel list accessors 2012-08-15 10:14:18 -03:00
builtin.h perf tools: Make perf.data more self-descriptive (v8) 2011-10-07 17:01:24 -03:00
command-list.txt perf symbols: Support minimal build without libelf 2012-08-09 16:26:38 -03:00
CREDITS perf_counter tools: Add CREDITS file for Git contributors 2009-06-24 19:54:29 +02:00
design.txt perf tools: Update ioctl documentation for PERF_IOC_FLAG_GROUP 2012-05-31 11:38:42 -03:00
Makefile perf tools: Back [vdso] DSO with real data 2012-09-11 12:08:30 -03:00
MANIFEST perf tools: Add missing perf_regs.h file to MANIFEST 2012-09-11 11:42:41 -03:00
perf-archive.sh perf archive: Correct cutting of symbolic link 2012-04-14 13:52:15 -03:00
perf.c perf tools: include missing pthread.h header 2012-09-07 22:08:09 -03:00
perf.h perf tools: Support for DWARF mode callchain 2012-08-11 15:07:18 -03:00