Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1623134

Re: [PATCH v5] Allow user probes on versioned symbols.

From Paul Clarke <pc@us.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v5] Allow user probes on versioned symbols.
Date 2017-04-13 17:50 +0200
Message-ID <tvPap-4WE-15@gated-at.bofh.it> (permalink)
References <tvrKO-5EQ-27@gated-at.bofh.it> <tvCGd-4M2-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v5] Allow user probes on versioned symbols. Paul Clarke <pc@us.ibm.com> - 2017-04-12 16:50 +0200
  Re: [PATCH v5] Allow user probes on versioned symbols. Masami Hiramatsu <mhiramat@kernel.org> - 2017-04-13 04:30 +0200
    Re: [PATCH v5] Allow user probes on versioned symbols. Paul Clarke <pc@us.ibm.com> - 2017-04-13 17:50 +0200
      Re: [PATCH v5] Allow user probes on versioned symbols. Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-13 20:20 +0200

csiph-web