adding statements in alias definition as epilogue

bibo,mao bibo.mao@intel.com
Mon Apr 3 09:59:00 GMT 2006


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?
> 



More information about the Systemtap mailing list