From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25826 invoked by alias); 3 Apr 2006 09:59:17 -0000 Received: (qmail 25815 invoked by uid 22791); 3 Apr 2006 09:59:16 -0000 X-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Received: from mga01.intel.com (HELO fmsmga101-1.fm.intel.com) (192.55.52.88) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 03 Apr 2006 09:59:15 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101-1.fm.intel.com with ESMTP; 03 Apr 2006 02:59:13 -0700 Received: from maobb.sh.intel.com (HELO [10.239.13.78]) ([10.239.13.78]) by fmsmga001.fm.intel.com with ESMTP; 03 Apr 2006 02:59:13 -0700 TrustExchangeSourcedMail: True X-ExchangeTrusted: True X-IronPort-AV: i="4.03,157,1141632000"; d="scan'208"; a="19076413:sNHT15929109" Message-ID: <4430EF80.2040208@intel.com> Date: Mon, 03 Apr 2006 09:59:00 -0000 From: "bibo,mao" User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: Li Guanglei CC: "systemtap@sources.redhat.com" Subject: Re: adding statements in alias definition as epilogue References: <4430EA16.8020702@cn.ibm.com> In-Reply-To: <4430EA16.8020702@cn.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00012.txt.bz2 you can use parameter to implement this probe start{ backtrace = $1; } Li Guanglei wrote: > Currently the statement block that follows an alias definition is > implicitly added as a prologue to any probe that refers to the alias. > But it seems to me that only allowing adding those statements contained > in an alias definition as a prologue makes me to lose some controls over > them. > > For example, I have a tapsets: > > probe addevent.tskdispatch.cpuidle > = kernel.inline("idle_balance") > { > log_cpuidle_tracedata(HOOKID_TASK_CPUIDLE, backtrace) > } > > What I want is to let user specify whether to log backtrace in his > scripts, like the following: > > stap -e "probe addevent.tskdispatch.cpuidle { backtrace=1 } -I LKET_TAPSETS > > But unfortunately, it won't work because "backtrace=1" is added after > "log_cpuidle_tracedata(HOOKID_TASK_CPUIDLE, backtrace)". So how about > providing a way to specify whether the statements in a alias definition > could be added as prologue or epilogue to any probe that refers to that > alias? >