Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756658AbdDHAw5 (ORCPT ); Fri, 7 Apr 2017 20:52:57 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:33084 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755261AbdDHAwh (ORCPT ); Fri, 7 Apr 2017 20:52:37 -0400 From: Taeung Song To: Arnaldo Carvalho de Melo Cc: linux-kernel@vger.kernel.org, Taeung Song , Andi Kleen , Jiri Olsa , Namhyung Kim Subject: [PATCH v2 2/5] perf annotate: Use stripped line instead of raw disassemble line Date: Sat, 8 Apr 2017 09:52:25 +0900 Message-Id: <1491612748-1605-3-git-send-email-treeze.taeung@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491612748-1605-1-git-send-email-treeze.taeung@gmail.com> References: <1491612748-1605-1-git-send-email-treeze.taeung@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 937 Lines: 28 When parsing disassemble lines for source line number, use a stripped line instead of raw line. Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Taeung Song --- tools/perf/util/annotate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 5c9669f..9fdf263 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -1151,8 +1151,8 @@ static int symbol__parse_objdump_line(struct symbol *sym, struct map *map, parsed_line = rtrim(line); /* /filename:linenr ? Save line number and ignore. */ - if (regexec(&file_lineno, line, 2, match, 0) == 0) { - *line_nr = atoi(line + match[1].rm_so); + if (regexec(&file_lineno, parsed_line, 2, match, 0) == 0) { + *line_nr = atoi(parsed_line + match[1].rm_so); return 0; } -- 2.7.4