Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6296091rdb; Thu, 14 Dec 2023 14:08:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IEQbV0KmpGQ0j6jh/JNp1j7ROIhiqF7SUEwkVWTOyWrEYmICSZtmRNdioAsT0fdmQedime/ X-Received: by 2002:a05:6214:1944:b0:67f:de1:b1a7 with SMTP id q4-20020a056214194400b0067f0de1b1a7mr2129804qvk.78.1702591686649; Thu, 14 Dec 2023 14:08:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702591686; cv=none; d=google.com; s=arc-20160816; b=uJvIJNTICEsSreWi0oERF+K2d5Bz24HgtPm2F90ldCuYzyW4NAzYH/IvTFNrNVAiOh 433takzmaf5UHYvr4D6UBMMTORXMQ6TReh6y9Rqoc91cJrji4UK5NQGg7AvSxlh64C2/ EuwcQRAe4SfKCptTlPkGCxBk3QGdHdv7P6iyCnHu3feph8GpJm9RnXfYErqZMvQrHM2M +h4dGyacK9KMC/INcYmtNp8w5aSuy3jtCvN2/rDmzvUSMVIoWpjQOMCVeXpZsRKtQ5gg sAA08KDpaEFvsHgF4TgcBKrca3Na56veg1kR43mBP8y1RbCrNYWYSqK6cm05AlcBe3GL pgMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=N+z2EeAy25XV5QhADYJ0prwqLrrWN5maZY0w9Y2C9Xo=; fh=7CAfd/GQ/i5xxgTCMQR42jYxjWLEiJTMD98Z8Cc2doE=; b=f8xPe4Ia46fs2N7lbl+nMcd40YI0PLs1NXnvmG3AMtTBAyz7+g9VJtGcvCOPw/aAeA vS5mYMazq3ppOS7xW6rjpg0Z8IJ3BuFqy4QFbRqxs36pc+Mf9FzR/ldjnfdpMwfGpc18 RVBPcLeowlgNd2FmoDmsDiTzkinXGlcZahmwCarcaXL18/wKM12ivILKSBs3YaY4cAYD dideW7xDw/k+2ggm4eo9XzqNQ8BmgcY5SzkMHtvMewTx1cvvvqBC/QnzCaToEZo3oOEY k/h7kJ1I0K6/JU/D/SrjFeIuKm2uvRqPDwDKsNd7zPWNSlHl9J8JvcERLlfOO6NofJwu j1Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rhzCUriS; spf=pass (google.com: domain of linux-kernel+bounces-172-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id w14-20020a05620a424e00b0077dcc7be14esi16934369qko.140.2023.12.14.14.08.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 14:08:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rhzCUriS; spf=pass (google.com: domain of linux-kernel+bounces-172-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 61A9E1C21C12 for ; Thu, 14 Dec 2023 22:08:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 48C3C671FE; Thu, 14 Dec 2023 22:07:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rhzCUriS" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41307671EC; Thu, 14 Dec 2023 22:07:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 725ADC433C8; Thu, 14 Dec 2023 22:07:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702591677; bh=PfvvUQcPkoMq76dDtugLfLFSSY2BCZuxvN2noD+Kfek=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rhzCUriSOEIxbvRYmeccDeFGMavoNL2oMRIXkePkOyWu5ruRL8/EDNG1MX81XhQ8O t5bIuRow/ZcvLrtuEQiFCtKkKWn8Qbq8/q0wz9x1GihfZQb7JTm3e6sbcFGo/iDAnV wu7bXLWsiFGGVHDQv6oKHHXxo79U5jcot/y5fvn1r+i5idDxPDyKUWYV8v52JDnIWm Mub+uVlJNxwIU2Ji9bDRxfgH3KUX3KU+qqfQ1NsorKACFZUJGXydWh7H66nk8oNK3Y 7DfhZEENvzROY8PEm0TXu8CEjL2xwqbIU9mjdjD4wQ4dCuzs5vEmc3Xr9ZQHO7D+Gq 4iMze3mH33ZrA== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id C5307403EF; Thu, 14 Dec 2023 19:07:54 -0300 (-03) Date: Thu, 14 Dec 2023 19:07:54 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Jiri Olsa , Ian Rogers , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, Milian Wolff , Pablo Galindo , Fangrui Song Subject: Re: [PATCH 0/3] perf tools: Random fixes for DWARF unwind Message-ID: References: <20231212070547.612536-1-namhyung@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231212070547.612536-1-namhyung@kernel.org> X-Url: http://acmel.wordpress.com Em Mon, Dec 11, 2023 at 11:05:43PM -0800, Namhyung Kim escreveu: > Hello, > > I've found a couple of issues on the unwind code while I'm playing with > the JIT-dump code for the CPython. The code assumes normal DSOs mapped > from the beginning of the file and aligned to the page size. But it's > not true for the JIT-dumped DSOs which are generated for each function. > > Depending on the JIT implementation, the code address and accompanied > ELF info (like ELF file headers and unwind info) can be overlapped to > adjacent (JIT-dumped) DSOs. So it should take more care when it > calculates the mapping address for the DSO. > > It seems these changes need to go to the stable trees but they are > changed a lot since then so I'm not sure. > Thanks, applied to perf-tools-next. - Arnaldo > > Namhyung Kim (3): > perf genelf: Set ELF program header addresses properly > perf unwind-libdw: Handle JIT-generated DSOs properly > perf unwind-libunwind: Fix base address for .eh_frame > > tools/perf/util/genelf.c | 6 +++--- > tools/perf/util/unwind-libdw.c | 21 +++++++++++++++++---- > tools/perf/util/unwind-libunwind-local.c | 2 +- > 3 files changed, 21 insertions(+), 8 deletions(-) > > -- > 2.43.0.472.g3155946c3a-goog > -- - Arnaldo