Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp796567imm; Wed, 26 Sep 2018 07:00:21 -0700 (PDT) X-Google-Smtp-Source: ACcGV61cZVuxDk2cvqt5SBpS7ofmFWMR1/T+W+Fo79Moj33FbD5WTAeUa8qgUKsF88K+kqYXgf21 X-Received: by 2002:a63:9d01:: with SMTP id i1-v6mr5734214pgd.98.1537970421114; Wed, 26 Sep 2018 07:00:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537970421; cv=none; d=google.com; s=arc-20160816; b=yeFWCo2hh4LN012wH1vZTIW1/R1WK+hb5dsUJ4pMbhK42r/z5bTUsnNKJ6UJtvJEKB qQyZY8J6DXD6n57UM8al0dVnmHJLV0DKR+uFV9tYbgKzP84fk091ZJ95kfA5IxDTnJlC bQNkUn75xX/bHHRdILfONGhxkoh6lwVjlEHIW2KV9+e+Are91iE5LKtG0VlBIjfCLojH puQYV+PR1nCmH/YzHxlM+FjYaznd0sbsFfmtsqCUliXSaeAbkMoHNtSYvxLaQbZhj11i 45ljbJr+Ze0nV/p49s4KcTgkeG2nttIG6xj/s0zITq54Mwd/G/ccMy5j+wVoEbAD7ofA FgAg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CKU3sroLg/xVbno9whZqQARK4Pt5xiViU1jOO1D2dq4=; b=TEtA7O3rRtG10SQNl8Yp7+vwMN0q6RUCHn6ioMkrVce2Lux9bgLHpuqNHCosWjDE31 DPGSv1lGcMgW1gRZW/n0VC2SHCwCOwJdefVW6MC4XJJ6QTFpbpu1hVkURoE/LGB9ONNG LF+8AmhlPgb0rv6QE1fXKa27TD24irZqCQSnk7yLfxDjjFqhoPetiowgY43Bltv7ikLl 2+yq6cgzbqxODY/nAI3IUoO9tZQwV9rlO+Ry2UacYrK7jcg5ZlD94SLkWmPBMx+/P0RN q6UjEbPz0wC+l4Tyb5wWti2PH9BzVhrLBYfPcnBmXfD1QlOMAYWjLRoienh5/yYu76A9 dDvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kdab.com header.s=dkim header.b="W44/EnlO"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kdab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 62-v6si5460704plc.96.2018.09.26.07.00.05; Wed, 26 Sep 2018 07:00:21 -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=@kdab.com header.s=dkim header.b="W44/EnlO"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kdab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727613AbeIZULa (ORCPT + 99 others); Wed, 26 Sep 2018 16:11:30 -0400 Received: from mail.kdab.com ([176.9.126.58]:32805 "EHLO mail.kdab.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726915AbeIZULa (ORCPT ); Wed, 26 Sep 2018 16:11:30 -0400 Authentication-Results: mail.kdab.com (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=kdab.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kdab.com; h= content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:date:subject:subject:from:from; s=dkim; t= 1537969946; x=1538833947; bh=CKU3sroLg/xVbno9whZqQARK4Pt5xiViU1j OO1D2dq4=; b=W44/EnlOTy5Re+7Q/GhAoDX81Tf8w898dwqRfmG9/m4K6Z8iA9V IgKzf4rX3iOKp9MnrXDEhHl6+rznTKqwdC2TTPbKiNVRNevNTVqz3cHBiXhuWrUn f+E1yctw1y1Te9FYkZJeGZkdHFr856Ui5yKV1CT4JCyn8qiHBzclYa8U= X-Virus-Scanned: amavisd-new at kdab.com From: Milian Wolff To: acme@kernel.org, jolsa@kernel.org, yao.jin@linux.intel.com, namhyung@kernel.org Cc: Linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Milian Wolff , Sandipan Das Subject: [PATCH 2/3] perf report: use the offset address to find inline frames Date: Wed, 26 Sep 2018 15:52:06 +0200 Message-Id: <20180926135207.30263-2-milian.wolff@kdab.com> In-Reply-To: <20180926135207.30263-1-milian.wolff@kdab.com> References: <20180926135207.30263-1-milian.wolff@kdab.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org To correctly find inlined frames, we have to use the file offset instead of the virtual memory address. This was already fixed for displaying srcline information while displaying in commit 2a9d5050dc84fa20 ("perf script: Show correct offsets for DWARF-based unwinding"). We just need to use the same corrected address also when trying to find inline frames. This is another follow-up to commit 19610184693c ("perf script: Show virtual addresses instead of offsets"). Signed-off-by: Milian Wolff Cc: Sandipan Das Cc: Arnaldo Carvalho de Melo --- tools/perf/util/machine.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index 0cb4f8bf3ca7..73a651f10a0f 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -2317,9 +2317,6 @@ static int unwind_entry(struct unwind_entry *entry,= void *arg) if (symbol_conf.hide_unresolved && entry->sym =3D=3D NULL) return 0; =20 - if (append_inlines(cursor, entry->map, entry->sym, entry->ip) =3D=3D 0) - return 0; - /* * Convert entry->ip from a virtual address to an offset in * its corresponding binary. @@ -2327,6 +2324,9 @@ static int unwind_entry(struct unwind_entry *entry,= void *arg) if (entry->map) addr =3D map__map_ip(entry->map, entry->ip); =20 + if (append_inlines(cursor, entry->map, entry->sym, addr) =3D=3D 0) + return 0; + srcline =3D callchain_srcline(entry->map, entry->sym, addr); return callchain_cursor_append(cursor, entry->ip, entry->map, entry->sym, --=20 2.19.0