cdist/doc/dev/benchmark-oprofile
Nico Schottelius eab894e608 make a shell script out of the template
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
2011-05-10 13:14:34 +02:00

23 lines
405 B
Bash
Executable file

#!/bin/sh -x
# Cleanup
opcontrol --no-vmlinux
opcontrol --stop
opcontrol --shutdown
opcontrol --reset
# Record all calls
opcontrol --separate=none
# NMI conflicts with oprofile
echo 0 > /proc/sys/kernel/nmi_watchdog
# Select events to be recorded
opcontrol --event=CPU_CLK_UNHALTED:30000:0:1:1
opcontrol --start
# The actual programm
"$@"
opcontrol --stop
opcontrol --dump
echo "Output: opreport -l"