This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[patch] Set buf as address type in tapset's syslog probe
- From: "Zhaolei" <zhaolei at cn dot fujitsu dot com>
- To: <systemtap at sourceware dot org>
- Cc: "Zhaolei" <zhaolei at cn dot fujitsu dot com>
- Date: Wed, 29 Aug 2007 17:29:11 +0900
- Subject: [patch] Set buf as address type in tapset's syslog probe
- References: <46CA9241.2010008@cn.fujitsu.com>
Hi, everyone
In probe syslog in tapset, buf is set as string type in argstr.
But buf is always used for storing returned data in syslog().
So i think it is better to set it to address type(%p).
If anyone knows why string type is necessary, please tell me.
(And if no object, I will commit following patch)
Signed-off-by: "Zhaolei" zhaolei@cn.fujitsu.com
--- syscalls2.stp.old 2007-08-29 16:57:17.000000000 +0900
+++ syscalls2.stp 2007-08-29 16:55:28.000000000 +0900
@@ -2517,7 +2517,7 @@ probe syscall.syslog = kernel.function("
type = $type
bufp_uaddr = $buf
len = $len
- argstr = sprintf("%d, %s, %d", $type, text_strn(user_string($buf),syscall_string_trunc,1), $len)
+ argstr = sprintf("%d, %p, %d", $type, $buf, $len)
}
probe syscall.syslog.return = kernel.function("sys_syslog").return {
name = "syslog"
Regards
Zhaolei