From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb@sourceware.org
Subject: Modify stap-probe.h to identify SystemTap probes
Date: Sat, 05 May 2012 06:42:00 -0000 [thread overview]
Message-ID: <m3r4uzqgcy.fsf_-_@redhat.com> (raw)
In-Reply-To: <20120505062315.GA7458@host2.jankratochvil.net> (Jan Kratochvil's message of "Sat, 5 May 2012 08:23:15 +0200")
[Moving to @gdb...]
On Saturday, May 05 2012, Jan Kratochvil wrote:
> On Sat, 05 May 2012 08:10:55 +0200, Sergio Durigan Junior wrote:
>> On Saturday, May 05 2012, Jan Kratochvil wrote:
>> > There is that
>> > gdb_assert (probe_generic->pops == &stap_probe_ops);
>> >
>> > for this purpose.
>>
>> Which can only be used inside stap-probe.c.
>
> Why? stap_probe_ops can be made extern-public in stap-probe.h if there is now
> a need for it.
Which is equivalent to create the method that I propose, that would only
validate a probe according to its ->probe_ops field, right?
TBH, I think it's more clear to declare a method responsible for this
"validation" instead of exporting stap_probe_ops to the public.
> But in general there should never be such backend-specific conditional, the
> virtualization makes no sense in such case at all.
I don't think such conditional would invalidate the virtualization we
made. Sometimes it is necessary to know which probe we have, for
example in the case of exception/longjmp probes, which require SystemTap
specific probes. Today, those cases are implemented because (a) we only
support stap probes, so there's no way we would catch another probe type
when filtering, and (b) because glibc/libgcc only have SystemTap
probes. But it would be more correct if we checked the type of the
probe(s) extracted from those objfiles to make sure we're dealing with
SystemTap probes, and not with another probe type.
> If the current probe.h interface is insufficient then it should be extended.
I agree, but that's not the case. `probe.h' is sufficient, but it is
not its responsibility to tell if a probe foo is a SystemTap probe. I
see that it is a stap-probe.c-specific task.
Sorry for keep pushing this subject, but I still think we should have a
way of differentiating between probes' types. BTW, I already have a
patch for that, but I won't send it yet because I want to see how this
discussion goes...
Thanks,
--
Sergio
next parent reply other threads:[~2012-05-05 6:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20120504152129.GA7418@redhat.com>
[not found] ` <m37gwrs0m6.fsf@redhat.com>
[not found] ` <20120505060312.GA7019@host2.jankratochvil.net>
[not found] ` <m3vckbqhsg.fsf@redhat.com>
[not found] ` <20120505062315.GA7458@host2.jankratochvil.net>
2012-05-05 6:42 ` Sergio Durigan Junior [this message]
2012-05-05 6:53 ` Jan Kratochvil
2012-05-05 7:05 ` Sergio Durigan Junior
2012-05-05 7:12 ` Jan Kratochvil
2012-05-05 7:21 ` Sergio Durigan Junior
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=m3r4uzqgcy.fsf_-_@redhat.com \
--to=sergiodj@redhat.com \
--cc=gdb@sourceware.org \
--cc=jan.kratochvil@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