Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp24055671rwd; Sat, 1 Jul 2023 11:44:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlH/YzBw/thYE9qnJWRk3TR/0evDXbyOWlKqE7IK4qKTJ2spVOAb/lAhL/Rymb5scm7Vej2h X-Received: by 2002:a17:90b:3944:b0:262:f5a0:113c with SMTP id oe4-20020a17090b394400b00262f5a0113cmr3653305pjb.40.1688237050530; Sat, 01 Jul 2023 11:44:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688237050; cv=none; d=google.com; s=arc-20160816; b=DMVdpAYmXxrd54Mv35wtUSIsaQf+jGPMyqFMWS5zdk9q8kOYU3ZAZkjL8KbGbj2n02 whMxyqBDexWaXRtL5Vuw3furOt1uDJUVppFoYSCkhrzR3jmAHOTqAzIyyESJyhEPTdL7 C+05DAAyDS+PQbb9hfx6KQ6dlCbmyjRrbXeFp9EINgkih/gkjsUjEOBrDh6EuDwdGk+8 7bvmaMUqEcfTLylppK+Ys46T3k09N3/6Rswq+QCCAsUOpflBESAzVhdct0vJSA4aEhd/ l0bzKdaoDW06jcFtsibMdkx9QmuIVsmFInj70t+n9B1rmJCAPvOVLAqlJyXvuBIFB694 9i+w== 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; bh=ed6be7U0LH//ldxdWT9JDWo2tW0m8qz6FH1ZcXSRapg=; fh=Rnq0AKuiPtELQXdGRhwao+EBZ8LdzQLCcBVhn2HS4ZU=; b=eCIMQ/rZavSQetwv6BaNw5vgkypo6290X3dTVJi5ubOIR1FAFL5lzPbetFGJdLs4cn +LD+wcj0pUrA9SBIpwimdh2PZyKWhseCs3NR5wJslAFv3ZRQn3HR6bLSJ+RWmqlQNVwn 1cbXD2iXnPywmuEu0RIpfW5av1cJHg9l72Ry/6bfopnOYWcg+xx790VNFF2Ea05rU/Ep l/+3vivjD1rSit/rm+O2wrIFc7eaBZXighoJlp6r0wdsg+kdLI3kr8A97gighS46gzRR YgaBVnf4nusWMCa+v1X9Q56LHbX/TmNyKJ9tNDSSYGEFV/STvGoJYSylJGLBYXzy/GSx LBdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oc4-20020a17090b1c0400b00262e77d645asi14170763pjb.174.2023.07.01.11.43.58; Sat, 01 Jul 2023 11:44:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230025AbjGASNq convert rfc822-to-8bit (ORCPT + 99 others); Sat, 1 Jul 2023 14:13:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjGASNp (ORCPT ); Sat, 1 Jul 2023 14:13:45 -0400 Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com [209.85.219.180]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFC2D1BC6; Sat, 1 Jul 2023 11:13:44 -0700 (PDT) Received: by mail-yb1-f180.google.com with SMTP id 3f1490d57ef6-be30cbe88b3so3164985276.1; Sat, 01 Jul 2023 11:13:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688235224; x=1690827224; 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=D4wue8LL+TgYf3QfbzqCOd+bCBl/YM/OaJxPurIPIJo=; b=P6XQhHL/Cna3X3S5JeufEczqNHw3UvYLg4IZmoY+Sww+64Q6oyDMRUKQ59zewJFqP7 Eu5lodJjU7qHZ4NBMAj/U1pKkQu5VAhFsOOd8QFx3CFVxdrLnKv3UD4p5WxxxODu74Lo seJh4mVfsd7MdUamquvHbl01zkkfMWNMXkHVjTifiUu9wP3osPf3M1ZMp6kmNGa7A+7j 3NAWmfGE/Aq56iV2JScQWq0eR2Dw5ShC6mSFxH0ZTIZK4kp47hz0qpvBiK+5RGeMdzON KiSK9D/uMU+V0hsfgVKzVZknQsps+qmLUhjvut3z0Hpp1vsE48narod0B5rz59J7duYK 82uA== X-Gm-Message-State: ABy/qLaIhpyiIx+wG0bGwD5F1Gv1DoE2Ts+MZvgjZIERd87m66NbtMq7 tHZg8LTPWDnFnNkJRVh6KTdHEycNIcWemRSPFC8= X-Received: by 2002:a25:74d4:0:b0:bc9:f1a3:71d7 with SMTP id p203-20020a2574d4000000b00bc9f1a371d7mr5889098ybc.60.1688235223829; Sat, 01 Jul 2023 11:13:43 -0700 (PDT) MIME-Version: 1.0 References: <20230630-perf-libdw-symfs-v2-1-469760dd4d5b@axis.com> In-Reply-To: <20230630-perf-libdw-symfs-v2-1-469760dd4d5b@axis.com> From: Namhyung Kim Date: Sat, 1 Jul 2023 11:13:32 -0700 Message-ID: Subject: Re: [PATCH v2] perf: unwind: Fix symfs with libdw To: Vincent Whitchurch Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@axis.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Fri, Jun 30, 2023 at 2:11 AM Vincent Whitchurch wrote: > > Pass the full path including the symfs (if any) to libdw. Without this > unwinding fails with errors like this when a symfs is used: > > unwind: failed with 'No such file or directory'" > > Signed-off-by: Vincent Whitchurch > --- > I posted this last year but didn't receive any comments. This patch is > still needed in current mainline so here is a rebased version, fixing > some merge conflicts. Sorry that you didn't get any feedback. Looks like a real problem. > > Changes in v2: > - Rebased to v6.4. > - Link to v1: https://lore.kernel.org/lkml/20221125112743.2285759-1-vincent.whitchurch@axis.com/ In general, you'd better base your perf tools changes on the perf/perf-tools (for fixes) or perf/perf-tools-next (for new features) in git.kernel.org. But it seems this change applies cleanly. > --- > tools/perf/util/unwind-libdw.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/tools/perf/util/unwind-libdw.c b/tools/perf/util/unwind-libdw.c > index bdccfc511b7e2..30a63d819d74e 100644 > --- a/tools/perf/util/unwind-libdw.c > +++ b/tools/perf/util/unwind-libdw.c > @@ -66,9 +66,13 @@ static int __report_module(struct addr_location *al, u64 ip, > mod = 0; > } > > - if (!mod) > - mod = dwfl_report_elf(ui->dwfl, dso->short_name, dso->long_name, -1, > + if (!mod) { > + char filename[PATH_MAX]; > + > + __symbol__join_symfs(filename, sizeof(filename), dso->long_name); As __symbol__join_symfs() will have dso->long_name when symfs is not set, I don't think it changes the behavior, so Acked-by: Namhyung Kim Thanks, Namhyung > + mod = dwfl_report_elf(ui->dwfl, dso->short_name, filename, -1, > map__start(al->map) - map__pgoff(al->map), false); > + } > if (!mod) { > char filename[PATH_MAX]; > > > --- > base-commit: 6995e2de6891c724bfeb2db33d7b87775f913ad1 > change-id: 20230630-perf-libdw-symfs-9adb29f4df7d > > Best regards, > -- > Vincent Whitchurch >