public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: fche@redhat.com (Frank Ch. Eigler)
To: James Y Knight <foom@fuhm.net>
Cc: systemtap@sourceware.org
Subject: Re: Dynamically enabling/disabling probe points from within stap script
Date: Fri, 20 Nov 2009 22:47:00 -0000	[thread overview]
Message-ID: <y0maaygzuep.fsf@fche.csb> (raw)
In-Reply-To: <99F43110-6332-47AB-A399-21BCCFA48664@fuhm.net> (James Y. Knight's message of "Fri, 20 Nov 2009 16:52:02 -0500")

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

      reply	other threads:[~2009-11-20 22:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-20 21:53 James Y Knight
2009-11-20 22:47 ` Frank Ch. Eigler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=y0maaygzuep.fsf@fche.csb \
    --to=fche@redhat.com \
    --cc=foom@fuhm.net \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).