This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
adding statements in alias definition as epilogue
- From: Li Guanglei <guanglei at cn dot ibm dot com>
- To: "systemtap at sources dot redhat dot com" <systemtap at sources dot redhat dot com>
- Date: Mon, 03 Apr 2006 17:25:42 +0800
- Subject: adding statements in alias definition as epilogue
- Organization: IBM CSTL
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?