From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758143AbdJMN2o (ORCPT ); Fri, 13 Oct 2017 09:28:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:37278 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753354AbdJMN2m (ORCPT ); Fri, 13 Oct 2017 09:28:42 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 075F121876 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org Date: Fri, 13 Oct 2017 10:28:37 -0300 From: Arnaldo Carvalho de Melo To: Milian Wolff Cc: jolsa@kernel.org, Jin Yao , Linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo , David Ahern , Namhyung Kim , Peter Zijlstra Subject: Re: [PATCH v5 09/16] perf report: compare symbol name for inlined frames when matching Message-ID: <20171013132837.GM3503@kernel.org> References: <20171009203310.17362-1-milian.wolff@kdab.com> <20171009203310.17362-10-milian.wolff@kdab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171009203310.17362-10-milian.wolff@kdab.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Oct 09, 2017 at 10:33:03PM +0200, Milian Wolff escreveu: > +++ b/tools/perf/util/callchain.c > @@ -670,11 +670,11 @@ static enum match_result match_chain(struct callchain_cursor_node *node, > struct callchain_list *cnode) > { > struct symbol *sym = node->sym; > + enum match_result match; > u64 left, right; > > if (callchain_param.key == CCKEY_SRCLINE) { > - enum match_result match = match_chain_strings(cnode->srcline, > - node->srcline); > + match = match_chain_strings(cnode->srcline, node->srcline); > > /* if no srcline is available, fallback to symbol name */ > if (match == MATCH_ERROR && cnode->ms.sym && node->sym) the above one is unnecessary, as match_result is, at this time, only used inide that CCKEY_SRCLINE if branch, so I left it out. > @@ -688,6 +688,13 @@ static enum match_result match_chain(struct callchain_cursor_node *node, > } > > if (cnode->ms.sym && sym && callchain_param.key == CCKEY_FUNCTION) { > + /* compare inlined frames based on their symbol name because > + * different inlined frames will have the same symbol start > + */ > + if (cnode->ms.sym->inlined || node->sym->inlined) > + return match_chain_strings(cnode->ms.sym->name, > + node->sym->name); > + And this clashed with a change by Ravi Bangoria, which I fixed up: [acme@jouet linux]$ git log -1 --oneline c1fbc0cf81f1c464f5fda322c1104d4bb1da6711 c1fbc0cf81f1 (tag: perf-urgent-for-mingo-4.14-20171005) perf callchain: Compare dsos (as well) for CCKEY_FUNCTION [acme@jouet linux]$ Continuing... > left = cnode->ms.sym->start; > right = sym->start; > } else { > -- > 2.14.2