Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@specifix.com>
To: Doug Evans <dje@google.com>
Cc: gdb@sourceware.org
Subject: Re: gdbserver tracepoint support (from Project Ideas page)
Date: Thu, 21 Feb 2008 20:59:00 -0000	[thread overview]
Message-ID: <1203623152.19253.193.camel@localhost.localdomain> (raw)
In-Reply-To: <e394668d0802201735q53b3a971w8a55f0c876ba1300@mail.gmail.com>

On Wed, 2008-02-20 at 17:35 -0800, Doug Evans wrote:
> On Wed, Feb 20, 2008 at 5:06 PM, Michael Snyder <msnyder@specifix.com> wrote:
> >  When you say "[not] much benefit to implementing tracepoints
> >  natively", do you mean "as opposed to just using gdbserver
> >  or equivalent"?
> 
> Not precisely.  To be honest I was hedging my bets because I've kinda
> thought tracepoints would find more use too, and given that there
> isn't yet support in gdbserver or native, I was wondering if there was
> a sufficient reason for not doing it that I was overlooking.  Part of
> the initial reason for implementing them was to avoid transmitting
> packets back and forth at each tracepoint.  That reason doesn't really
> apply to a native implementation but the process switching to
> implement this in ptrace (for linux) is a non-trivial intrusion for
> many apps (as it will be in gdbserver too), so maybe that's why it
> hasn't been implemented.  A hybrid approach would be way cool (i.e.
> instrumenting the target program so tracepoints didn't stop the
> program even when running natively - this is where remote targets have
> an advantage, the stub is already in the same address space and
> process - but that ups the complexity a wee bit).

I've always thought that one interesting implementation for
tracepoint data collection would be as a shared library that
the child program could be linked with at runtime -- in the
manner of libsegfault, so that you don't have to change the
child program at all.  In that way, it would share address
space and only incur the cost of a signal handler, not a
full context switch (or even a thread context switch).

Is that something like your thinking?




  parent reply	other threads:[~2008-02-21 19:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-21  0:01 Doug Evans
2008-02-21  0:19 ` Michael Snyder
2008-02-21  1:06   ` Doug Evans
2008-02-21  1:34     ` Michael Snyder
2008-02-21  1:36       ` Daniel Jacobowitz
2008-02-21  1:42       ` Doug Evans
2008-02-21 13:44         ` Daniel Jacobowitz
2008-02-21 20:59         ` Michael Snyder [this message]
2008-02-22 17:24           ` Doug Evans

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=1203623152.19253.193.camel@localhost.localdomain \
    --to=msnyder@specifix.com \
    --cc=dje@google.com \
    --cc=gdb@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