From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27929 invoked by alias); 5 Apr 2006 02:46:02 -0000 Received: (qmail 27921 invoked by uid 22791); 5 Apr 2006 02:46:01 -0000 X-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from ausmtp04.au.ibm.com (HELO ausmtp04.au.ibm.com) (202.81.18.152) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 05 Apr 2006 02:46:00 +0000 Received: from sd0208e0.au.ibm.com (d23rh904.au.ibm.com [202.81.18.202]) by ausmtp04.au.ibm.com (8.13.6/8.13.5) with ESMTP id k352sjq6242916 for ; Wed, 5 Apr 2006 12:54:45 +1000 Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.250.243]) by sd0208e0.au.ibm.com (8.12.10/NCO/VER6.8) with ESMTP id k352n0In236824 for ; Wed, 5 Apr 2006 12:49:05 +1000 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.12.11/8.13.3) with ESMTP id k352jf20030820 for ; Wed, 5 Apr 2006 12:45:41 +1000 Received: from d23m0017.cn.ibm.com (cnnco04.cn.ibm.com [9.181.122.142]) by d23av02.au.ibm.com (8.12.11/8.12.11) with ESMTP id k352jel5030814; Wed, 5 Apr 2006 12:45:40 +1000 In-Reply-To: <20060405012447.GC16498@redhat.com> To: systemtap@sources.redhat.com Cc: fche@redhat.com Subject: Re: adding statements in alias definition as epilogue MIME-Version: 1.0 X-Mailer: Lotus Notes Release 7.0 HF144 February 01, 2006 Message-ID: From: Guang Lei Li Date: Wed, 05 Apr 2006 02:46:00 -0000 X-MIMETrack: Serialize by Router on d23m0017/23/M/IBM(Release 6.53HF654 | July 22, 2005) at 04/05/2006 10:46:55, Serialize complete at 04/05/2006 10:46:55 Content-Type: text/plain; charset="US-ASCII" X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2006-q2/txt/msg00036.txt.bz2 > OK, how about forking it into independent twins? > > probe addevent.tskdispatch.cpuidle = kernel.inline("idle_balance") { > log_cpuidle_tracedata(HOOKID_TASK_CPUIDLE, 0) > } > probe addevent.tskdispatch.cpuidle.backtrace = kernel.inline("idle_balance") { > log_cpuidle_tracedata(HOOKID_TASK_CPUIDLE, 1) > } > I ever thought abut doing like this. But the biggest problem of it is not only the redundant codes, but it will have trouble if you use wildcard(*) to specify a group of hooks, for example: probe addevent.tskdispatching.* {} will cause both addevent.tskdispatch.cpuidle.backtrace & addevent.tskdispatch.cpuidle to be triggered. > This assumes that per-probe backtrace configuration makes more sense > than, say, a single global variable. 'backtrace' used inside the probe definitions is a local variable, which is cheaper than using a global variable. And it also enables to turn on/off backtrace for each event separately instead of turn on/off all backtraces as a whole. > > It still seems like a big step to introduce this inverted data/control > flow. We would have to consider composing multiple levels of aliases, > to make sure a programmer and a user can reason easily about what > should happen. > > - FChE Yes. Maybe some syntax for specifying different kinds of aliases need to be introduced. Besides my specific need of alias definition as epilogue, I think it is also useful if you want a filter: probe derived_probe := alias_with_filter_codes { filter_on = 1 scsi_lun = 2 scsi_dev_major = 3 } - Li Guanglei