File: kcachegrind.sh

package info (click to toggle)
finalcut 0.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,832 kB
  • sloc: cpp: 90,264; makefile: 546; sh: 412
file content (24 lines) | stat: -rwxr-xr-x 389 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

if [ -z "$1" ]
then
  PROG="../examples/.libs/ui"
else
  PROG="$1"
  shift
fi

error_handling ()
{
  echo "No ELF executable!"
  exit 1
}

# Is the file executable?
test -x "$PROG" || error_handling
file --brief "$PROG" | grep -q "ELF" || error_handling

LD_LIBRARY_PATH=../final/.libs/ valgrind --tool=callgrind -v "$PROG" "$@" 2>/dev/null
kcachegrind
rm -f callgrind.out.*