diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-28 13:20:25 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-28 13:20:25 -0500 |
commit | 6556a6743549defc32e5f90ee2cb1ecd833a44c3 (patch) | |
tree | 622306583d4a3c13235a8bfc012854c125c597f1 /tools/perf/perf-archive.sh | |
parent | e0d272429a34ff143bfa04ee8e29dd4eed2964c7 (diff) | |
parent | 1dd2980d990068e20045b90c424518cc7f3657ff (diff) |
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (172 commits)
perf_event, amd: Fix spinlock initialization
perf_event: Fix preempt warning in perf_clock()
perf tools: Flush maps on COMM events
perf_events, x86: Split PMU definitions into separate files
perf annotate: Handle samples not at objdump output addr boundaries
perf_events, x86: Remove superflous MSR writes
perf_events: Simplify code by removing cpu argument to hw_perf_group_sched_in()
perf_events, x86: AMD event scheduling
perf_events: Add new start/stop PMU callbacks
perf_events: Report the MMAP pgoff value in bytes
perf annotate: Defer allocating sym_priv->hist array
perf symbols: Improve debugging information about symtab origins
perf top: Use a macro instead of a constant variable
perf symbols: Check the right return variable
perf/scripts: Tag syscall_name helper as not yet available
perf/scripts: Add perf-trace-python Documentation
perf/scripts: Remove unnecessary PyTuple resizes
perf/scripts: Add syscall tracing scripts
perf/scripts: Add Python scripting engine
perf/scripts: Remove check-perf-trace from listed scripts
...
Fix trivial conflict in tools/perf/util/probe-event.c
Diffstat (limited to 'tools/perf/perf-archive.sh')
-rw-r--r-- | tools/perf/perf-archive.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/perf/perf-archive.sh b/tools/perf/perf-archive.sh new file mode 100644 index 000000000000..45fbe2f07b15 --- /dev/null +++ b/tools/perf/perf-archive.sh | |||
@@ -0,0 +1,32 @@ | |||
1 | #!/bin/bash | ||
2 | # perf archive | ||
3 | # Arnaldo Carvalho de Melo <acme@redhat.com> | ||
4 | |||
5 | PERF_DATA=perf.data | ||
6 | if [ $# -ne 0 ] ; then | ||
7 | PERF_DATA=$1 | ||
8 | fi | ||
9 | |||
10 | DEBUGDIR=~/.debug/ | ||
11 | BUILDIDS=$(mktemp /tmp/perf-archive-buildids.XXXXXX) | ||
12 | |||
13 | perf buildid-list -i $PERF_DATA --with-hits > $BUILDIDS | ||
14 | if [ ! -s $BUILDIDS ] ; then | ||
15 | echo "perf archive: no build-ids found" | ||
16 | rm -f $BUILDIDS | ||
17 | exit 1 | ||
18 | fi | ||
19 | |||
20 | MANIFEST=$(mktemp /tmp/perf-archive-manifest.XXXXXX) | ||
21 | |||
22 | cut -d ' ' -f 1 $BUILDIDS | \ | ||
23 | while read build_id ; do | ||
24 | linkname=$DEBUGDIR.build-id/${build_id:0:2}/${build_id:2} | ||
25 | filename=$(readlink -f $linkname) | ||
26 | echo ${linkname#$DEBUGDIR} >> $MANIFEST | ||
27 | echo ${filename#$DEBUGDIR} >> $MANIFEST | ||
28 | done | ||
29 | |||
30 | tar cfj $PERF_DATA.tar.bz2 -C $DEBUGDIR -T $MANIFEST | ||
31 | rm -f $MANIFEST $BUILDIDS | ||
32 | exit 0 | ||