All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Clarke <pc@us.ibm.com>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	David Ahern <dsahern@gmail.com>,
	"linux-perf-users@vger.kernel.org"
	<linux-perf-users@vger.kernel.org>
Subject: Re: [PATCH v5] Allow user probes on versioned symbols.
Date: Thu, 13 Apr 2017 10:40:50 -0500	[thread overview]
Message-ID: <58e0c059-5f7f-b763-4e97-c0f785dfdb69@us.ibm.com> (raw)
In-Reply-To: <20170413112020.8c98e0a082ad821a43d968c3@kernel.org>

On 04/12/2017 09:20 PM, Masami Hiramatsu wrote:
> On Wed, 12 Apr 2017 09:41:51 -0500
> Paul Clarke <pc@us.ibm.com> wrote:
>>   static struct symbol *symbols__find_by_name(struct rb_root *symbols,
>> -					    const char *name)
>> +					    const char *name,
>> +					    unsigned int includes)
>
> Here, you might miss replacing this 'unsigned int' with enum.
> (actually, enum is equal to int, not unsigned int)

(Ugh.) My bad. Will fix.

>> +enum symbols_tag_includes {
>> +	SYMBOLS_TAG__INCLUDE_NONE,
>> +	SYMBOLS_TAG__INCLUDE_DEFAULT_ONLY
>> +};
>
> BTW, would we need such 's' for plural and third person singular for type name?
> And also, you should use enum type name for prefix so that other developers
> easily find the definition of enumeration, e.g.
>
> enum symbol_tag_include {
> 	SYMBOL_TAG_INCLUDE__NONE = 0,
> 	SYMBOL_TAG_INCLUDE__DEFAULT_ONLY
> };

I was thinking the top-level namespace would be "symbols", because we are not necessarily working with a single symbol.  Secondary namespace would be "tag", since this enum is very specific to tags.  Then, the actions are whether to "include none (of tagged symbols)" or "include only symbols tagged as default".

I'm fine with your suggestion, though, and will submit a new patch incorporating that soon.

Regards,
PC

  reply	other threads:[~2017-04-13 15:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-12 14:41 [PATCH v5] Allow user probes on versioned symbols Paul Clarke
2017-04-13  2:20 ` Masami Hiramatsu
2017-04-13 15:40   ` Paul Clarke [this message]
2017-04-13 18:11     ` Arnaldo Carvalho de Melo

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=58e0c059-5f7f-b763-4e97-c0f785dfdb69@us.ibm.com \
    --to=pc@us.ibm.com \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.