]> sourceware.org Git - systemtap.git/commitdiff
Fixed PR13451 by updating eventfd support in nd_syscalls.stp.
authorDavid Smith <dsmith@redhat.com>
Fri, 20 Jul 2012 19:46:42 +0000 (14:46 -0500)
committerDavid Smith <dsmith@redhat.com>
Fri, 20 Jul 2012 19:46:42 +0000 (14:46 -0500)
* tapset/nd_syscalls.stp: Updated nd_syscall.eventfd probe aliase to handle
  sys_eventfd2().
* testsuite/systemtap.syscall/nd_syscall.exp (syscall_kfails): Removed
  eventfd kfail.

tapset/nd_syscalls.stp
testsuite/systemtap.syscall/nd_syscall.exp

index 9c11995972fbcdccf6e73c5bf3b96c6f7ff1bab4..7977b4383302564c2a983a4e493b6b73e4fc877e 100644 (file)
@@ -914,9 +914,25 @@ probe nd_syscall.epoll_wait.return = kprobe.function("compat_sys_epoll_wait").re
 
 # eventfd _____________________________________________________
 # long sys_eventfd(unsigned int count)
-#
-# FIXME: doesn't handle sys_eventfd2()
-probe nd_syscall.eventfd = kprobe.function("sys_eventfd") ?
+# SYSCALL_DEFINE2(eventfd2, unsigned int, count, int, flags)
+probe nd_syscall.eventfd = __nd_syscall.eventfd2 !,
+                           __nd_syscall.eventfd ?
+{
+}
+probe __nd_syscall.eventfd2 = kprobe.function("sys_eventfd2")
+{
+       asmlinkage()
+       flags = int_arg(2)
+       if (flags == 0) {
+               name = "eventfd"
+               argstr = sprint(uint_arg(1))
+       } else {
+               name = "eventfd2"
+               argstr = sprintf("%d, %s", uint_arg(1),
+                                _eventfd2_flag_str(flags))
+       }
+}
+probe __nd_syscall.eventfd = kprobe.function("sys_eventfd")
 {
        name = "eventfd"
        // argstr = sprint($count)
@@ -924,8 +940,19 @@ probe nd_syscall.eventfd = kprobe.function("sys_eventfd") ?
        flags = 0
        argstr = sprint(uint_arg(1))
 }
-probe nd_syscall.eventfd.return = kprobe.function("sys_eventfd").return ?
+probe nd_syscall.eventfd.return = __nd_syscall.eventfd2.return !,
+                                  __nd_syscall.eventfd.return ?
+{
+}
+probe __nd_syscall.eventfd2.return = kprobe.function("sys_eventfd2").return
 {
+       flags = @entry(__asmlinkage_int_arg(2))
+       name = flags == 0 ? "eventfd" : "eventfd2"
+       retstr = returnstr(1)
+}
+probe __nd_syscall.eventfd.return = kprobe.function("sys_eventfd").return
+{
+       flags = 0
        name = "eventfd"
        retstr = returnstr(1)
 }
index 8ef803bba44bfc153e837fcb2b2b04fc22c4be5c..e566d511e37dee33e28391b55f41049c286a367f 100644 (file)
@@ -3,7 +3,6 @@ source $srcdir/$subdir/test.tcl
 
 proc syscall_kfails {NAME} {
        switch $NAME {
-               "eventfd" { return 13452 }
                "inotify" { return 13453 }
                "pipe" { return 13454 }
                "signalfd" { return 13455 }
This page took 0.032805 seconds and 5 git commands to generate.