From: "Zhaolei" <zhaolei@cn.fujitsu.com>
To: <systemtap@sourceware.org>
Cc: "Zhaolei" <zhaolei@cn.fujitsu.com>
Subject: [patch] For getrusage's argstr in tapset
Date: Mon, 10 Sep 2007 05:03:00 -0000 [thread overview]
Message-ID: <006b01c7f342$00b6a770$85697c0a@guest004> (raw)
In-Reply-To: <00d501c7ef97$931426a0$85697c0a@guest004>
Hi, everyone
In [tapset->probe getrusage], argstr's "who" argument is printed as
"RUSAGE_BOTH" when its value is -2.
But "RUSAGE_BOTH" is not used in getrusage syscall due to the following
kernel source:
asmlinkage long sys_getrusage(int who, struct rusage __user *ru)
{
if (who != RUSAGE_SELF && who != RUSAGE_CHILDREN)
return -EINVAL;
return getrusage(current, who, ru);
}
So i want to remove RUSAGE_BOTH from _rusage_who_str.
Is there anyone knows why RUSAGE_BOTH is necessary, please tell me.
and if no objection, I will commit it.
Signed-off-by: "Zhaolei" zhaolei@cn.fujitsu.com
--- aux_syscalls.stp.old 2007-09-06 11:51:14.000000000 +0900
+++ aux_syscalls.stp 2007-09-06 11:52:22.000000000 +0900
@@ -1661,7 +1661,6 @@ function _rlimit_resource_str(r) {
function _rusage_who_str(w) {
if(w==0) return "RUSAGE_SELF"
if(w==-1) return "RUSAGE_CHILDREN"
- if(w==-2) return "RUSAGE_BOTH"
return sprintf("UNKNOWN VALUE: %d", w)
}
Regards
Zhaolei
next prev parent reply other threads:[~2007-09-10 0:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1188780895.5736.ezmlm@sourceware.org>
2007-09-03 12:48 ` [patch] Modify flag's value in tapset's probe delete_module Zhaolei
2007-09-05 14:46 ` [patch] For memory access error when calling _stp_sockaddr_str with addrlen set to 0 Zhaolei
2007-09-05 22:49 ` Frank Ch. Eigler
2007-09-10 5:03 ` Zhaolei [this message]
2007-09-10 5:21 ` [patch] For getrusage's argstr in tapset Wenji Huang
2007-09-10 9:28 ` Zhaolei
2007-09-10 14:01 ` Wenji Huang
2007-09-13 16:06 ` Zhaolei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='006b01c7f342$00b6a770$85697c0a@guest004' \
--to=zhaolei@cn.fujitsu.com \
--cc=systemtap@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).