Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4823713rdb; Tue, 12 Dec 2023 10:11:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IGGtcyH3zpGdNI4925/+cEMXedJM8XXajdPYIQC0888v8KVGsrPUGgR69IwMWycrp74r0XF X-Received: by 2002:a17:902:da89:b0:1d0:71db:d427 with SMTP id j9-20020a170902da8900b001d071dbd427mr3563717plx.134.1702404691516; Tue, 12 Dec 2023 10:11:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702404691; cv=none; d=google.com; s=arc-20160816; b=Y2bE1dHfvmp7/QyUvfz9zSO761RSXseHDL+0u0svgq/xO3z76iZPN2KLIXIED/VhZp wKyVjxIZ9qz1VvvsbHsKnsCaQsGO+ULx/feqrOtNvafVFszB12+87qQHjBAQThIqf+Yx yQK+hEpQyF0h3Z0vRi5UsCV7Q2axZHrdGEy9UdqZATjXmqHN+6Ec4aAxHYHHhzrhZJJN eVCVfaxS7M2ZWA3I72LnoY3haPHklnSGiqV1TZNJU9TM2sB+NwnL0BV0ib667Prc2wUI hEpgfQLlYX/PBmTbOmb+Ks8DSADQRo+96xOXfMGbtiqyYCeNqHC2QHVNhJrWVYKWIQt+ I3jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=z7WErAa1svouJ5RTcfagEeGuPrLYcmmXJIIkL6H2OPU=; fh=gbRfs4Y5vnVImbARvTpg01BxMh7cDiEnWtMIRe61H1s=; b=DNr8pq0VDlXkBnzzHNflTk2/QYp/XB5EOxFn+aixOBlNnv409feEnSRPG6POJXB3/W q2V0mTS5HG4RVP2PwSfgAMVDBcGg1B0wPXJ7t7AIktiifJ0JOUqqVNDHoHsstyrQgrwQ hyG11F8/1P904IfSN+rB1O1bv/4Mo5Q5lBqiKNuY1o7GzZkjVooJxZMrfiwW3ea7nYk+ 0vZOp9smlt2ShriTQph/NTyW2O6lA6b7NFFQCWr8WeJfI2MtUOaPOfGA76sr18ITFDTk UbJugPYb0yDx9krsXgxDpbOmPhbrSDV6SqHkwCOHZAzQwFnTCrmi3yZJENM+2sVbgfUP lmAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=V1WQxxcu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id z8-20020a6552c8000000b005c612569dbcsi7824186pgp.457.2023.12.12.10.11.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 10:11:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=V1WQxxcu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 2C9308022A8D; Tue, 12 Dec 2023 10:11:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377157AbjLLSK6 (ORCPT + 99 others); Tue, 12 Dec 2023 13:10:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235100AbjLLSKn (ORCPT ); Tue, 12 Dec 2023 13:10:43 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51353A1 for ; Tue, 12 Dec 2023 10:10:50 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-50d11bd3144so242e87.0 for ; Tue, 12 Dec 2023 10:10:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1702404648; x=1703009448; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=z7WErAa1svouJ5RTcfagEeGuPrLYcmmXJIIkL6H2OPU=; b=V1WQxxcuz17BnLaK4YJEOjJtw9DQ/Ivzswz5cBSt6e7iOjUvDsuWq/DFOYpyWV8SFd TzvTRzGieUzWCPjRIZum9Z8zNaD8MrfLMTOQ+RoiqLCFN2BtJElqcV6qWCwnZSGeNM9B l4/NSMAZQtIfzST4//xDq8fR4EKcGcXSrq5LWEUOM/wA9g58nERZKChz0ERK/YpGNY46 920j9YpQ7GGADgpDC58b0Rzq2EiE/IQk3wkbYkShKafgj5HvuNixWHbT3jU5Ge4C2gga 1Eyrg6ZpHMRE5lui5wIsXFifXmcB+5HK7Burz0TpmlCQ3Vtgw3jrGAFxCkPEsXbFBZnE MHgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702404648; x=1703009448; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z7WErAa1svouJ5RTcfagEeGuPrLYcmmXJIIkL6H2OPU=; b=YoeElVW9PadJkuudJMuEmhAqvG55aEdylxtsHkTMk2QVAo1PQjW9KBOo+YQXlEwRNG XM65F+LorSYo4fMdkbHEXzdu40yOxdbr/UtGV1NC2WyDtDORScRoX6+1ZqGsnrZXvxIw hsd7yEydU14STDc44zYFo22SyGNqA17ZYuo1jZOTDMHM1wwZp+MyXXtUqqoEikAbRc1A qUuJOkVFWCfQPXZDhuUF9HlYOXbRXbAXhSBOaUMvQWrV2b1afqj01/183sumAb/CdZ78 OpLiPrfQ6V6FziPB4Z36hwMIB4KqF7xiYxS1lv4udBaQn1NdBlGNJGcbU5XsT8lxi65t tRaQ== X-Gm-Message-State: AOJu0YxEDZnn9bvbhlzkCDa7W/yd2QQmk9EK592xtiTfXUd+AfFWV5Ah FD+BRCBgkQajzo+Pmkvr1nFEOIUhe3D7WyJ495e0lQ== X-Received: by 2002:a19:5e41:0:b0:50a:519d:5a8a with SMTP id z1-20020a195e41000000b0050a519d5a8amr278722lfi.5.1702404648263; Tue, 12 Dec 2023 10:10:48 -0800 (PST) MIME-Version: 1.0 References: <20231212070547.612536-1-namhyung@kernel.org> In-Reply-To: <20231212070547.612536-1-namhyung@kernel.org> From: Ian Rogers Date: Tue, 12 Dec 2023 10:10:37 -0800 Message-ID: Subject: Re: [PATCH 0/3] perf tools: Random fixes for DWARF unwind To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, Milian Wolff , Pablo Galindo , Fangrui Song Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 12 Dec 2023 10:11:29 -0800 (PST) On Mon, Dec 11, 2023 at 11:05=E2=80=AFPM Namhyung Kim = wrote: > > 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. We have a JIT test in: https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tr= ee/tools/perf/tests/shell/test_java_symbol.sh?h=3Dperf-tools-next It'd be great if we could do similar for CPython. Thanks, Ian > 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, > Namhyung > > > 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 >