This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Writing tapset functions for multiple versions
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)