From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26354 invoked by alias); 10 Sep 2007 02:46:37 -0000 Received: (qmail 26345 invoked by uid 22791); 10 Sep 2007 02:46:36 -0000 X-Spam-Status: No, hits=-0.5 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org Received: from rgminet01.oracle.com (HELO rgminet01.oracle.com) (148.87.113.118) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 10 Sep 2007 02:46:30 +0000 Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id l8A2kIhW028628; Sun, 9 Sep 2007 20:46:18 -0600 Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id l89Lxrhf008245; Sun, 9 Sep 2007 20:46:17 -0600 Received: from adcq13z27-bigip4-int-shared.oracle.com by acsmt358.oracle.com with ESMTP id 4516326911189392364; Sun, 09 Sep 2007 21:46:04 -0500 Message-ID: <46E4AF85.3090901@oracle.com> Date: Mon, 10 Sep 2007 05:21:00 -0000 From: Wenji Huang User-Agent: Mozilla Thunderbird 1.0.8-1.4.1 (X11/20060420) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Zhaolei CC: systemtap@sourceware.org Subject: Re: [patch] For getrusage's argstr in tapset References: <1188780895.5736.ezmlm@sourceware.org> <006d01c7edd9$55a2b080$85697c0a@guest004> <00d501c7ef97$931426a0$85697c0a@guest004> <006b01c7f342$00b6a770$85697c0a@guest004> In-Reply-To: <006b01c7f342$00b6a770$85697c0a@guest004> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2007-q3/txt/msg00545.txt.bz2 Hi Zhaolei, probe getrusage set probe point at the entry of the function. So the arguments may be any value. So I think to keep the entry in _rusage_who_str, just give another mapping in case of some certain value. Of course, if you can ensure that "who" only be RUSAGE_SELF/RUSAGE_CHILDREN when the syscall called. Just remove. Thanks, Wenji Zhaolei wrote: >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 > > >