From: Mike Mason <mmlnx@us.ibm.com>
To: Mathieu Desnoyers <compudj@krystal.dyndns.org>
Cc: ltt-dev@shafik.org, SystemTAP <systemtap@sources.redhat.com>
Subject: Re: Multiple handlers per marker
Date: Fri, 02 Nov 2007 14:12:00 -0000 [thread overview]
Message-ID: <472B3001.3000509@us.ibm.com> (raw)
In-Reply-To: <20071102033654.GA1301@Krystal>
Mathieu Desnoyers wrote:
> * Mathieu Desnoyers (mathieu.desnoyers@polymtl.ca) wrote:
>> * Mike Mason (mmlnx@us.ibm.com) wrote:
>>> Hi Mathieu,
>>>
>>> Are you aware of any working being done to allow multiple handlers to be
>>> attached to a marker? Something like what kprobes allows. I've started to
>>> look into this and don't want to duplicate efforts.
>>>
>> Nope, but I know we will have to address this.
>>
>> Something along the lines of walking an RCU list of function pointers,
>> calling them.
>>
>> The only downside I see is that we will have to pass a va_list * instead
>> of real va args. The could make the marker site a little bit bigger and
>> will change the probe callback arguments.
>>
>> What do you think about these ideas ?
>>
>> If we can find a way to make the common case (only one probe connected)
>> _ultra_ fast, and yet architecture independent, that would be awesome. A
>> simple call is kind of hard to beat though.. So we may have to think
>> about a design with :
>>
>> - One call at the marker site
>> - if 1 probe is installed :
>> - If the format string is empty, connect a probe without va args.
>> - If the format string is not empty, connect a "stage 1" probe that takes
>> the va args, starts/ends the va_list and calls _one_ function (let's
>> call it "stage 2" probe), that takes va_list as parameter.
>> - if more than 1 probe is installed :
>> - The stage 1 probe creates the va_list and passes it to each function
>> connected, iterated with an RCU list.
>>
>> What do you think ?
Your proposal sounds reasonable to me. How would marker_arm(), marker_disarm() and marker_probe_unregister() change? They'll need to work on a per probe handler basis, rather than per marker. They'll need to know the marker name *and* the specific handler, or perhaps just the handler if you keep a master list of all handlers. In any case, the interface will need to change.
>>
>> Mathieu
>>
>
> I'm working on an implementation.
Great! When you need reviewers/testers let me know.
I'm copying this to the SystemTap list. Multiple markers is a "must have" feature for SystemTap.
Thanks,
Mike
>
>>> Thanks,
>>> Mike
>> --
>> Mathieu Desnoyers
>> Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
>> OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
>
next parent reply other threads:[~2007-11-02 14:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <472A345C.2010208@us.ibm.com>
[not found] ` <20071101221530.GC19700@Krystal>
[not found] ` <20071102033654.GA1301@Krystal>
2007-11-02 14:12 ` Mike Mason [this message]
2007-11-02 16:42 ` Mathieu Desnoyers
2007-11-04 23:24 ` [to-be-posted-soon] " Mathieu Desnoyers
2007-11-05 22:47 ` Mike Mason
2007-11-05 23:17 ` Mathieu Desnoyers
2007-11-06 22:37 ` Mike Mason
2007-11-07 16:55 ` Mathieu Desnoyers
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=472B3001.3000509@us.ibm.com \
--to=mmlnx@us.ibm.com \
--cc=compudj@krystal.dyndns.org \
--cc=ltt-dev@shafik.org \
--cc=systemtap@sources.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).