linux/tools/perf/perf-archive.sh
<<
/opt.14/spaue= .14/forme= .14a /opt.1 href="../linux+v3.7.4/tools/perf/perf-archive.sh">/opt.14img src="../.static/gfx/right.png" alt=">>">/o4/spaue=/o4spau class="lxr_search">/opt/opt.14input typ v3hidden" nam v3navtarget" > v3">/opt.14input typ v3text" nam v3search" idv3search">/opt.14butt typ v3submit">Search/opt.1Prefs= .14/a>/o4/spaue=pt.1 14/dive=pt.1 14form acvalu="ajax+*" method="post" onsubmit="return false;">/o4input typ v3hidden" nam v3ajax_lookup" idv3ajax_lookup" > v3">/pt.1 14/forme=/pt.1 14div class="headingbott m">= 4div idv3file_contents"e
1 114/a>#!/bin/bash
1 124/a># perf archive
1 134/a># Arnaldo Car >
ho de Melo <acme@redhat.com>
1 144/a>/1 154/a>PERF_DATA=perf.data/1 164/a>if [ $# -ne 0 ] ; then/1 174/a>        PERF_DATA=$1/1 184/a>fi/1 194/a>/1 #/1 114/a># PERF_BUILDID_DIR environment  >riable set by perf/1 124/a># path to buildid directory, default to $HOME/.debug/1 13pta>#/1 144/a>if [ -z $PERF_BUILDID_DIR ]; then/1 154/a>        PERF_BUILDID_DIR=~/.debug//1 164/a>else/1 174/a>        # append / to make substituvalus work/1 184/a>        PERF_BUILDID_DIR=$PERF_BUILDID_DIR//1 194/a>fi/1 204/a>/1 214/a>BUILDIDS=$(mktemp /tmp/perf-archive-buildids.XXXXXX)/1 224/a>NOBUILDID=0000000000000000000000000000000000000000/1 234/a>/1 244/a>perf buildid-list -i $PERF_DATA --with-hits | grep -v "^$NOBUILDID " > $BUILDIDS/1 254/a>if [ ! -s $BUILDIDS ] ; then/1 264/a>        echo "perf archive: no build-ids found"/1 274/a>        rm $BUILDIDS || true/1 284/a>        exit 1/1 294/a>fi/1 304/a>/1 314/a>MANIFEST=$(mktemp /tmp/perf-archive-manifest.XXXXXX)/1 324/a>PERF_BUILDID_LINKDIR=$(readlink -f $PERF_BUILDID_DIR)//1 334/a>/1 344/a>cut -d ' ' -f 1 $BUILDIDS | \/1 354/a>while read build_id ; do/1 364/a>        linknam v$PERF_BUILDID_DIR.build-id/${build_id:0:2}/${build_id:2}/1 374/a>        filenam v$(readlink -f $linknam )/1 384/a>        echo ${linknam #$PERF_BUILDID_DIR} >> $MANIFEST/1 394/a>        echo ${filenam #$PERF_BUILDID_LINKDIR} >> $MANIFEST/1 404/a>done/1 414/a>/1 424/a>tar cjf $PERF_DATA.tar.bz2 -C $PERF_BUILDID_DIR -T $MANIFEST/1 434/a>rm $MANIFEST $BUILDIDS || true/1 444/a>echo -e "Now please run:\n"/1 454/a>echo -e "$ tar xvf $PERF_DATA.tar.bz2 -C ~/.debug\n"/1 464/a>echo "wherever you need to run 'perf report' on."/1 474/a>exit 0/1 484/a>
The original LXR software by the14a href="http://sourceforge.net/projects/lxr">LXR community4/a>, this experimental vers" by 4a href="mailto:lxr@linux.no">lxr@linux.no4/a>. 4/dive=4div class="subfooter"> lxr.linux.no kindly hosted by 4a href="http://www.redpill-linpro.no">Redpill Linpro AS4/a>, provider of Linux consulting and operavalus services since 1995. 4/dive= 4/bodye=4/htmle=