This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH 08/12] mips: tapset: fix mips oddities in syscalls
- From: Marcin Nowakowski <marcin dot nowakowski at imgtec dot com>
- To: <systemtap at sourceware dot org>
- Cc: Marcin Nowakowski <marcin dot nowakowski at imgtec dot com>
- Date: Tue, 11 Oct 2016 10:14:24 +0200
- Subject: [PATCH 08/12] mips: tapset: fix mips oddities in syscalls
- Authentication-results: sourceware.org; auth=none
- References: <1476173668-30787-1-git-send-email-marcin.nowakowski@imgtec.com>
Some mips syscalls have different prototypes to standard ones and
require special handling
Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
---
tapset/linux/scheduler.stp | 2 +-
tapset/linux/syscalls2.stp | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/tapset/linux/scheduler.stp b/tapset/linux/scheduler.stp
index c9f66dc..ebf4f61 100644
--- a/tapset/linux/scheduler.stp
+++ b/tapset/linux/scheduler.stp
@@ -117,7 +117,7 @@ probe scheduler.balance = kernel.function("idle_balance") ?
*/
probe scheduler.ctxswitch = kernel.trace("sched_switch") !,
-%( arch != "x86_64" && arch != "ia64" && arch != "arm" %?
+%( arch != "x86_64" && arch != "ia64" && arch != "arm" && arch != "mips" %?
kernel.function("__switch_to")
%:
kernel.function("context_switch")
diff --git a/tapset/linux/syscalls2.stp b/tapset/linux/syscalls2.stp
index 0a4ac69..6ecb4da 100644
--- a/tapset/linux/syscalls2.stp
+++ b/tapset/linux/syscalls2.stp
@@ -1953,7 +1953,11 @@ probe syscall.rt_sigreturn.return =
kernel.function("sys32_rt_sigreturn").return ?
{
name = "rt_sigreturn"
+%( arch == "mips" %?
+ retstr = "void"
+%:
retstr = return_str(1, $return)
+%)
}
# rt_sigsuspend ______________________________________________
@@ -3965,7 +3969,11 @@ probe syscall.sigreturn.return = kernel.function("sys_sigreturn").return ?,
kernel.function("sys32_sigreturn").return ?
{
name = "sigreturn"
+%( arch == "mips" && CONFIG_TRAD_SIGNALS == "y" %?
+ retstr = "void"
+%:
retstr = return_str(1, $return)
+%)
}
# sigsuspend _________________________________________________
@@ -3983,7 +3991,11 @@ probe syscall.sigsuspend = kernel.function("sys_sigsuspend").call ?,
kernel.function("compat_sys_sigsuspend").call ?
{
name = "sigsuspend"
+%( arch == "mips" && CONFIG_TRAD_SIGNALS == "y" %?
+ mask = __ulong($uset)
+%:
mask = __ulong($mask)
+%)
argstr = sprintf("%s", _stp_sigmask_str(mask))
}
probe syscall.sigsuspend.return = kernel.function("sys_sigsuspend").return ?,
--
2.7.4