Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2457853imd; Fri, 2 Nov 2018 11:44:42 -0700 (PDT) X-Google-Smtp-Source: AJdET5dHFmLPkgCG18zkK6Emzi7C5tfqNJXGUWAsqUfCjW5CNwpHScCGASL/cEw9phpTN809rDh7 X-Received: by 2002:a62:a50d:: with SMTP id v13-v6mr12759803pfm.18.1541184282443; Fri, 02 Nov 2018 11:44:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541184282; cv=none; d=google.com; s=arc-20160816; b=JUtd788bL+3d6VnaluxmwGoLHG/kKf3sN/Dmo4qe+rYXcOAyTC2DBF+VPdfzhUrrqG HH0rdD/TsI9adDJIXcWnqZO0ot+tsEY1/Zo6pt53xHppy5TsApis7AlXSrR/GflDcNok AlpdX39JF5mRGiwhtcz0DSg0QKjn1CNioM6Ok24mtGvZMYtL36y7TTHgzVu8u+6POKq3 kz6qMJQh3RiqOiD7ELpKUayubds8PSenVadlC9QLey2xbka+cF7kEGq8dkaWfcUoJ8TN JbqweZcvNoPVtEKxILeLPNw8jzq9S6W6PHaiQ90CuhJW87nY/0++WsOuewvvqEifDwaQ rxLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZEmQxCJ0UEw8AkEugB1Ot9eFs+m/a7xHbyjJzMhiA70=; b=lpoEj+FVT8rcPxSuvO7+7aLTdVS7HJFQyIVY7awHbBhnJk1iks56QDRDSBUCFEGTKe tVhqMwdi3OTfIhecfcvfTK4nngNJSsgYut0VMSla9kOW4Wdczu2NIUAgjhg7E7NOilbf eKb3D/q/box041q8aA5GS0pkFmvF0+04hHtV6mDG+tH1aPNouPlTkJJl4g1Y1xdROfwK SVcJm439ne0NWmiVsSldlPGBehQgoGdVd7vxLY+QMnpDVHrmCG+JfT4Q0FN6Blwjcfb+ 8GpUprdTkUY7NzS5vVPV8VhtLs9H5LRnd2Fmu8/qWY+3im9yAIfC6vqQ9JX6Qm19Mv6Z V/4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="T9e/T0C8"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3si7333360pgc.587.2018.11.02.11.44.27; Fri, 02 Nov 2018 11:44:42 -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="T9e/T0C8"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729762AbeKCDuY (ORCPT + 99 others); Fri, 2 Nov 2018 23:50:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:45428 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728835AbeKCDuX (ORCPT ); Fri, 2 Nov 2018 23:50:23 -0400 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 AAF372084A; Fri, 2 Nov 2018 18:42:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541184131; bh=BwNyHN4xoBSIxu3iWcLvn1UyotRuMpRFiNKV9l0oon4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T9e/T0C87ZS2YsVqDglJ60KwbJad5+H1C0nvUN7JdPJ/nf1wy4pxbm3J1ZN8p3b4Q aXmF4BK3WbeIMGyRaB0YZeP5jHxG4Qqo0mg06LJ6rhUbqrw/Z4fipKknKbaMywLui7 PIvxdbzwvrLzNX4kvJbwJylqkvHKiCXqQJvP2/RQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Milian Wolff , Jiri Olsa , Ravi Bangoria , Arnaldo Carvalho de Melo , Jin Yao , Namhyung Kim , Sandipan Das , Sasha Levin Subject: [PATCH 4.18 082/150] perf record: Use unmapped IP for inline callchain cursors Date: Fri, 2 Nov 2018 19:34:04 +0100 Message-Id: <20181102182909.253117047@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181102182902.250560510@linuxfoundation.org> References: <20181102182902.250560510@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 7a8a8fcf7b860e4b2d4edc787c844d41cad9dfcf ] Only use the mapped IP to find inline frames, but keep using the unmapped IP for the callchain cursor. This ensures we properly show the unmapped IP when displaying a frame we received via the dso__parse_addr_inlines API for a module which does not contain sufficient debug symbols to show the srcline. This is another follow-up to commit 19610184693c ("perf script: Show virtual addresses instead of offsets"). Signed-off-by: Milian Wolff Acked-by: Jiri Olsa Tested-by: Ravi Bangoria Tested-by: Arnaldo Carvalho de Melo Cc: Jin Yao Cc: Namhyung Kim Cc: Sandipan Das Fixes: 19610184693c ("perf script: Show virtual addresses instead of offsets") Link: http://lkml.kernel.org/r/20180926135207.30263-2-milian.wolff@kdab.com Link: http://lkml.kernel.org/r/20181002073949.3297-1-milian.wolff@kdab.com [ Squashed a fix from Milian for a problem reported by Ravi, fixed up space damage ] Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/util/machine.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index d49744dc46d7..b70cce40ca97 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -2246,7 +2246,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) { -- 2.17.1