diff --git a/doc/dev/benchmark-oprofile b/doc/dev/benchmark-oprofile old mode 100644 new mode 100755 index c60ef909..4fb965f3 --- a/doc/dev/benchmark-oprofile +++ b/doc/dev/benchmark-oprofile @@ -1,12 +1,23 @@ -10:37 #!/bin/sh -10:37 opcontrol --no-vmlinux > /dev/null -10:37 opcontrol --stop > /dev/null -10:37 opcontrol --shutdown > /dev/null -10:37 opcontrol --reset > /dev/null -10:37 opcontrol --separate=none > /dev/null -10:37 opcontrol $* > /dev/null -10:37 opcontrol --start > /dev/null -10:37 ./urpcbench 0 0 1 -10:37 opcontrol --stop > /dev/null -10:37 opcontrol --dump > /dev/null -10:37 opreport -l urpcbench +#!/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"