This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Dynamically enabling/disabling probe points from within stap script


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]