runtest
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 7 Apr 2008 14:34:12 +0000 (14:34 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 7 Apr 2008 14:34:12 +0000 (14:34 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@2839 04897980-b3bd-0310-b5e0-8ef037075253

markers-test/runtest.sh [new file with mode: 0644]
markers-test/test-mark-speed-edit.c

diff --git a/markers-test/runtest.sh b/markers-test/runtest.sh
new file mode 100644 (file)
index 0000000..c52079a
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+insmod test-mark-speed.ko
+for a in `seq 1 10`; do cat /proc/testmark;done
+rmmod test-mark-speed
+RESSTD=`dmesg |tail -n 10 |sed 's/^\[.*\] cycles : \(.*\)$/\1/'`
+
+insmod test-mark-speed-opt.ko
+for a in `seq 1 10`; do cat /proc/testmark;done
+rmmod test-mark-speed-opt
+RESOPT=`dmesg |tail -n 10|sed 's/^\[.*\] cycles : \(.*\)$/\1/'`
+
+insmod test-mark-speed-edit.ko
+for a in `seq 1 10`; do cat /proc/testmark;done
+rmmod test-mark-speed-edit
+RESNOP=`dmesg |tail -n 10|sed 's/^\[.*\] cycles : \(.*\)$/\1/'`
+
+
+echo "Numbers for normal marker"
+
+SUM="0"
+for a in $RESSTD; do SUM=$[$SUM + $a]; done
+RESSTD=$[$SUM / 10]
+
+echo $RESSTD
+
+echo "Numbers for optimized marker"
+SUM="0"
+for a in $RESOPT; do SUM=$[$SUM + $a]; done
+RESOPT=$[$SUM / 10]
+echo $RESOPT
+
+echo "Numbers for NOP replacement of function call"
+SUM="0"
+for a in $RESNOP; do SUM=$[$SUM + $a]; done
+RESNOP=$[$SUM / 10]
+echo $RESNOP
+
index 62558917238e1ef4b72ed97550192a59f1edcf9c..0d9861273699efd559154d7efdecf920bccfa739 100644 (file)
 static void noinline test2(const struct marker *mdata,
         void *call_private, ...)
 {
+       unsigned char *ins = __builtin_return_address(0) - 5;
+#if 0
        /* not called */
-       printk("blah\n");
+       printk("ip %p\n", __builtin_return_address(0));
+       printk("prev_ins %hX %hX %hX %hX %hX\n",
+               ins[0], ins[1], ins[2], ins[3], ins[4]);
+#endif //0
+       ins[0] = 0x90;
+       ins[1] = 0x90;
+       ins[2] = 0x90;
+       ins[3] = 0x90;
+       ins[4] = 0x90;
 }
 
 /*
This page took 0.024921 seconds and 4 git commands to generate.