linux/tools/perf
Chanho Park e3b6193378 perf archive: Correct cutting of symbolic link
If a '$PERF_BUILDID_DIR'(typically $HOME/.debug) is a symbolic link
directory, cutting of the path will fail.

Here is an example where a buildid directory is a symbolic link.

/ # ls -al /root
lrwxrwxrwx    1 root     root            13 Mar 26  2012 /root -> opt/home/root
/ # cd ~
/opt/home/root # perf record -a -g sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.322 MB perf.data (~14057 samples) ]
/opt/home/root # perf archive
tar: Removing leading `/' from member names
Now please run:

$ tar xvf perf.data.tar.bz2 -C ~/.debug

wherever you need to run 'perf report' on.
/opt/home/root # mkdir temp
/opt/home/root # tar xf perf.data.tar.bz2 -C ./temp
/opt/home/root # find ./temp -name "*kernel*"
./temp/opt/home/root/.debug/[kernel.kallsyms]

-> If successfully cut off the path, [kernel.kallsyms] is located
in top of the archived file.

This patch enables to cut correctly even if the buildid directory
is a symbolic link.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1333348109-12598-1-git-send-email-chanho61.park@samsung.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-14 13:52:15 -03:00
..
arch perf tools: Use scnprintf where applicable 2012-03-14 12:36:19 -03:00
bench
config perf report: Add a simple GTK2-based 'perf report' browser 2012-03-19 15:13:29 -03:00
Documentation perf report: Add a simple GTK2-based 'perf report' browser 2012-03-19 15:13:29 -03:00
python
scripts
util perf session: Skip event correctly for unknown id/machine 2012-04-12 12:14:50 -03:00
.gitignore perf tools: Ignore auto-generated bison/flex files 2012-04-14 13:50:39 -03:00
builtin-annotate.c
builtin-bench.c
builtin-buildid-cache.c
builtin-buildid-list.c
builtin-diff.c perf diff: Fix to work with new hists design 2012-03-22 15:12:09 -03:00
builtin-evlist.c
builtin-help.c
builtin-inject.c
builtin-kmem.c
builtin-kvm.c
builtin-list.c
builtin-lock.c
builtin-probe.c
builtin-record.c perf record: Add HEADER_BRANCH_STACK tag 2012-03-09 08:26:08 +01:00
builtin-report.c perf report: Add a simple GTK2-based 'perf report' browser 2012-03-19 15:13:29 -03:00
builtin-sched.c perf tools: Fix getrusage() related build failure on glibc trunk 2012-04-04 11:59:00 +02:00
builtin-script.c
builtin-stat.c perf stat: Fix event grouping on forked task 2012-03-16 16:13:45 -03:00
builtin-test.c perf tools: Fix modifier to be applied on correct events 2012-03-22 15:11:38 -03:00
builtin-timechart.c
builtin-top.c perf annotate: Validate addr in symbol__inc_addr_samples 2012-04-05 19:51:14 -03:00
builtin.h
command-list.txt
CREDITS
design.txt
Makefile perf tools: Fix parsers' rules to dependencies 2012-04-14 13:49:43 -03:00
MANIFEST
perf-archive.sh perf archive: Correct cutting of symbolic link 2012-04-14 13:52:15 -03:00
perf.c
perf.h Merge branch 'perf/urgent' into perf/core 2012-03-22 15:09:08 -03:00