File fixfactory.diff of Package preload
Index: preload/stap/preloadtrace.stp
===================================================================
--- preload.orig/stap/preloadtrace.stp 2009-08-13 08:56:09.000000000 +0200
+++ preload/stap/preloadtrace.stp 2010-03-22 12:36:08.000000000 +0100
@@ -99,11 +99,7 @@ probe syscall.fchdir.return {
println(process_indent() . sprintf("fchdir %d", $fd ))
}
-%( arch == "x86_64" %?
-probe syscall.mmap.return {
-%:
-probe syscall.mmap2.return {
-%)
+probe kernel.function("sys_mmap_pgoff").return {
# print(process_indent() . " mmap " . sprintf("%d", $fd) . "\n")
if ($fd >= 0 && $fd < 66000 && readfrom[pid(), $fd] == 1 && fdstoignore[pid(), $fd] != 1 ) {
println(process_indent() . sprintf("read %d", $fd))
Index: preload/init.startpreload
===================================================================
--- preload.orig/init.startpreload 2009-05-06 13:41:33.000000000 +0200
+++ preload/init.startpreload 2010-03-22 12:38:20.000000000 +0100
@@ -30,14 +30,14 @@ case "$1" in
;;
esac
done
- if test "$preload" = 1; then
- cmd=staprun
+ if test "$preload" = 1 -a -e /usr/bin/staprun; then
+ cmd=/usr/bin/staprun
case "$preloadlog" in
/dev/null)
cmd=
;;
/dev/tty*)
- cmd="staprun -b 40"
+ cmd="/usr/bin/staprun -b 40"
;;
esac
if test -n "$cmd"; then