public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ia64: add utrace support on ia64
@ 2008-09-05 16:19 Masami Hiramatsu
  0 siblings, 0 replies; only message in thread
From: Masami Hiramatsu @ 2008-09-05 16:19 UTC (permalink / raw)
  To: systemtap-ml

[-- Attachment #1: Type: text/plain, Size: 291 bytes --]

Hi,

Here is a patch which add utrace on ia64 support to systemtap.
I just checked it on rhel5.2 kernel (this means old utrace interface).

Thank you,

-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com


[-- Attachment #2: runtime-utrace-ia64-support.patch --]
[-- Type: text/plain, Size: 2059 bytes --]

---
 runtime/syscall.h |   47 ++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 46 insertions(+), 1 deletion(-)

Index: systemtap/runtime/syscall.h
===================================================================
--- systemtap.orig/runtime/syscall.h
+++ systemtap/runtime/syscall.h
@@ -66,7 +66,15 @@
 #define MUNMAP_SYSCALL_NO(tsk)		91
 #define MREMAP_SYSCALL_NO(tsk)		163
 #endif
- 
+
+#if defined(__ia64__)
+#define MMAP_SYSCALL_NO(tsk)		1151
+#define MMAP2_SYSCALL_NO(tsk)		1172
+#define MPROTECT_SYSCALL_NO(tsk)	1155
+#define MUNMAP_SYSCALL_NO(tsk)		1152
+#define MREMAP_SYSCALL_NO(tsk)		1156
+#endif
+
 #if !defined(MMAP_SYSCALL_NO) || !defined(MMAP2_SYSCALL_NO)		\
 	|| !defined(MPROTECT_SYSCALL_NO) || !defined(MUNMAP_SYSCALL_NO)	\
 	|| !defined(MREMAP_SYSCALL_NO)
@@ -95,6 +103,14 @@ __stp_user_syscall_nr(struct pt_regs *re
 }
 #endif
 
+#if defined(__ia64__)
+static inline unsigned long
+__stp_user_syscall_nr(struct pt_regs *regs)
+{
+        return regs->r15;
+}
+#endif
+
 #if defined(__i386__) || defined(__x86_64__)
 static inline long *
 __stp_user_syscall_return_value(struct task_struct *task, struct pt_regs *regs)
@@ -129,6 +145,14 @@ __stp_user_syscall_return_value(struct t
 } 
 #endif
 
+#if defined(__ia64__)
+static inline long *
+__stp_user_syscall_return_value(struct task_struct *task, struct pt_regs *regs)
+{
+	return &regs->r8;
+}
+#endif
+
 #if defined(__i386__) || defined(__x86_64__)
 static inline long *
 __stp_user_syscall_arg(struct task_struct *task, struct pt_regs *regs,
@@ -211,4 +235,25 @@ __stp_user_syscall_arg(struct task_struc
 }
 #endif
 
+#if defined(__ia64__)
+static inline long *
+__stp_user_syscall_arg(struct task_struct *task, struct pt_regs *regs,
+		       unsigned int n)
+{
+	struct ia64_stap_get_arbsp_param pa;
+	if (n > 5) {
+		_stp_error("syscall arg > 5");
+		return NULL;
+	}
+
+	pa.ip = regs->cr_iip;
+	unw_init_running(ia64_stap_get_arbsp, &pa);
+	if (pa.address == 0)
+		return NULL;
+
+	return ia64_rse_skip_regs(pa.address, n);
+
+}
+#endif
+
 #endif /* _SYSCALL_H_ */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-09-05 16:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-05 16:19 [PATCH 1/2] ia64: add utrace support on ia64 Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).