Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752516AbcJJN1j (ORCPT ); Mon, 10 Oct 2016 09:27:39 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:54696 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752002AbcJJN0V (ORCPT ); Mon, 10 Oct 2016 09:26:21 -0400 Subject: Re: [PATCH v7 1/6] perf annotate: Add cross arch annotate support To: Arnaldo Carvalho de Melo References: <1474472876-2706-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com> <1474472876-2706-2-git-send-email-ravi.bangoria@linux.vnet.ibm.com> <20161005111928.GQ7143@kernel.org> Cc: linux-kernel@vger.kernel.org, kim.phillips@arm.com, linuxppc-dev@lists.ozlabs.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, treeze.taeung@gmail.com, naveen.n.rao@linux.vnet.ibm.com, markus@trippelsdorf.de, namhyung@kernel.org, pawel.moll@arm.com, chris.ryder@arm.com, jolsa@kernel.org, mhiramat@kernel.org, Ravi Bangoria From: Ravi Bangoria Date: Mon, 10 Oct 2016 18:56:06 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20161005111928.GQ7143@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16101013-0056-0000-0000-0000019582FE X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005886; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000186; SDB=6.00766458; UDB=6.00366594; IPR=6.00542581; BA=6.00004799; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00012934; XFM=3.00000011; UTC=2016-10-10 13:26:18 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16101013-0057-0000-0000-000005C8A1FE Message-Id: <57FB96EE.3040407@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-10-10_07:,, 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-1609300000 definitions=main-1610100226 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1406 Lines: 44 Hi Arnaldo, Sorry for little late replies, I was off last week. Please find my comments. On Wednesday 05 October 2016 04:49 PM, Arnaldo Carvalho de Melo wrote: > Em Wed, Sep 21, 2016 at 09:17:51PM +0530, Ravi Bangoria escreveu: >> Change current data structures and function to enable cross arch >> annotate. >> >> Current perf implementation does not support cross arch annotate. >> To make it truly cross arch, instruction table of all arch should >> be present in perf binary. And use appropriate table based on arch >> where perf.data was recorded. ... >> tok = strchr(name, '>'); >> if (tok == NULL) >> @@ -252,16 +253,12 @@ static int mov__parse(struct ins_operands *ops, struct map *map __maybe_unused) >> return -1; >> >> target = ++s; >> -#ifdef __arm__ >> + >> comment = strchr(s, ';'); >> -#else >> - comment = strchr(s, '#'); >> -#endif >> + if (comment == NULL) >> + comment = strchr(s, '#'); >> >> - if (comment != NULL) >> - s = comment - 1; >> - else >> - s = strchr(s, '\0') - 1; >> + s = (comment != NULL) ? comment - 1 : strchr(s, '\0') - 1; > Why have you touched the above 4 lines? The code you provided is > equivalent, i.e. has no value for this patch you're working on, just a > distraction for reviewers, please don't do that. Sorry about that. I did this change to make code more compact but yes, you are right, that should be done as separate patch. -Ravi