Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp3683139imd; Mon, 29 Oct 2018 10:41:28 -0700 (PDT) X-Google-Smtp-Source: AJdET5cR36sbeqae1thwSiaVPflS4JcUYDaI4CNIL2aA5M98EPzIKoDXo7MjnXmbW15huwLtzdb+ X-Received: by 2002:a17:902:b08a:: with SMTP id p10-v6mr15336458plr.26.1540834888533; Mon, 29 Oct 2018 10:41:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540834888; cv=none; d=google.com; s=arc-20160816; b=lApjS4vR+V78QIaJsMx3dNK8G6ZoWPjRW12UqhynWDV+fMcCvrHjSUlDQ29y/pH+5t YnUlhvKIZrT45wDpDBajhBkRgw4rNqT8kvvfZtNIr7WV8WRUdhRCB6DtGGzRgBCByAoW a6L7R3chawSY0jrqe/n6HgZyzcBjp14Wt/Q+kcj/9txXXjTTXBBOiBvrGM8WhJP99Ob2 1AQjABSEo2/weYmsWFVHyNNFUzqtSndxaAvN5TUqbOH35lszof/Hv72imwlD9+wKyEG/ SuJLm6ra71dCVwxeaL4hl1FnRsVkbjjjTypSurG9HjkwXuqB6zO/3hyGFgY5QipmvoCp zrxw== 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=i811HAqGBY73MJG018PhIHJ6BR7EeiQU+pGKJHdMRWQ=; b=IJOWakHea/9AAYQaovmc5Xsrh/80PHOSFLQ6o6VHfoEav7ns/XDx1lE0dNVtPwlVd+ oMNc3NejVJ0q+kTNN4lpaLPaFUFQbH5DNBq3up1wM61UindHX0zSEFAMo1oHtGJeyz28 me+c7vjnYkTa+uHzA8q21Rnump5ijUg5q4SWm2IxTBWHuPn5e5D+ovUGFE/bwTqUle6z LuAD3Ty+Qlnpbu7sMWbZJgnr3W7eIICCpsMmUz/hKePBNccheVV+RkRCLsKaB8dUNKg4 jUwGB0KNvEDWNLrNebwEfevQJaYnfK7FFpzfdarIWQNaPPvHZ/eO0oB+ngoa+Pm0uDdc Nihg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KplcaCOE; 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 k9-v6si20618292plt.144.2018.10.29.10.41.13; Mon, 29 Oct 2018 10:41:28 -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=KplcaCOE; 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 S1727963AbeJ3C3y (ORCPT + 99 others); Mon, 29 Oct 2018 22:29:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:37846 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727808AbeJ3C3y (ORCPT ); Mon, 29 Oct 2018 22:29:54 -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 A947A2082D; Mon, 29 Oct 2018 17:40:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540834817; bh=5Gk4TWeIstkbQbvCjVdBzGY3LMGB3js6Pqpg3WIVaSg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KplcaCOE6HNbiCgklwWRoIulQSiM8sEJ0CAj7k/p2cP++hwTtvY6YMBQPVcePCipV 7sl5mSEvVT0IjYh39iuh0IDBCePOZSkmL/ybf7ifht3uV9l3HaKiHy1cT6X4RsYkOg MxmrgTLxiJOjnoqRMfknVSd4KASSx4z5WHcO+4kE= Received: by jouet.infradead.org (Postfix, from userid 1000) id 366D5142C5F; Mon, 29 Oct 2018 14:40:14 -0300 (-03) Date: Mon, 29 Oct 2018 14:40:14 -0300 From: Arnaldo Carvalho de Melo To: Milian Wolff 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 Message-ID: <20181029174014.GG21857@kernel.org> References: <20181029141644.3907-1-milian.wolff@kdab.com> <3361238.noN1Jb7VD2@milian-kdab2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3361238.noN1Jb7VD2@milian-kdab2> 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 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? Or are you saying that that "unclear" part applies to both libunwind and elfutils? - Arnaldo