perf_events, x86: Fixup fixed counter constraints
[deliverable/linux.git] / tools / perf / perf-archive.sh
CommitLineData
2c585174
ACM
1#!/bin/bash
2# perf archive
3# Arnaldo Carvalho de Melo <acme@redhat.com>
4
5PERF_DATA=perf.data
6if [ $# -ne 0 ] ; then
7 PERF_DATA=$1
8fi
9
10DEBUGDIR=~/.debug/
11BUILDIDS=$(mktemp /tmp/perf-archive-buildids.XXXXXX)
12
13perf buildid-list -i $PERF_DATA --with-hits > $BUILDIDS
14if [ ! -s $BUILDIDS ] ; then
15 echo "perf archive: no build-ids found"
16 rm -f $BUILDIDS
17 exit 1
18fi
19
20MANIFEST=$(mktemp /tmp/perf-archive-manifest.XXXXXX)
21
22cut -d ' ' -f 1 $BUILDIDS | \
23while 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
28done
29
30tar cfj $PERF_DATA.tar.bz2 -C $DEBUGDIR -T $MANIFEST
31rm -f $MANIFEST $BUILDIDS
32exit 0
This page took 0.035306 seconds and 5 git commands to generate.