This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Dynamically enabling/disabling probe points from within stap script
- From: James Y Knight <foom at fuhm dot net>
- To: systemtap at sourceware dot org
- Date: Fri, 20 Nov 2009 16:52:02 -0500
- Subject: Dynamically enabling/disabling probe points from within stap script
Is there any plan to allow the ability to dynamically and efficiently enable and disable probes from within the systemtap script?
I know you can do:
probe process(...).mark("foo") if (whatever) {}
but that isn't efficient: there's still substantial overhead at the mark point as long as 'stap' is running, even if you aren't interested in that probe currently. (The overhead appears to be about 3µs per mark hit, on my machine.)
I saw some code in sdt.h about "semaphores", but that seems to just be an alternative to editing memory to insert a break instruction, and not a way to let the systemtap script temporarily disable probe points?
Also nice would be a way to (efficiently!) say "run this probe every N times the location is hit".
James