From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6163 invoked by alias); 13 Sep 2007 07:57:20 -0000 Received: (qmail 6155 invoked by uid 22791); 13 Sep 2007 07:57:19 -0000 X-Spam-Status: No, hits=-0.3 required=5.0 tests=AWL,BAYES_20,DK_POLICY_SIGNSOME,DNS_FROM_RFC_ABUSE X-Spam-Check-By: sourceware.org Received: from fgwmail5.fujitsu.co.jp (HELO fgwmail5.fujitsu.co.jp) (192.51.44.35) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 13 Sep 2007 07:57:13 +0000 Received: from m1.gw.fujitsu.co.jp ([10.0.50.71]) by fgwmail5.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id l8D7uu5q006089 (envelope-from zhaolei@cn.fujitsu.com); Thu, 13 Sep 2007 16:56:56 +0900 Received: from smail (m1 [127.0.0.1]) by outgoing.m1.gw.fujitsu.co.jp (Postfix) with ESMTP id 1784224005F; Thu, 13 Sep 2007 16:56:56 +0900 (JST) Received: from s5.gw.fujitsu.co.jp (s5.gw.fujitsu.co.jp [10.0.50.95]) by m1.gw.fujitsu.co.jp (Postfix) with ESMTP id D119F2DC02F; Thu, 13 Sep 2007 16:56:55 +0900 (JST) Received: from s5.gw.fujitsu.co.jp (s5 [127.0.0.1]) by s5.gw.fujitsu.co.jp (Postfix) with ESMTP id B3C46161C00D; Thu, 13 Sep 2007 16:56:55 +0900 (JST) Received: from vs00.gw.fujitsu.co.jp (vs00.gw.fujitsu.co.jp [133.161.11.20]) by s5.gw.fujitsu.co.jp (Postfix) with ESMTP id 6613D161C00B; Thu, 13 Sep 2007 16:56:55 +0900 (JST) Received: from root01.fujitsu.com (root01.fujitsu.com [133.161.11.11]) by vs00.gw.fujitsu.co.jp (8.13.7/8.13.7) with ESMTP id l8D7utCJ004603; Thu, 13 Sep 2007 16:56:55 +0900 Received: from root01.fujitsu.com (root01 [127.0.0.1]) by root01.fujitsu.com (Postfix) with ESMTP id 2280B282C7B; Thu, 13 Sep 2007 16:56:55 +0900 (JST) Received: from guest004 (unknown [10.124.105.133]) by root01.fujitsu.com (Postfix) with SMTP id BEA65282BF1; Thu, 13 Sep 2007 16:56:54 +0900 (JST) Message-ID: <011f01c7f5db$79ab4960$85697c0a@guest004> From: "Zhaolei" To: "Wenji Huang" Cc: References: <1188780895.5736.ezmlm@sourceware.org> <006d01c7edd9$55a2b080$85697c0a@guest004> <00d501c7ef97$931426a0$85697c0a@guest004> <006b01c7f342$00b6a770$85697c0a@guest004> <46E4AF85.3090901@oracle.com> <013001c7f367$a9b745d0$85697c0a@guest004> <46E4D3B2.2020807@oracle.com> Subject: Re: [patch] For getrusage's argstr in tapset Date: Thu, 13 Sep 2007 16:06:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896 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/msg00581.txt.bz2 Hello, Wenji. Within the syscall getrusage, there are only 2 types of flag. So in my opinion, all the other values are not getrusage's flag and should be printed as UNKNOWN. To output a clearer description, we need also print the value of flag in the case of "UNKNOWN". So I think it will be better if it can be revised in my way. Regards Zhaolei ----- Original Message ----- From: "Wenji Huang" To: "Zhaolei" Cc: Sent: Monday, September 10, 2007 2:18 PM Subject: Re: [patch] For getrusage's argstr in tapset > Hi zhaolei, > > In normal case, thing may be like that. But in abnormal case, maybe > wrong arguments are passed to this function. So new entry will > give a clearer description, instead of general UNKNOWN. > > Thanks, > Wenji > > Zhaolei wrote: > > >Hello, Wenji. > > > >Thank you for your suggestion. > > > >I investigated RUSAGE_BOTH and got the following result: > >1: _rusage_who_str is only used for sys_getrusage(and compat_sys_getrusage) > > in current tapset, and there is no other syscall which needs to call > > _rusage_who_str. > > > >2: RUSAGE_BOTH is only used in kernel's internal function getrusage, but > > there is no syscall using this function with RUSAGE_BOTH. > > > >So I think RUSAGE_BOTH is not necessary in tracing syscall, but it may be > > needed when tracing kernel function as getrusage. > > > >It is good idea disable RUSAGE_BOTH only in sys_getrusage > >(and compat_sys_getrusage). > > > >Regards > >Zhaolei > >----- Original Message ----- > >From: "Wenji Huang" > >To: "Zhaolei" > >Cc: > >Sent: Monday, September 10, 2007 11:44 AM > >Subject: Re: [patch] For getrusage's argstr in tapset > > > > > > > > > >>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 > >>> > >>> > >>> > >>> > >>> > >> > >> > > > > > > > >