From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753604AbdDMPlB (ORCPT ); Thu, 13 Apr 2017 11:41:01 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:53379 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751657AbdDMPk7 (ORCPT ); Thu, 13 Apr 2017 11:40:59 -0400 Reply-To: pc@us.ibm.com Subject: Re: [PATCH v5] Allow user probes on versioned symbols. References: <967814e0-0d5a-4970-38d8-04d7dae9d5b1@us.ibm.com> <20170413112020.8c98e0a082ad821a43d968c3@kernel.org> To: Masami Hiramatsu Cc: LKML , Arnaldo Carvalho de Melo , David Ahern , "linux-perf-users@vger.kernel.org" From: Paul Clarke Date: Thu, 13 Apr 2017 10:40:50 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170413112020.8c98e0a082ad821a43d968c3@kernel.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17041315-0044-0000-0000-00000304B082 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006929; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000208; SDB=6.00847044; UDB=6.00417872; IPR=6.00625477; BA=6.00005288; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00015033; XFM=3.00000013; UTC=2017-04-13 15:40:58 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17041315-0045-0000-0000-00000732B496 Message-Id: <58e0c059-5f7f-b763-4e97-c0f785dfdb69@us.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-13_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1704130133 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/12/2017 09:20 PM, Masami Hiramatsu wrote: > On Wed, 12 Apr 2017 09:41:51 -0500 > Paul Clarke 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