From: Simon Marchi <simark@simark.ca>
To: Sergio Durigan Junior <sergiodj@redhat.com>,
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 03:25:00 -0000 [thread overview]
Message-ID: <668ed4e4-c53c-2658-5205-41c57a3e768e@simark.ca> (raw)
In-Reply-To: <457199c5-ba70-d26b-7fcb-9471ad5c9d11@simark.ca>
Damn, I hit send too soon... here's review part 2. Actually, there's
wasn't much left.
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.
>> -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?
Thanks!
Simon
next prev parent reply other threads:[~2017-11-15 3:25 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 2/3] Convert SystemTap probe interface " 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-13 17:59 ` [PATCH 1/3] Convert generic " Sergio Durigan Junior
2017-11-15 2:52 ` Simon Marchi
2017-11-15 3:25 ` Simon Marchi [this message]
2017-11-15 6:15 ` Sergio Durigan Junior
2017-11-15 6:12 ` 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 2/3] Convert SystemTap 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 3/3] Convert DTrace " 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=668ed4e4-c53c-2658-5205-41c57a3e768e@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=sergiodj@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