From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933333AbdCaTi7 (ORCPT ); Fri, 31 Mar 2017 15:38:59 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41968 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932356AbdCaTi5 (ORCPT ); Fri, 31 Mar 2017 15:38:57 -0400 Reply-To: pc@us.ibm.com Subject: Re: [PATCH v3] Allow user probes on versioned symbols References: <20170331173123.GA18286@kernel.org> To: Arnaldo Carvalho de Melo Cc: LKML , Masami Hiramatsu , David Ahern , linux-perf-users From: Paul Clarke Date: Fri, 31 Mar 2017 14:38:11 -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: <20170331173123.GA18286@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17033119-0004-0000-0000-000011E205DB X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006875; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000207; SDB=6.00841332; UDB=6.00414232; IPR=6.00619396; BA=6.00005249; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00014874; XFM=3.00000013; UTC=2017-03-31 19:38:55 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17033119-0005-0000-0000-00007E43D982 Message-Id: <095e1578-81c6-c62a-007f-1238445406a1@us.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-31_16:,, 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-1703310181 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/31/2017 12:31 PM, Arnaldo Carvalho de Melo wrote: > Em Fri, Mar 31, 2017 at 11:06:16AM -0500, Paul Clarke escreveu: >> Symbol versioning, as in glibc, results in symbols being defined as: >> @[@] >> (Note that "@@" identifies a default symbol, if the symbol name >> is repeated.) >> >> perf is currently unable to deal with this, and is unable to create >> user probes at such symbols: > > On top of what tree/branch should I try to apply this? I worked from torvalds/linux. > Trying on acme/perf/core: Pardon my ignorance, but where can I find that tree? > [acme@jouet linux]$ patch -p1 < /wb/1.patch > patching file tools/perf/util/auxtrace.c > Hunk #1 FAILED at 1875. [...] > Apart from that, you are not checking the return of strndup, that > however unlikely, can fail, so must be checked. It's in the middle of strcmp-type function, so all return values are valid. Shall I emit a message and call exit()? > On the style front you sometimes add a space after commas, sometimes > not, please make sure you add one. Ack. > But apart from those problems, I think that one should be able to ask > for a versioned symbol, to probe just apps using that specific version, I agree, but wasn't trying to tackle that at the moment. I can look into it, though. > for instance, we should consider the whole name as two functions, which > in fact, they are, no? I'm not sure I understand what you mean here. Do you mean we should set a probe at every version of a given symbol name? For example, if there are symbols: a@@V2 a@V1.1 a@V1 ...for a request to set a probe at "a", we'd actually set a probe at all 3? > Additionaly, I can't reproduce your problem here, on x86_64: I just cloned from acme/linux, and will rebase to there, if that's the best tree. PC