summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhunt <hunt>2006-05-30 18:01:19 +0000
committerhunt <hunt>2006-05-30 18:01:19 +0000
commit9dae450ec051f3d6a4b36e803d70203325ebce38 (patch)
treee6d474e17afb38ec16163bc505990f31c8a64bae
parent54232a922f4441e2fe1f84df6a2c6aa67ba5d107 (diff)
downloadsystemtap-steved-9dae450ec051f3d6a4b36e803d70203325ebce38.tar.gz
systemtap-steved-9dae450ec051f3d6a4b36e803d70203325ebce38.tar.xz
systemtap-steved-9dae450ec051f3d6a4b36e803d70203325ebce38.zip
2006-05-30 Martin Hunt <hunt@redhat.com>
* syscalls2.stp (sys_write): Use text_strn(). * syscalls.stp (sys_lseek): Fix. (sys_llseek): Fix.
-rw-r--r--tapset/ChangeLog4
-rw-r--r--tapset/syscalls.stp73
-rw-r--r--tapset/syscalls2.stp18
3 files changed, 45 insertions, 50 deletions
diff --git a/tapset/ChangeLog b/tapset/ChangeLog
index 3b376b0d..37cc7877 100644
--- a/tapset/ChangeLog
+++ b/tapset/ChangeLog
@@ -1,5 +1,9 @@
2006-05-30 Martin Hunt <hunt@redhat.com>
+ * syscalls2.stp (sys_write): Use text_strn().
+ * syscalls.stp (sys_lseek): Fix.
+ (sys_llseek): Fix.
+
* string.stp (text_str): New.
(text_strn): New.
diff --git a/tapset/syscalls.stp b/tapset/syscalls.stp
index f1ce9322..136fe118 100644
--- a/tapset/syscalls.stp
+++ b/tapset/syscalls.stp
@@ -1473,28 +1473,26 @@ probe kernel.syscall.llistxattr.return =
name = "llistxattr.return"
}
# llseek _____________________________________________________
-/*
- * asmlinkage long
- * sys_llseek(unsigned int fd,
- * unsigned long offset_high,
- * unsigned long offset_low,
- * loff_t __user * result,
- * unsigned int origin)
- */
-probe kernel.syscall.llseek =
- kernel.function("sys_llseek") {
- name = "llseek"
- fd = $fd
- offset_high = $offset_high
- offset_low = $offset_low
- result_uaddr = $result
- whence = $origin
- whence_str = _seek_whence_str($origin)
- }
-probe kernel.syscall.llseek.return =
- kernel.function("sys_llseek").return {
- name = "llseek.return"
- }
+# long sys_llseek(unsigned int fd,
+# unsigned long offset_high,
+# unsigned long offset_low,
+# loff_t __user * result,
+# unsigned int origin)
+probe syscall.llseek = kernel.function("sys_llseek") {
+ name = "llseek"
+ fd = $fd
+ offset_high = $offset_high
+ offset_low = $offset_low
+ result_uaddr = $result
+ whence = $origin
+ whence_str = _seek_whence_str($origin)
+ argstr = sprintf("%d, 0x%x, 0x%x, %p, %s", $fd, $offset_high,
+ $offset_low, $result, whence_str)
+}
+probe syscall.llseek.return = kernel.function("sys_llseek").return {
+ name = "llseek"
+ retstr = returnstr(1)
+}
# lookup_dcookie _____________________________________________
/*
* asmlinkage long
@@ -1530,24 +1528,19 @@ probe kernel.syscall.lremovexattr.return =
name = "lremovexattr.return"
}
# lseek ______________________________________________________
-/*
- * asmlinkage off_t
- * sys_lseek(unsigned int fd,
- * off_t offset,
- * unsigned int origin)
- */
-probe kernel.syscall.lseek =
- kernel.function("sys_lseek") {
- name = "lseek"
- fildes = $fd
- offset = $offset
- whence = $origin
- whence_str = _seek_whence_str($origin)
- }
-probe kernel.syscall.lseek.return =
- kernel.function("sys_lseek").return {
- name = "lseek.return"
- }
+# off_t sys_lseek(unsigned int fd, off_t offset, unsigned int origin)
+probe syscall.lseek = kernel.function("sys_lseek") {
+ name = "lseek"
+ fildes = $fd
+ offset = $offset
+ whence = $origin
+ whence_str = _seek_whence_str($origin)
+ argstr = sprintf("%d, %d, %s", $fd, $offset, whence_str)
+}
+probe syscall.lseek.return = kernel.function("sys_lseek").return {
+ name = "lseek"
+ retstr = returnstr(1)
+}
# lsetxattr __________________________________________________
/*
* asmlinkage long
diff --git a/tapset/syscalls2.stp b/tapset/syscalls2.stp
index 2355a3c7..f47571e6 100644
--- a/tapset/syscalls2.stp
+++ b/tapset/syscalls2.stp
@@ -44,7 +44,7 @@ probe syscall.read = kernel.function("sys_read") {
fd = $fd
buf_uaddr = $buf
count = $count
- argstr = sprintf("%d, [%p], %d", fd, buf_uaddr, count)
+ argstr = sprintf("%d, [%p], %d", $fd, $buf, $count)
}
probe syscall.read.return = kernel.function("sys_read").return {
name = "read"
@@ -497,9 +497,9 @@ probe syscall.readv = kernel.function("sys_readv") {
/* FIXME: RHEL4 U3 ppc64 can't resolve $fd */
%( arch != "ppc64" %?
fd = $fd
- argstr = sprintf("%d, [%p], %p", fd, vector_uaddr, count)
+ argstr = sprintf("%d, [%p], %d", $fd, $vec, $vlen)
%:
- argstr = sprintf("unknown fd, [%p], %p", vector_uaddr, count)
+ argstr = sprintf("unknown fd, [%p], %d", $vec, $vlen)
%)
}
probe syscall.readv.return = kernel.function("sys_readv").return {
@@ -2419,8 +2419,7 @@ probe syscall.waitpid.return = kernel.function("sys_wait4").return {
}
# write ______________________________________________________
#
-# asmlinkage ssize_t
-# sys_write(unsigned int fd,
+# ssize_t sys_write(unsigned int fd,
# const char __user * buf,
# size_t count)
#
@@ -2429,7 +2428,7 @@ probe syscall.write = kernel.function("sys_write") {
fd = $fd
buf_uaddr = $buf
count = $count
- argstr = sprintf("%d, [%p], %d", $fd, buf_uaddr, $count)
+ argstr = sprintf("%d, %s, %d", $fd, text_strn(user_string($buf),20,1), $count)
}
probe syscall.write.return = kernel.function("sys_write").return {
name = "write"
@@ -2437,8 +2436,7 @@ probe syscall.write.return = kernel.function("sys_write").return {
}
# writev _____________________________________________________
#
-# asmlinkage ssize_t
-# sys_writev(unsigned long fd,
+# ssize_t sys_writev(unsigned long fd,
# const struct iovec __user *vec,
# unsigned long vlen)
#
@@ -2449,9 +2447,9 @@ probe syscall.writev = kernel.function("sys_writev") {
/* FIXME: RHEL4 U3 ppc64 can't resolve $fd */
%( arch != "ppc64" %?
fd = $fd
- argstr = sprintf("%d, [%p], %d", $fd, vector_uaddr, $vlen)
+ argstr = sprintf("%d, [%p], %d", $fd, $vec, $vlen)
%:
- argstr = sprintf("unknown fd, [%p], %d", vector_uaddr, $vlen)
+ argstr = sprintf("unknown fd, [%p], %d", $vec, $vlen)
%)
}
probe syscall.writev.return = kernel.function("sys_writev").return {