public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Jim Keniston <jkenisto@us.ibm.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>,
	        ksummit-2008-discuss@lists.linux-foundation.org,
	        systemtap@sources.redhat.com, utrace-devel@redhat.com
Subject: Re: [Ksummit-2008-discuss] DTrace
Date: Tue, 01 Jul 2008 01:21:00 -0000	[thread overview]
Message-ID: <1214874950.3949.47.camel@dyn9047018139.beaverton.ibm.com> (raw)
In-Reply-To: <20080630171246.GB21660@redhat.com>

On Mon, 2008-06-30 at 13:12 -0400, Frank Ch. Eigler wrote:
> Hi -
> 
> On Mon, Jun 30, 2008 at 01:29:13PM +0200, Christoph Hellwig wrote:
> 
> > [...]  This might be getting a little offtopic for the kernel summit
> > discuss list, but let's start anyway, we can move this to a better
> > suited list, although I can't think of one except for linux-kernel.
> 
> systemtap@sources.redhat.com
> utrace-devel@redhat.com
> 
> 
> > I'm not sure if that's the current design, but I can't find any
> > evidence in the code that it allows running handlers in process
> > context, all that's available is a kernel callback.  [...]

To clarify, it's a kernel callback that runs in the context of the
probed thread -- like other utrace-based callbacks.  And like other
utrace-based callbacks, a uprobes handler can block for stuff like
copy_to/from_user()... although I believe systemtap will support only
non-blocking handlers for now.

> 
> For systemtap's purposes, that is sufficient.  Our probes are meant to
> run non-intrusively (they do not mess with user thread scheduling,
> their VM state, strictly limited time & space consumption), so
> actually injecting equivalent snippets of code into userspace for
> execution there does not seem to buy anything.  Plus, like dtrace, we
> want scripts to be able to intermix probes (=> share data) amongst
> kernel and multiple user-space threads, and this seems most naturally
> done by running the probes themselves in kernel space.

Yes.

> 
> 
> > [...] What we really need is a userspace interface so that it
> > actually can be used by thing like frysk or an implementation of the
> > userspace dtrace hooks.

Userspace dtrace hooks could be probed using systemtap-generated
uprobes, whether or not the hooks all funnel into the same user-space
handler function.

> 
> That will get built as other tools require it.  Systemtap per se will
> likely not.

Two years back, we explored the possibility of systemtap translating a
script into an ad hoc tracer app that used ptrace.  The idea was that
that would suffice in cases where the user doesn't care to see what's
going on in the kernel.  My experience was that ptrace wasn't up to the
task.  Perhaps when we nail down the right utrace-based,
ptrace-replacement system call interface (utracer II, or whatever -- see
the  current discussion on the utrace-devel list), we should revisit
that option.  It would make systemtap accessible to the ordinary
application programmer, without him/her needing root or stapdev to bless
his/her script.

Stuff that's in uprobes (e.g., kprobes-style single-stepping out of
line, to allow real-time tracing of multithreaded apps) can be made
available to the new syscall API and/or utrace.

> 
> 
> > [...] For complex traces doing this in userspace is for sure a better idea.
> 
> Can you elaborate upon this more complex scenario?
> 
> 
> - FChE

Jim Keniston

  reply	other threads:[~2008-07-01  1:21 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080627150424.GB14894@parisc-linux.org>
     [not found] ` <1214580213.3394.40.camel@localhost.localdomain>
     [not found]   ` <20080627155018.GC14894@parisc-linux.org>
     [not found]     ` <1214583502.7698.15.camel@weaponx>
     [not found]       ` <20080627163056.GB1416@lst.de>
     [not found]         ` <20080628072605.GA505@in.ibm.com>
     [not found]           ` <20080629084002.GA24131@lst.de>
     [not found]             ` <20080630051034.GA4970@in.ibm.com>
     [not found]               ` <20080630112913.GA18817@lst.de>
2008-06-30 19:27                 ` Frank Ch. Eigler
2008-07-01  1:21                   ` Jim Keniston [this message]
     [not found]                   ` <20080706123414.GA9265@lst.de>
2008-07-06 15:47                     ` Frank Ch. Eigler
2008-07-06 16:36                       ` Evgeniy Polyakov
2008-07-06 18:05                         ` Frank Ch. Eigler
2008-07-06 18:24                           ` Evgeniy Polyakov
2008-07-06 21:46                             ` Frank Ch. Eigler
2008-07-06 22:47                               ` Karen Shaeffer
2008-07-06 23:15                                 ` Frank Ch. Eigler
2008-07-07  5:59                               ` Evgeniy Polyakov
2008-07-07 11:19                                 ` Frank Ch. Eigler
     [not found]   ` <20080627182754.GB7549@mit.edu>
     [not found]     ` <1214597135.3394.82.camel@localhost.localdomain>
     [not found]       ` <aday74qlh08.fsf@cisco.com>
     [not found]         ` <4865B111.2040307@redhat.com>
     [not found]           ` <adavdzujh2u.fsf@cisco.com>
     [not found]             ` <20080704200055.GA11232@synapse.neuralscape.com>
     [not found]               ` <20080704224424.GA12454@synapse.neuralscape.com>
     [not found]                 ` <1215273663.3439.34.camel@localhost.localdomain>
2008-07-06 23:33                   ` Frank Ch. Eigler
2008-07-07 14:35                     ` James Bottomley
2008-07-07 15:02                     ` James Bottomley
2008-06-30 13:57 DTrace Frank Ch. Eigler
2008-06-30 19:00 ` [Ksummit-2008-discuss] DTrace Grant Grundler
2008-06-30 19:40 ` Theodore Tso
2008-06-30 20:00   ` Frank Ch. Eigler
2008-06-30 20:19     ` Theodore Tso
2008-06-30 21:12       ` Arnaldo Carvalho de Melo
2008-06-30 23:02         ` David Miller
2008-06-30 21:13       ` James Bottomley
2008-06-30 22:10       ` Frank Ch. Eigler
2008-07-01  2:42         ` Theodore Tso
2008-07-01  7:08           ` Roland McGrath
2008-07-01 10:15             ` Theodore Tso
2008-07-01 11:04               ` Sam Ravnborg
2008-07-01 12:13                 ` Theodore Tso
2008-07-02 20:27                   ` Sam Ravnborg
2008-07-01 20:06               ` Roland McGrath
2008-07-01 23:13                 ` Theodore Tso
2008-07-02  2:23                   ` Frank Ch. Eigler
2008-07-02 19:27                   ` Frank Ch. Eigler
2008-07-02 20:08                   ` Joel Becker
2008-07-02 20:17                     ` J. Bruce Fields
2008-07-02 20:41                       ` Frank Ch. Eigler
2008-07-02 21:19                       ` H. Peter Anvin
2008-07-02 21:30                       ` Theodore Tso
2008-07-02 21:46                         ` J. Bruce Fields
2008-07-05  9:46                   ` Peter Zijlstra
2008-07-05 10:07                     ` Christoph Hellwig
2008-07-05 12:12                       ` Frank Ch. Eigler
2008-07-05 18:08                         ` Christoph Hellwig
2008-07-05 13:50                       ` James Bottomley
2008-07-05 18:08                         ` Christoph Hellwig
2008-07-05 18:05                       ` K.Prasad
2008-07-07 14:36                         ` Christoph Hellwig
2008-07-07 17:44                           ` K.Prasad
2008-07-05 12:34                     ` Theodore Tso
2008-07-01  5:29   ` Ananth N Mavinakayanahalli
2008-06-30 19:59 ` James Bottomley
2008-06-30 23:52   ` Masami Hiramatsu
2008-07-08 23:32   ` Eric W. Biederman

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=1214874950.3949.47.camel@dyn9047018139.beaverton.ibm.com \
    --to=jkenisto@us.ibm.com \
    --cc=fche@redhat.com \
    --cc=hch@lst.de \
    --cc=ksummit-2008-discuss@lists.linux-foundation.org \
    --cc=systemtap@sources.redhat.com \
    --cc=utrace-devel@redhat.com \
    /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).