From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932868AbdBVQK3 (ORCPT ); Wed, 22 Feb 2017 11:10:29 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:36114 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932456AbdBVQKS (ORCPT ); Wed, 22 Feb 2017 11:10:18 -0500 Subject: Re: [PATCH 1/4] perf annotate: Remove needless regular expression for filename:linenr To: Namhyung Kim References: <1487758103-7953-1-git-send-email-treeze.taeung@gmail.com> <1487758103-7953-2-git-send-email-treeze.taeung@gmail.com> Cc: Arnaldo Carvalho de Melo , "linux-kernel@vger.kernel.org" , Jiri Olsa , Ingo Molnar , Peter Zijlstra , Wang Nan , Masami Hiramatsu , Andi Kleen , Jiri Olsa From: Taeung Song Message-ID: <44325cd5-0392-7745-8160-f0d5053b766f@gmail.com> Date: Thu, 23 Feb 2017 01:00:59 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Namhyung, On 02/22/2017 07:47 PM, Namhyung Kim wrote: > Hi Taeung, > > On Wed, Feb 22, 2017 at 7:08 PM, Taeung Song wrote: >> The commit e592488c01d5 ("perf annotate: Support source line >> numbers in annotate") support source line numbers in annotate. >> >> But we can get filename:line number by symbol__get_source_line() >> Furthermore, the way can't exactly match source code lines >> to actual line numbers. >> >> For example, >> Actual source code is as below >> >> ... >> 21 }; >> 22 >> 23 unsigned int limited_wgt; >> 24 >> 25 unsigned int get_cond_maxprice(int wgt) >> 26 { >> ... >> >> However, the output of annotate with the way about regmatch >> is as below. >> >> 4 Disassembly of section .text: >> >> 6 0000000000400966 : >> 7 get_cond_maxprice(): >> 26 }; >> >> 28 unsigned int limited_wgt; >> >> 30 unsigned int get_cond_maxprice(int wgt) >> 31 { >> >> The root cause is from objdump -S. >> Because the source code of objdump used to print more code lines >> than actual one code line according to a particular line number. >> In the near future, I'll fix the problem about line numbers. > > So what's the purpose of this patch? You just removed the line > number from the output, it changed behavior for what? If you want > to fix a problem of line number, please do it here.. > > Thanks, > Namhyung > > The purpose of this patch was to remove needless code about line number. To avoid big size of commit, I made several patches as parts.. But as you said I also think it is better to remake this patch preferentially centering important points of the patchset! Thanks Taeung