Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: Dominique Toupin <dominique.toupin@ericsson.com>
Cc: gdb@sourceware.org, "Frank Ch. Eigler" <fche@redhat.com>,
	        systemtap@sourceware.org
Subject: Re: Static/dynamic userspace/kernel trace
Date: Tue, 20 Apr 2010 14:01:00 -0000	[thread overview]
Message-ID: <20100420140046.GB20675@linux.vnet.ibm.com> (raw)
In-Reply-To: <20100419141356.GC4823@redhat.com>

> 
> > I had a chat with Tom at the collaboration summit on tracing, he was
> > suggesting I send you a mail on a recent GDB improvement.  You might
> > not be aware that user space dynamic tracepoint are now available in
> > GDB, in process tracing if a few byte space is available to put a
> > jump, if that space is not available then a trap between gdbserver
> > and the process. With this addition all aspects of tracing seem to
> > be covered:
> >
> >  - static user space: LTTng UST
> >  - dynamic user space: GDB dynamic tracepoint

I did go thro
http://sources.redhat.com/gdb/current/onlinedocs/gdb.html#Set-Tracepoints
but it says 
 "The tracepoint facility is currently available only for remote targets.
See Targets. In addition, your remote target must know how to collect
trace data. This functionality is implemented in the remote stub;
however, none of the stubs distributed with gdb support tracepoints as
of this writing. "
 
and 

"Some targets may support fast tracepoints, which are inserted in a
different way (such as with a jump instead of a trap), that is faster
but possibly restricted in where they may be installed. "

So it possible to use GDB dynamic tracepoints on regular programs
without using remote protocol? If not do you plans to implement this for
non-remote targets?


> >  - static kernel: kernel static tracepoint/trace event
> >  - dynamic kernel: kprobe
> >
> > and conditional tracing is available for both kernel and user space.
> 
> All right.
> 
> 
> > Tom was saying uprobes/utrace can bring nice improvements for
> > ptrace, for tracing it was not clear to me or Tom why we need
> > uprobe/utrace or why systemtap needs it. Do you have a use case
> > where the above tracing cannot be use and uprobe/utrace is needed
> > instead?

Since gdb tracepoints would fall back on traps, using uprobes could
decrease the overhead on inserting/processing a trap instruction. Also
the uprobes handler could be used to collect the information in the same
process context.

Alternatively gdb could use user_bkpt layer to insert traps and 
collect the information in the tracer's context. However this would
require tracer to do some additional work. Still this should be provide
lesser overhead than ptrace.

Uprobes/user_bkpt implements execution out of line, hence it scales well
with multithreaded applications.

Also as Frank already pointed out, uprobes/utrace were designed for
allowing multiple tracing sessions to connect to the same tracee.

I am ignorant on how gdb dynamic tracepoints was implemented to comment
on how gdb could further use uprobes/utrace. Can you please point me to
some documentation on the same.

--
Thanks and Regards
Srikar


  parent reply	other threads:[~2010-04-20 14:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <D58A856745AB5A47B1448181D1A8BBFA01CB20875C@EUSAACMS0701.eamcs.ericsson.se>
2010-04-19 14:14 ` Frank Ch. Eigler
2010-04-19 19:50   ` Dominique Toupin
2010-04-20  7:59     ` Mark Wielaard
2010-04-22 19:46       ` Dominique Toupin
2010-04-20 17:28     ` Frank Ch. Eigler
2010-04-20 14:01   ` Srikar Dronamraju [this message]
2010-04-20 18:06     ` Stan Shebs

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=20100420140046.GB20675@linux.vnet.ibm.com \
    --to=srikar@linux.vnet.ibm.com \
    --cc=dominique.toupin@ericsson.com \
    --cc=fche@redhat.com \
    --cc=gdb@sourceware.org \
    --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