This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: adding statements in alias definition as epilogue
Guang Lei Li <liguangl@cn.ibm.com> writes:
> [...] But you are right, backtrace printing is too slow, we need a
> faster way of getting the backtrace
Unfortunately, even just gathering the PC address history requires
searching through up to several kilobytes of stack frames - that must
be at least 40K cycles all by itself. My guess is that converting the
result to symbol+offset strings is almost as much work again (though
could perhaps be deferred).
> > > probe derived_probe := alias_with_filter_codes {
> > > filter_on = 1
> > > scsi_lun = 2
> > > scsi_dev_major = 3
> > > }
> >
> > This style of usage could be accommodated with explicit code
> > (analogous to "if (target() != pid()) next") instead of alias epilogues.
> [...] But how can you pass in filter_on, scsi_lun & scsi_dev_major?
Like this:
probe derived_probe:= base_alias_without_filter_codes_without_tracing {
if (! (scsi_lun == 2 && scsi_dev_major == 3)) next
base_trace_function (...)
}
But you got me thinking about the alias epilogue option. It would
solve this problem in a nicer way. Anyone with arguments pro/con?
> The newly arguments support in stap could make it, but it seems not
> a good solution in this example.
Whether the numbers are hardcoded in script or pasted from the command
line does not appear to make any difference.
- FChE