Dynamically enabling/disabling probe points from within stap script
Frank Ch. Eigler
fche@redhat.com
Fri Nov 20 22:47:00 GMT 2009
James Y Knight <foom@fuhm.net> writes:
> Is there any plan to allow the ability to dynamically and
> efficiently enable and disable probes from within the systemtap
> script?
Yup.
> I know you can do:
> probe process(...).mark("foo") if (whatever) {}
> but that isn't efficient [...]
That's right. We have had a rough design for this, but kind of forgot
to finish the job. Your note and PR10995 should bring attention back
to the problem. (One drawback of actually disarming/rearming probes
is that because of the unavoidable latency between intended rearming
and actual rearming, the script may experience unknown missed probes.)
> Also nice would be a way to (efficiently!) say "run this probe every
> N times the location is hit".
Since this would require counting each location hit, and thus the
activation of the corresponding low-level probe, this would be
equivalent to adding something like this into the probe handler
if (count++ % 100) next;
- FChE
More information about the Systemtap
mailing list