summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/buildok/marker.stp24
1 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/buildok/marker.stp b/testsuite/buildok/marker.stp
new file mode 100755
index 00000000..cbf2f7fa
--- /dev/null
+++ b/testsuite/buildok/marker.stp
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+(
+echo 'probe begin {}'
+smap=/boot/System.map-`uname -r`
+if [ -f $smap ]
+then
+ # v-- exclude modules
+ grep __systemtap_mark $smap | fgrep -v '[' | while read addr section symbol
+ do
+ mark=`expr $symbol : '__systemtap_mark_\([a-zA-Z0-9_]\+\)_[NS]*\.[0-9]\+'`
+ sig=`expr $symbol : '__systemtap_mark_[a-zA-Z0-9_]\+_\([NS]*\)\.[0-9]\+'`
+ siglen=`expr length "$sig"`
+# echo $mark $sig $siglen
+ echo 'probe kernel.mark("'$mark'") {'
+ i=0
+ while [ $i -lt $siglen ]; do
+ i=`expr $i + 1`
+ echo ' print ($arg'$i')'
+ done
+ echo '}'
+ done
+fi
+) | ./stap -p4 -