Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp5202296imd; Tue, 30 Oct 2018 13:37:41 -0700 (PDT) X-Google-Smtp-Source: AJdET5eMCWyJhDV34atNHsQz/Fl5/xS315jvP3Nd25z8aPIaTVgDaE6oeiiqBBiJYW6qkZYZz6Yv X-Received: by 2002:a62:4681:: with SMTP id o1-v6mr250677pfi.108.1540931861583; Tue, 30 Oct 2018 13:37:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540931861; cv=none; d=google.com; s=arc-20160816; b=S5vLWCMzJ9MhanHiA/mRHGHGhHJNtbOkEK9Fv5REuu0GwP0p9IRI6ZUOU4e3KT5aDX uFJD5dy2+wzoQoFJa/NslKHSyyafsUIkEkHMbnexpYjrGSJVfLED+gGOL4Nb5Bzx/teb W30CUO6Tu0SXQ52OYYJ5SV53pJ7Q9ndFIEMcwcOEmaH0rBSyRWHy0TxBnr3kN2eQPlXd 0AJb7inwdM7xF4nfo6E814OiWgoMNmsooOptH5Srq6eY/7+30xANFR8mA0eMGH98UgI5 hh/1ymq+BgAQ0mif51aGpL96D4tk3xW3wMLKjvFVnoCOmhcGxTthbPVy07vKXunyS3hV KQZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :organization:message-id:date:subject:cc:to:from:dkim-signature; bh=aaXSbHdyxUXrcQM0Jr3PgNtbEvQMj5kOHUYNTS54QH8=; b=XNxpn0do3+hMc961YyddTMAlDimTWBIVSCe0VxWFWZ4CxtUlOIEAQgOdALL23GyYec bcoqGyX1zY1eGrlEJFWqSa9w3/ThSkMBgimuoe32B6xGp5hRbVO8Ck2MsT9yO5eYzW/R Uz281H+ElimAYEXrg0DL2R5ELpXMBihBnz/JfG9nviL99kUF1FK/AnD9XADaC7oqSOuh FpVYHZrBq+ozmNc/Tks1NDMlBRdqKfjAGkx8YaGsdZ6D/7k6zoSxBvDIqQXZ/JDERYmN AN4jkbi0qWBHuA7vXDtRmo/3vpeokcEq2j9Vhtioq689bNm/0NwQeH2ZW/eItJsxnSmv 8oCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kdab.com header.s=dkim header.b=I28CSxfx; 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 w13-v6si24145857plq.198.2018.10.30.13.37.24; Tue, 30 Oct 2018 13:37:41 -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=I28CSxfx; 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 S1727565AbeJaFbu (ORCPT + 99 others); Wed, 31 Oct 2018 01:31:50 -0400 Received: from mail.kdab.com ([176.9.126.58]:9348 "EHLO mail.kdab.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725812AbeJaFbu (ORCPT ); Wed, 31 Oct 2018 01:31:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kdab.com; h= content-type:content-type:mime-version:references:in-reply-to :organization:message-id:date:date:subject:subject:from:from; s= dkim; t=1540931805; x=1541795806; bh=aaXSbHdyxUXrcQM0Jr3PgNtbEvQ Mj5kOHUYNTS54QH8=; b=I28CSxfxD1JWG0KlAdEDdGaAsaMkQSAiaKneeuN2uN0 GDg/kVjkBchxBBo4ZYRqzVKBdZ9baXR9yBdO69wdxAvv8neoeljDMxabpPizlwWp DAxNCgZZylvJjX8lCbEEDPh/W0sPkzHhPy1n8GM1FzN8tr0l61+Ud+gX9/qvoBhE = X-Virus-Scanned: amavisd-new at kdab.com From: Milian Wolff To: Arnaldo Carvalho de Melo Cc: jolsa@kernel.org, Linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH] perf util: take pgoff into account when reporting elf to libdwfl Date: Tue, 30 Oct 2018 21:36:39 +0100 Message-ID: <2799419.aVeE0VMyCs@agathebauer> Organization: KDAB In-Reply-To: <20181029174014.GG21857@kernel.org> References: <20181029141644.3907-1-milian.wolff@kdab.com> <3361238.noN1Jb7VD2@milian-kdab2> <20181029174014.GG21857@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2299280.lfgxnSjn8h"; micalg="sha256"; protocol="application/pkcs7-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --nextPart2299280.lfgxnSjn8h Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" On Montag, 29. Oktober 2018 18:40:14 CET Arnaldo Carvalho de Melo wrote: > Em Mon, Oct 29, 2018 at 04:26:27PM +0100, Milian Wolff escreveu: > > On Monday, October 29, 2018 3:16:44 PM CET Milian Wolff wrote: > > > Libdwfl parses an ELF file itself and creates mappings for the > > > individual sections. Perf on the other hand sees raw mmap events which > > > represent individual sections. When we encounter an address pointing > > > into a mapping with pgoff != 0, we must take that into account and > > > report the file at the non-offset base address. > > > > > This fixes unwinding with libdwfl in some cases. E.g. for a file like: > > > > > > > Note that the backtrace is still stopping too early, when > > > compared to the nice results obtained via libunwind. It's > > > unclear so far what the reason for that is. > > > > The remaining issue is due to a bug in elfutils: > > > > https://sourceware.org/ml/elfutils-devel/2018-q4/msg00089.html > > > > With both patches applied, libunwind and elfutils produce the same output > > for the above scenario. > > I'm updating the patch to remove: > > "It's unclear so far what the reason for that is." > > Adding: > > "See https://sourceware.org/ml/elfutils-devel/2018-q4/msg00089.html for > a patch fixing that." > > Ok? Yes, thanks. I figured the fix for elfutils out after I submitted the perf patch. > Or are you saying that that "unclear" part applies to both libunwind > and elfutils? No, libunwind worked fine without these patches for this specific case. Cheers -- Milian Wolff | milian.wolff@kdab.com | Senior Software Engineer KDAB (Deutschland) GmbH, a KDAB Group company Tel: +49-30-521325470 KDAB - The Qt, C++ and OpenGL Experts --nextPart2299280.lfgxnSjn8h Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Disposition: attachment; filename="smime.p7s" Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCCDEIw ggXmMIIDzqADAgECAhBqm+E4O/8ra58B1dm4p1JWMA0GCSqGSIb3DQEBDAUAMIGFMQswCQYDVQQG EwJHQjEbMBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYD VQQKExFDT01PRE8gQ0EgTGltaXRlZDErMCkGA1UEAxMiQ09NT0RPIFJTQSBDZXJ0aWZpY2F0aW9u IEF1dGhvcml0eTAeFw0xMzAxMTAwMDAwMDBaFw0yODAxMDkyMzU5NTlaMIGXMQswCQYDVQQGEwJH QjEbMBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQK ExFDT01PRE8gQ0EgTGltaXRlZDE9MDsGA1UEAxM0Q09NT0RPIFJTQSBDbGllbnQgQXV0aGVudGlj YXRpb24gYW5kIFNlY3VyZSBFbWFpbCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB AL6znlesKHZ1QBbHOAOY08YYdiFQ8yV5C0y1oNF9Olg+nKcxLqf2NHbZhGra0D00SOTq9bus3/mx gUsg/Wh/eXQ0pnp8tZ8XZWAnlyKMpjL+qUBy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