public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: David Smith <dsmith@redhat.com>
To: Felix Lu <flu@redhat.com>
Cc: systemtap@sourceware.org
Subject: Re: Writing tapset functions for multiple versions
Date: Wed, 20 Jul 2016 15:04:00 -0000	[thread overview]
Message-ID: <2000cfc0-9b01-e61d-23a8-bcded4c78be4@redhat.com> (raw)
In-Reply-To: <28211526.23172955.1469026042792.JavaMail.zimbra@redhat.com>

On 07/20/2016 09:47 AM, Felix Lu wrote:

>> Are there other ways to lower the overhead? Could each probe set a
>> global indexed by tid() to some value? (Or by that point would the
>> string comparison you are using be about the same?)
> 
> A global integer instead of the string comparison could be set if you
> are worried about the overhead. In the example above, tid() could be
> saved in the probe alias body as a private global which would be sufficient
> for identifying the desired function.  

I'm not quite sure how saving tid() in a private global would work if
you are probing more than one thread at a time. Or did I misunderstand
your idea and your global is an array? If the private global is an
array, now we've got 2 private global arrays (1 for version1.stp and 1
for version2.stp).

-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)

  reply	other threads:[~2016-07-20 15:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <64396010.22700492.1468961291108.JavaMail.zimbra@redhat.com>
2016-07-19 21:06 ` Felix Lu
2016-07-20 14:05   ` David Smith
2016-07-20 14:47     ` Felix Lu
2016-07-20 15:04       ` David Smith [this message]
2016-07-20 15:25         ` Felix Lu
2016-07-20 16:23           ` Felix Lu
2016-07-20 16:38             ` Josh Stone

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=2000cfc0-9b01-e61d-23a8-bcded4c78be4@redhat.com \
    --to=dsmith@redhat.com \
    --cc=flu@redhat.com \
    --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).