Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp496519imm; Fri, 5 Oct 2018 07:13:06 -0700 (PDT) X-Google-Smtp-Source: ACcGV63MOxeaxGK79DijZf0tHy8hUIT02WcVL+Wv7OFDrtfpgmy/Ej9CblgSTEbcOik+4sjIvmVn X-Received: by 2002:a62:7a81:: with SMTP id v123-v6mr12357568pfc.240.1538748786787; Fri, 05 Oct 2018 07:13:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538748786; cv=none; d=google.com; s=arc-20160816; b=n9ySItyJZJ95KXJTPeKVcKiW67grxMlhNV7CAY9Htgqa99th+jeP/wys1wM+d1ryVt Rmy9j5Xn+pbAvnTwVVXcpxlC5pJnbhE/G9O2SqqVEuYyXNdI4FI+m3z5Uc5Gxkcacn3Q cX1k8IodHa5VqzvBlOGwpSmdf/sXImM42RnyUD555nFyOq6SBObd60oJidFFG0Vjpt0T dPxOL+rHZxxtfrld0otTmK9PHno1IKD80b05JX9ND6yvP6MIF4z6DMv7D3LqjJdbAsg5 U1hONYksqtmVsWT/BdHiA8jJJAzTFNLhlI9UKeem3mqfTGq0SzxWTGVHCAzd0YuJoDui WkDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=cyAV3TXMBiWKnMuZE2lmOYopiW3ZXWuAnbyshuhLMrE=; b=T0XBNLnzyAa/GRlColi1YHoZJTE5bcvo6Thj4EaoSQsipsyjD9YyaUmO+ZC+z8+FyD rrkDvzwScbK3L1AJm1TGts4UTv9UZz6OqcVmnQBLZ6rtlayQW6BbWkbbCwgaAAJV61c9 4SfTMDQByOThKV2GlwHRzhNAMw9EYOuCuesIlsXC51WLkTvtbIWykLQta0gUQjSCafIw wuIoximr1PO7f/udIsv7pAdguopzDe67feU4LYXzUQle49VCk1Uq2d60G9tkusyeeXfW cI4FQBD587aC551Kvxk3xKv2lF/jqvhlleQLlzdGJbkzhmJgNKlU7O46fLL1GK263N3C UUvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0yWdiVgR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12-v6si1025747pfi.184.2018.10.05.07.12.51; Fri, 05 Oct 2018 07:13:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0yWdiVgR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728666AbeJEVKH (ORCPT + 99 others); Fri, 5 Oct 2018 17:10:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:46328 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727581AbeJEVKH (ORCPT ); Fri, 5 Oct 2018 17:10:07 -0400 Received: from jouet.infradead.org (unknown [179.97.41.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 713B220834; Fri, 5 Oct 2018 14:11:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1538748673; bh=/gYQ3YBKLjsSJyrjHav6MmYheGFP3uG6ISRqlwHq5/4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=0yWdiVgRVGqsauZ+N8k14l6GgwLixuMIhYyG/yljepdNcP4DlTPzfvQGwTduWUPaJ ozqBl59T9jfZHRkN/QebiVdvSkYLQkAVPZWC/H/KLXlJIPP+YSvKqP4kCIeBjNU3Ib ElMey6qwgbjgrNtZA3DKQ+DvyQgnwgKiEPRXRGOU= Received: by jouet.infradead.org (Postfix, from userid 1000) id 1FE76141DDC; Fri, 5 Oct 2018 11:11:10 -0300 (-03) Date: Fri, 5 Oct 2018 11:11:10 -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 Subject: Re: [PATCH] perf record: use unmapped IP for inline callchain cursors Message-ID: <20181005141110.GB20250@kernel.org> References: <20181002073949.3297-1-milian.wolff@kdab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181002073949.3297-1-milian.wolff@kdab.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Oct 02, 2018 at 09:39:49AM +0200, Milian Wolff escreveu: > Signed-off-by: Milian Wolff > Cc: Arnaldo Carvalho de Melo > Reported-by: Ravi Bangoria > # Tested-by: > # Reviewed-by: > # Suggested-b: > Fixes: bfe16b0653 ("perf report: Don't crash on invalid inline debug information") No, the patch that Ravi pointed out as causing the regression wasn't the one above, it was this one: "perf report: Use the offset address to find inline frames" I'm reworking this again... - Arnaldo > --- > tools/perf/util/machine.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c > index 73a651f10a0f..111ae858cbcb 100644 > --- a/tools/perf/util/machine.c > +++ b/tools/perf/util/machine.c > @@ -2286,7 +2286,8 @@ static int append_inlines(struct callchain_cursor *cursor, > if (!symbol_conf.inline_name || !map || !sym) > return ret; > > - addr = map__rip_2objdump(map, ip); > + addr = map__map_ip(map, ip); > + addr = map__rip_2objdump(map, addr); > > inline_node = inlines__tree_find(&map->dso->inlined_nodes, addr); > if (!inline_node) { > @@ -2317,6 +2318,9 @@ static int unwind_entry(struct unwind_entry *entry, void *arg) > if (symbol_conf.hide_unresolved && entry->sym == NULL) > return 0; > > + if (append_inlines(cursor, entry->map, entry->sym, entry->ip) == 0) > + return 0; > + > /* > * Convert entry->ip from a virtual address to an offset in > * its corresponding binary. > @@ -2324,9 +2328,6 @@ static int unwind_entry(struct unwind_entry *entry, void *arg) > if (entry->map) > addr = map__map_ip(entry->map, entry->ip); > > - if (append_inlines(cursor, entry->map, entry->sym, addr) == 0) > - return 0; > - > srcline = callchain_srcline(entry->map, entry->sym, addr); > return callchain_cursor_append(cursor, entry->ip, > entry->map, entry->sym, > -- > 2.19.0