[oe-commits] Mikhail Durnev : systemtap: Fixed probe syscall.sendfile failure

git at git.openembedded.org git at git.openembedded.org
Wed Sep 3 16:44:34 UTC 2014


Module: openembedded-core.git
Branch: master
Commit: 74bfb662246411aa062cd8b2acd37be1bbed39d3
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=74bfb662246411aa062cd8b2acd37be1bbed39d3

Author: Mikhail Durnev <mikhail_durnev at mentor.com>
Date:   Wed Sep  3 13:14:30 2014 +0500

systemtap: Fixed probe syscall.sendfile failure

Marked __syscall.compat_sendfile as optional

Signed-off-by: Mikhail Durnev <mikhail_durnev at mentor.com>
Signed-off-by: Muzaffar Mahmood <muzaffar_mahmood at mentor.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 .../systemtap/tapset-linux-sendfile-syscall.patch  | 22 ++++++++++++++++++++++
 meta/recipes-kernel/systemtap/systemtap_git.inc    |  1 +
 2 files changed, 23 insertions(+)

diff --git a/meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch b/meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch
new file mode 100644
index 0000000..f945760
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch
@@ -0,0 +1,22 @@
+systemtap: Fixed probe syscall.sendfile failure
+
+compat_sendfile syscall is unavailable in kernels starting version 3.8.
+Hence systemtap scripts like 'probe syscall.* { if (target()==pid()) log(name." ".argstr) }' fail.
+This problem is solved by marking __syscall.compat_sendfile as optional in tapset/linux/syscalls2.stp
+
+Upstream-Status: Pending
+
+Signed-off-by: Mikhail Durnev <mikhail_durnev at mentor.com>
+
+diff -Naur old/tapset/linux/syscalls2.stp new/tapset/linux/syscalls2.stp
+--- old/tapset/linux/syscalls2.stp	2014-04-21 01:28:41.000000000 -0500
++++ new/tapset/linux/syscalls2.stp	2014-04-21 01:38:14.961233914 -0500
+@@ -1953,7 +1953,7 @@
+ # COMPAT_SYSCALL_DEFINE4(sendfile64, int, out_fd, int, in_fd,
+ #		compat_loff_t __user *, offset, compat_size_t, count)
+ #
+-probe syscall.sendfile = __syscall.sendfile, __syscall.compat_sendfile
++probe syscall.sendfile = __syscall.sendfile, __syscall.compat_sendfile ?
+ {
+ 	name = "sendfile"
+ 	out_fd = __int32($out_fd)
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc
index 717d66f..3e1e80a 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -6,6 +6,7 @@ PV = "2.5+git${SRCPV}"
 SRC_URI = "git://sourceware.org/git/systemtap.git \
            file://docproc-build-fix.patch \
            file://obsolete_automake_macros.patch \
+           file://tapset-linux-sendfile-syscall.patch \
           "
 
 # systemtap doesn't support mips



More information about the Openembedded-commits mailing list