vmm: Modifed load_elf to allow an offset
[akaros.git] / scripts / perf
1 #!/bin/bash
2
3 AKAROS_ROOT=${AKAROS_ROOT:-`pwd`}
4 # Allow the override of perf, in case someone reports with a different perf
5 # than their host uses
6 PERF_CMD=${PERF_CMD:-perf}
7
8 report_FLAGS="--kallsyms=$AKAROS_ROOT/obj/kern/ksyms.map \
9               --symfs=$AKAROS_ROOT/kern/kfs/"
10
11 # annotate seems to want a path relative to symfs
12 annotate_FLAGS="--vmlinux=../../obj/kern/akaros-kernel-64b \
13                 --symfs=$AKAROS_ROOT/kern/kfs/"
14
15 # Sets flags to the flags for a given command ($1)
16 eval FLAGS="\$${1}_FLAGS"
17
18 $PERF_CMD $1 $FLAGS ${@:2}