Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Sergio Durigan Junior <sergiodj@redhat.com>,
	Tom Tromey <tromey@redhat.com>
Subject: Re: [PATCH 3/6] Modify internalvar mechanism
Date: Tue, 19 Apr 2011 17:53:00 -0000	[thread overview]
Message-ID: <201104191852.58106.pedro@codesourcery.com> (raw)
In-Reply-To: <m3vcyj5cda.fsf@redhat.com>

On Tuesday 12 April 2011 23:33:05, Sergio Durigan Junior wrote:
> Pedro Alves <pedro@codesourcery.com> writes:
> 
> > On Monday 04 April 2011 04:08:34, Sergio Durigan Junior wrote:
> >> Hi,
> >> 
> >> This patch modifies the mechanism of internalvar.  It basically adds
> >> more manipulation functions to them (`compile_to_ax' and `destroy'), and
> >> updates the definitions and pointers of existing internalvars.
> >
> > Can you explain this?  Why would you want to compile an internal var
> > to AX, for example?
> 
> A SystemTap probe can have up to 10 arguments.  In our original plan,
> the idea is that the user should be able to collect those arguments
> using the tracepoint mechanism.  Since we already have the necessary
> code to evaluate an argument (which is treated as an internal varibale
> inside GDB), we thought it would be easier to extend this code in order
> to compile it to AX.
> 
> You could do something like:
> 
>     (gdb) trace probe:test
>     ..
>     (gdb) actions
>     ..
>     > collect $_probe_arg0
>     > end
>     ..

Do I understand correctly that this still creates
a regular trap tracepoint at the probe location?
A fast tracepoint ("ftrace") at that spec would
create a fast tracepoint at the probe's location, and 
things would magically work, because $_probe_argN is just
sugar for collecting memory and registers, right?

I noticed that patch 4 does some changes to 
start_tracing to tweak the probes' semaphores, if any.
What are these semaphores?  How do other stap tools
handle them?  I ask because that bends a bit the definition
of "trace" being a regular tracepoint at a given
location, so I'd like to understand it.

> In order to collect the probe's first argument, and so on.

I see.  Sounds like a good approach.

(I'm reading patch 4 piecemeal, but it's taking a
bit to grok it all).

-- 
Pedro Alves


  reply	other threads:[~2011-04-19 17:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-04  3:08 Sergio Durigan Junior
2011-04-11 21:08 ` Jan Kratochvil
2011-04-12 11:24 ` Pedro Alves
2011-04-12 20:40   ` Tom Tromey
2011-04-12 22:33   ` Sergio Durigan Junior
2011-04-19 17:53     ` Pedro Alves [this message]
2011-04-19 18:40       ` Tom Tromey
2011-04-19 20:01         ` Tom Tromey

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=201104191852.58106.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sergiodj@redhat.com \
    --cc=tromey@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