From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Simon Marchi <simark@simark.ca>
Cc: GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 1/3] Convert generic probe interface to C++ (and perform some cleanups)
Date: Wed, 15 Nov 2017 06:15:00 -0000 [thread overview]
Message-ID: <877eus5aq4.fsf@redhat.com> (raw)
In-Reply-To: <668ed4e4-c53c-2658-5205-41c57a3e768e@simark.ca> (Simon Marchi's message of "Tue, 14 Nov 2017 22:25:52 -0500")
On Tuesday, November 14 2017, Simon Marchi wrote:
> Damn, I hit send too soon... here's review part 2. Actually, there's
> wasn't much left.
Thanks.
> On 2017-11-14 09:52 PM, Simon Marchi wrote:
>> On 2017-11-13 12:58 PM, Sergio Durigan Junior wrote:
>>> This patch converts the generic probe interface (gdb/probe.[ch]) to
>>> C++, and also performs some cleanups that were on my TODO list for a
>>> while.
>>>
>>> The main changes were the conversion of 'struct probe' to 'class
>>> probe', and 'struct probe_ops' to 'class static_probe_ops'. The
>>> former now contains all the "dynamic", generic methods that act on a
>>> probe + the generic data related to it; the latter encapsulates a
>>> bunch of "static" methods that relate to the probe type, but not to a
>>> specific probe itself.
>>
>> Personally I'm fine with this. Maybe there would be a better C++-ish
>> design, but I'm not very good at that. If others have suggestions, I'd
>> like to hear them.
>
> Given your description, I think "class probe_type" would be a good name
> instead of static_probe_ops.
You know, "class probe_type" was one of the many names that crossed my
mind. I didn't like it because it doesn't convey the meaning that I
want here, which is that this class is "generic". I still think
"static_probe_ops" is a better fit.
>>> -extern const struct probe_ops probe_ops_any;
>>> + /* Return true if the probe can be enabled; false otherwise. */
>>> + virtual bool can_enable () const
>>> + {
>>> + return false;
>>> + }
>
> Should this be in the static_probe_ops? Is the fact that a probe can be
> enabled/disabled a property of the probe, or the probe type?
You're right, it should be on static_probe_ops indeed. I'll move it
there.
Thanks,
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/
next prev parent reply other threads:[~2017-11-15 6:15 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-13 17:59 [PATCH 0/3] Convert probe interfaces " Sergio Durigan Junior
2017-11-13 17:59 ` [PATCH 1/3] Convert generic probe interface " Sergio Durigan Junior
2017-11-15 2:52 ` Simon Marchi
2017-11-15 3:25 ` Simon Marchi
2017-11-15 6:15 ` Sergio Durigan Junior [this message]
2017-11-15 6:12 ` Sergio Durigan Junior
2017-11-13 17:59 ` [PATCH 2/3] Convert SystemTap " Sergio Durigan Junior
2017-11-15 3:58 ` Simon Marchi
2017-11-15 22:49 ` Sergio Durigan Junior
2017-11-13 17:59 ` [PATCH 3/3] Convert DTrace " Sergio Durigan Junior
2017-11-15 4:40 ` Simon Marchi
2017-11-16 4:11 ` Sergio Durigan Junior
2017-11-16 4:37 ` [PATCH v2 0/3] Convert probe interfaces " Sergio Durigan Junior
2017-11-16 4:38 ` [PATCH v2 3/3] Convert DTrace probe interface " Sergio Durigan Junior
2017-11-16 4:38 ` [PATCH v2 1/3] Convert generic " Sergio Durigan Junior
2017-11-22 20:39 ` Simon Marchi
2017-11-22 22:36 ` Sergio Durigan Junior
2017-11-23 0:01 ` Simon Marchi
2017-11-23 0:15 ` Sergio Durigan Junior
2017-11-23 0:33 ` Sergio Durigan Junior
2017-11-16 4:38 ` [PATCH v2 2/3] Convert SystemTap " Sergio Durigan Junior
2017-11-21 16:25 ` [PATCH v2 0/3] Convert probe interfaces " Sergio Durigan Junior
-- strict thread matches above, loose matches on Subject: below --
2017-11-13 17:53 [PATCH " Sergio Durigan Junior
2017-11-13 17:53 ` [PATCH 1/3] Convert generic probe interface " 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=877eus5aq4.fsf@redhat.com \
--to=sergiodj@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
/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