From eab894e6086a15f9fe695832a29bd59ace70793c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 10 May 2011 13:14:34 +0200 Subject: [PATCH] make a shell script out of the template Signed-off-by: Nico Schottelius --- doc/dev/benchmark-oprofile | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) mode change 100644 => 100755 doc/dev/benchmark-oprofile 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"