Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182375
b: refs/heads/master
c: 2c58517
h: refs/heads/master
i:
  182373: dae93c8
  182371: 0f126bb
  182367: ea8b6cb
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo authored and Ingo Molnar committed Jan 16, 2010
1 parent c5aaa8d commit 0d0f205
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 460848fceffc91652b2d36d19db4ac40d12fb607
refs/heads/master: 2c5851747bcf751908c02e253cb7582d342b4612
10 changes: 2 additions & 8 deletions trunk/tools/perf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,7 @@ SCRIPT_PERL =
SCRIPT_SH =
TEST_PROGRAMS =

#
# No scripts right now:
#

# SCRIPT_SH += perf-am.sh
SCRIPT_SH += perf-archive.sh

#
# No Perl scripts right now:
Expand All @@ -315,9 +311,7 @@ PROGRAMS += perf
# List built-in command $C whose implementation cmd_$C() is not in
# builtin-$C.o but is linked in as part of some other command.
#
# None right now:
#
# BUILT_INS += perf-init $X
BUILT_INS += perf-archive

# what 'all' will build and 'install' will install, in perfexecdir
ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS)
Expand Down
1 change: 1 addition & 0 deletions trunk/tools/perf/command-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# command name category [deprecated] [common]
#
perf-annotate mainporcelain common
perf-archive mainporcelain
perf-bench mainporcelain common
perf-buildid-list mainporcelain common
perf-diff mainporcelain common
Expand Down
32 changes: 32 additions & 0 deletions trunk/tools/perf/perf-archive.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
# perf archive
# Arnaldo Carvalho de Melo <acme@redhat.com>

PERF_DATA=perf.data
if [ $# -ne 0 ] ; then
PERF_DATA=$1
fi

DEBUGDIR=~/.debug/
BUILDIDS=$(mktemp /tmp/perf-archive-buildids.XXXXXX)

perf buildid-list -i $PERF_DATA --with-hits > $BUILDIDS
if [ ! -s $BUILDIDS ] ; then
echo "perf archive: no build-ids found"
rm -f $BUILDIDS
exit 1
fi

MANIFEST=$(mktemp /tmp/perf-archive-manifest.XXXXXX)

cut -d ' ' -f 1 $BUILDIDS | \
while read build_id ; do
linkname=$DEBUGDIR.build-id/${build_id:0:2}/${build_id:2}
filename=$(readlink -f $linkname)
echo ${linkname#$DEBUGDIR} >> $MANIFEST
echo ${filename#$DEBUGDIR} >> $MANIFEST
done

tar cfj $PERF_DATA.tar.bz2 -C $DEBUGDIR -T $MANIFEST
rm -f $MANIFEST $BUILDIDS
exit 0

0 comments on commit 0d0f205

Please sign in to comment.