From nobody Tue Jun 30 00:48:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85DE6C433EF for ; Fri, 28 Jan 2022 20:40:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230151AbiA1Uk3 (ORCPT ); Fri, 28 Jan 2022 15:40:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351300AbiA1Ujz (ORCPT ); Fri, 28 Jan 2022 15:39:55 -0500 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DC2FC061755 for ; Fri, 28 Jan 2022 12:39:54 -0800 (PST) Received: by mail-pj1-x1029.google.com with SMTP id s61-20020a17090a69c300b001b4d0427ea2so11902342pjj.4 for ; Fri, 28 Jan 2022 12:39:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BY01qBOdjhAiiWa9uW1+iF389ifyWGwXOZ9xdr+rmug=; b=BH/szD6siBQk1860WgLRHuVgS9NK22OdxswVJJSSTpe4HGziKWTdpaIJx2LVb/rXDX Ci7DSCWo9dO/0/lrBOGIjG8c91iIHAkf7bklmi6IebAztyL+f+mU5XUK5a9MQRmzna1J 9iZHv0qjHuWX0P95440lpoQztT6kcHiy2IzZF3xdvwF0dlcqffD5I/UdoR9rId1ym/Fv YI4tItrur8C2GtNOMImHO3sIfYj/QxEniOoDCvkVKTw02gZftVhDU8SsKrjpK5AQEf4K 6rdkbgppGu5tQZtnJb4va+BQVV6vNFkykMUlT8AY61N8bz+tjhn0LeICGHEH9o21lZoR tz7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=BY01qBOdjhAiiWa9uW1+iF389ifyWGwXOZ9xdr+rmug=; b=kCv6D8+mrpA7Gon0m16j0acHVnS47EELWkZcMNKRG5ql7RW1cT85ktAlblGJG8CqUf wRdUVfKZqNZ8JA5gl1mWRHFMizYFoUvHcsSUxfDKlwWHKL9cUbaNBP5lbYP4sfD9eOvU GtNNcGlm+dA2ZF2KFHsGNnfMjVNBm8jV7wH9ir0pacLJ7Lk/YVQF38O1Y+dC7RUUHDDe xM70RF9dCJ0WEKM5+godSlZKJ0NKuZ3aWV0zsEIBtVlCLS8h6uVeUeQOv714RlFMjkVR BCAIDxhUAN4+OH24MD7wh1qbQL0m8EtOCJTU30Cxog8BsXtviydAwIpjEsZJOCPNK/gb kk9Q== X-Gm-Message-State: AOAM530pM4NccuUVglv51jUT2u0ShqJCctFKmqG6cqXWNDopp6bbQrEz +1Ib+yZVaQTHJShJhHFmrsg= X-Google-Smtp-Source: ABdhPJwgr6KUeRY0eaPfaew+ad43L7zs2q+PVU48ZWEnOX3MI42QJTTibPPW9E1dIOHVxRrzeFyZKw== X-Received: by 2002:a17:90b:4a8e:: with SMTP id lp14mr21643443pjb.75.1643402394057; Fri, 28 Jan 2022 12:39:54 -0800 (PST) Received: from balhae.hsd1.ca.comcast.net ([2601:647:4800:c6f0:f13b:bc2c:fac:4a86]) by smtp.gmail.com with ESMTPSA id k3sm11235428pfu.180.2022.01.28.12.39.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jan 2022 12:39:53 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ingo Molnar , Peter Zijlstra , LKML , Andi Kleen , Ian Rogers Subject: [PATCH 1/3] perf tools: Try chroot'ed filename when opening dso/symbol Date: Fri, 28 Jan 2022 12:39:48 -0800 Message-Id: <20220128203950.3371061-2-namhyung@kernel.org> X-Mailer: git-send-email 2.35.0.rc2.247.g8bbb082509-goog In-Reply-To: <20220128203950.3371061-1-namhyung@kernel.org> References: <20220128203950.3371061-1-namhyung@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Currently it doesn't handle tasks in chroot properly. As filenames in MMAP records base on their root directory, it's different than what perf tool can see from outside. Add filename_with_chroot() helper to deal with those cases. The function returns a new filename only if it's in a different root directory. Since it needs to access /proc for the process, it only works until the task exits. With this change, I can see symbols in my program like below. # perf record -o- chroot myroot myprog 3 | perf report -i- ... # # Overhead Command Shared Object Symbol # ........ ....... ................. ............................. # 99.83% myprog myprog [.] loop 0.04% chroot [kernel.kallsyms] [k] fxregs_fixup 0.04% chroot [kernel.kallsyms] [k] rsm_load_seg_32 ... Signed-off-by: Namhyung Kim --- tools/perf/util/dso.c | 15 +++++++++++++-- tools/perf/util/dsos.c | 13 +++++++++++++ tools/perf/util/symbol.c | 10 ++++++++++ tools/perf/util/util.c | 31 +++++++++++++++++++++++++++++++ tools/perf/util/util.h | 2 ++ 5 files changed, 69 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index 9cc8a1772b4b..5ac13958d1bd 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c @@ -508,8 +508,19 @@ static int __open_dso(struct dso *dso, struct machine = *machine) root_dir, name, PATH_MAX)) goto out; =20 - if (!is_regular_file(name)) - goto out; + if (!is_regular_file(name)) { + char *new_name; + + if (errno !=3D ENOENT || dso->nsinfo =3D=3D NULL) + goto out; + + new_name =3D filename_with_chroot(dso->nsinfo->pid, name); + if (!new_name) + goto out; + + free(name); + name =3D new_name; + } =20 if (dso__needs_decompress(dso)) { char newpath[KMOD_DECOMP_LEN]; diff --git a/tools/perf/util/dsos.c b/tools/perf/util/dsos.c index 183a81d5b2f9..b97366f77bbf 100644 --- a/tools/perf/util/dsos.c +++ b/tools/perf/util/dsos.c @@ -2,12 +2,15 @@ #include "debug.h" #include "dsos.h" #include "dso.h" +#include "util.h" #include "vdso.h" #include "namespaces.h" +#include #include #include #include #include // filename__read_build_id +#include =20 static int __dso_id__cmp(struct dso_id *a, struct dso_id *b) { @@ -76,6 +79,16 @@ bool __dsos__read_build_ids(struct list_head *head, bool= with_hits) if (filename__read_build_id(pos->long_name, &pos->bid) > 0) { have_build_id =3D true; pos->has_build_id =3D true; + } else if (errno =3D=3D ENOENT && pos->nsinfo) { + char *new_name =3D filename_with_chroot(pos->nsinfo->pid, + pos->long_name); + + if (new_name && filename__read_build_id(new_name, + &pos->bid) > 0) { + have_build_id =3D true; + pos->has_build_id =3D true; + } + free(new_name); } nsinfo__mountns_exit(&nsc); } diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index b2ed3140a1fa..34302c61d36b 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -1864,6 +1864,16 @@ int dso__load(struct dso *dso, struct map *map) nsinfo__mountns_exit(&nsc); =20 is_reg =3D is_regular_file(name); + if (!is_reg && errno =3D=3D ENOENT && dso->nsinfo) { + char *new_name =3D filename_with_chroot(dso->nsinfo->pid, + name); + if (new_name) { + is_reg =3D is_regular_file(new_name); + strlcpy(name, new_name, PATH_MAX); + free(new_name); + } + } + #ifdef HAVE_LIBBFD_SUPPORT if (is_reg) bfdrc =3D dso__load_bfd_symbols(dso, name); diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c index fb4f6616b5fa..f8571a66d063 100644 --- a/tools/perf/util/util.c +++ b/tools/perf/util/util.c @@ -431,3 +431,34 @@ void perf_debuginfod_setup(struct perf_debuginfod *di) =20 pr_debug("DEBUGINFOD_URLS=3D%s\n", getenv("DEBUGINFOD_URLS")); } + +/* + * Return a new filename prepended with task's root directory if it's in + * a chroot. Callers should free the returned string. + */ +char *filename_with_chroot(int pid, const char *filename) +{ + char buf[PATH_MAX]; + char proc_root[32]; + char *new_name =3D NULL; + int ret; + + scnprintf(proc_root, sizeof(proc_root), "/proc/%d/root", pid); + ret =3D readlink(proc_root, buf, sizeof(buf) - 1); + if (ret <=3D 0) + return NULL; + + /* readlink(2) does not append a null byte to buf */ + buf[ret] =3D '\0'; + + if (!strcmp(buf, "/")) + return NULL; + + if (strstr(buf, "(deleted)")) + return NULL; + + if (asprintf(&new_name, "%s/%s", buf, filename) < 0) + return NULL; + + return new_name; +} diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index 7b625cbd2dd8..0f78f1e7782d 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h @@ -77,4 +77,6 @@ struct perf_debuginfod { bool set; }; void perf_debuginfod_setup(struct perf_debuginfod *di); + +char *filename_with_chroot(int pid, const char *filename); #endif /* GIT_COMPAT_UTIL_H */ --=20 2.35.0.rc2.247.g8bbb082509-goog From nobody Tue Jun 30 00:48:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5921FC433FE for ; Fri, 28 Jan 2022 20:41:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351619AbiA1UlE (ORCPT ); Fri, 28 Jan 2022 15:41:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351329AbiA1Uj4 (ORCPT ); Fri, 28 Jan 2022 15:39:56 -0500 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 008FCC061748 for ; Fri, 28 Jan 2022 12:39:55 -0800 (PST) Received: by mail-pf1-x42a.google.com with SMTP id u130so7211002pfc.2 for ; Fri, 28 Jan 2022 12:39:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jkp5lO4JPGuhfIXrwkaqpIbB4x+b/JAJMjSbaxdyHLA=; b=ROgivARGyotirjNWqZx+Ry0hCgKtR2sBEDfB6K2EMzKxcZgjUKhyDaUB/9ExOvcpfd MOZUSpHA1POiU/yjzZSTdPa9QZyFyaNEo0CD9MJ0i+q6RFpE1TeUmA1IfGs9OvH+dI2/ eNTId9RUqhsDkcEj9KnfoGfXN3AthuaMdTWESbaUgvZzlyE4kt4P9p4RzAOV1o0aGwl1 tSHUCsFxRIb1kzNazM5CTMT5aH/ohpfZACLsVCpGvnzYhE0VNYXQKaC+5B1jAPSIjYb3 aUkMmT562876yqfchdmZe645R9LL2fqV3XyYgVszBMcmplXtBHLmZwmQMHXe0uevEJZX AVPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=jkp5lO4JPGuhfIXrwkaqpIbB4x+b/JAJMjSbaxdyHLA=; b=sl7mLuWJ7fftynUEEf1iFjQcV3I1ju+kS6eQ+UUByKQYyvexm9WeDxQ+hJFcxmiLbw S6LA8Dya2Bc3yDUeJsP/VA6bWFcHJ/yUVN/UmoMVhG0cAzcTT3eAsYyYNDOrV6aWAXFF qloilJHVGSrAn+Deid+GiGjcPhD2+8uhH0ZxTok1tBu5DUtf74z9isO+aHfKFNWFTMHm wvToC7gd/X/Lz83NW8ruhp1gXeRIlchVclDlTgB9DD/NMBPEjrRfyMpbtFUDbzN/A0p1 Mhu0z/VYyB0SamLpo5kOi858vxPrGY4CusSdBhcALaNEBO3HCaMjsdJDl4MaiA9IcCic Io7Q== X-Gm-Message-State: AOAM533uULKOfdDrBJrCZH5RpXXxSCDHc+q7l3m7wJ5f1jzd+xu78Sdw wurWEg0+Sc5pR0BlCrXhVno= X-Google-Smtp-Source: ABdhPJxMrZoxUZMZkxs65ZEX6aRxbbQCYbNVZmKGPMHDJ0xezO2JSVryQ02nrKGGTBhXv/siM447cg== X-Received: by 2002:a63:174c:: with SMTP id 12mr7737819pgx.425.1643402395197; Fri, 28 Jan 2022 12:39:55 -0800 (PST) Received: from balhae.hsd1.ca.comcast.net ([2601:647:4800:c6f0:f13b:bc2c:fac:4a86]) by smtp.gmail.com with ESMTPSA id k3sm11235428pfu.180.2022.01.28.12.39.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jan 2022 12:39:54 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ingo Molnar , Peter Zijlstra , LKML , Andi Kleen , Ian Rogers Subject: [PATCH 2/3] perf inject: Try chroot directory when reading build-id Date: Fri, 28 Jan 2022 12:39:49 -0800 Message-Id: <20220128203950.3371061-3-namhyung@kernel.org> X-Mailer: git-send-email 2.35.0.rc2.247.g8bbb082509-goog In-Reply-To: <20220128203950.3371061-1-namhyung@kernel.org> References: <20220128203950.3371061-1-namhyung@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" When reading build-id from a DSO, it should consider if it's from a chroot task. In that case, the path is different so it needs to prepend the root directory to access the file correctly. Signed-off-by: Namhyung Kim --- tools/perf/builtin-inject.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c index fbf43a454cba..3be581abbdb6 100644 --- a/tools/perf/builtin-inject.c +++ b/tools/perf/builtin-inject.c @@ -25,6 +25,7 @@ #include "util/synthetic-events.h" #include "util/thread.h" #include "util/namespaces.h" +#include "util/util.h" =20 #include #include @@ -550,6 +551,15 @@ static int dso__read_build_id(struct dso *dso) nsinfo__mountns_enter(dso->nsinfo, &nsc); if (filename__read_build_id(dso->long_name, &dso->bid) > 0) dso->has_build_id =3D true; + else if (dso->nsinfo) { + char *new_name; + + new_name =3D filename_with_chroot(dso->nsinfo->pid, + dso->long_name); + if (new_name && filename__read_build_id(new_name, &dso->bid) > 0) + dso->has_build_id =3D true; + free(new_name); + } nsinfo__mountns_exit(&nsc); =20 return dso->has_build_id ? 0 : -1; --=20 2.35.0.rc2.247.g8bbb082509-goog From nobody Tue Jun 30 00:48:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6DF4CC433F5 for ; Fri, 28 Jan 2022 20:41:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351606AbiA1UlB (ORCPT ); Fri, 28 Jan 2022 15:41:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351343AbiA1Uj6 (ORCPT ); Fri, 28 Jan 2022 15:39:58 -0500 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15A77C061749 for ; Fri, 28 Jan 2022 12:39:57 -0800 (PST) Received: by mail-pj1-x1031.google.com with SMTP id z14-20020a17090ab10e00b001b6175d4040so6172865pjq.0 for ; Fri, 28 Jan 2022 12:39:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=X5ESwBG6b6i8YhyGmxv/0fv/Q3LnACC0URr3jF91X2A=; b=iYmzpNKUB+T1KgiTlY8iN4WQBCiTqcfAWm+z84/sPor3C7bmf7+mUMiaTRG/oND6FB BDR9JWd1CbK3BIi2W55gBn584SnlQSJy2RO1H4MST8WWIaipkIGxlqG12dkujRdNcFxZ KVtEiHX0S4w+LiE/IkqQyXDa75IuUyBFuFfGpy0rTWjOXJT0/dAmGDtXBelwtdxRgoRg 5JNre7akcL5OT7jdA0/I2j63+hAqG6fS1fV5BZyRjHdTjqrM2wd7UWq8HYgRP/cGazty JevFy+nRYeGvx7wTj72M+ONS+LxyMbXR9EqvmxGlEgYTxUi/uHG0Hj4QAuIMUTqNjWkx uzwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=X5ESwBG6b6i8YhyGmxv/0fv/Q3LnACC0URr3jF91X2A=; b=b859edkUltVFbDc7pdbpx6ioX8z6OVMwsuF6J2JCOphkTSnlT0XPaMKX0aPC0Fl4aw QGhFmuD1wdJIOUmL6qmqP0MegIEollquvJrfrqVxJ8yfj1wo2rR+ua85kd3rpBnT3YgK zIYybIN7mU1keok5dAJb7/R6ULgk/Yz3A9SQx5gZX7wnkMgGVYWagHspBekvVtVAUfim z987eVImvMVlcjXvVCYyC8HbnJ0KIri4pz5C4KiFCJcjH/T3rouWIJE4dC4V3zWm1pa3 NLXW84mKyPgnNpRlxMPCzTH3j6blsHJFiEfe2Le5FHJA+e5bDzBaY0b+sF6pVHGASclq zE9A== X-Gm-Message-State: AOAM530/gs4cSh6HZppxLRKkHSEbAKb17YUMntQEcKroQMvo374RPH3g +A2V9SRSweRomDU/2A5mfyDpdBH+tG4= X-Google-Smtp-Source: ABdhPJzAS2fSWsX/31YAia8UJG3e+/r/1gwfUk5/Kk1CegWUYeuwMBko3o1v5L4NS/lRYdlQSPgXzg== X-Received: by 2002:a17:903:1042:: with SMTP id f2mr10635037plc.115.1643402396610; Fri, 28 Jan 2022 12:39:56 -0800 (PST) Received: from balhae.hsd1.ca.comcast.net ([2601:647:4800:c6f0:f13b:bc2c:fac:4a86]) by smtp.gmail.com with ESMTPSA id k3sm11235428pfu.180.2022.01.28.12.39.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jan 2022 12:39:55 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ingo Molnar , Peter Zijlstra , LKML , Andi Kleen , Ian Rogers Subject: [PATCH 3/3] perf annotate: Try chroot filename for objdump Date: Fri, 28 Jan 2022 12:39:50 -0800 Message-Id: <20220128203950.3371061-4-namhyung@kernel.org> X-Mailer: git-send-email 2.35.0.rc2.247.g8bbb082509-goog In-Reply-To: <20220128203950.3371061-1-namhyung@kernel.org> References: <20220128203950.3371061-1-namhyung@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Likewise, it should use a proper name in case the task runs under chroot. The child_process.err was needed to set to -1 to show error messages properly in TUI. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa --- tools/perf/util/annotate.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 01900689dc00..e4c641b240df 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -33,6 +33,7 @@ #include "string2.h" #include "util/event.h" #include "arch/common.h" +#include "namespaces.h" #include #include #include @@ -1696,6 +1697,15 @@ static int dso__disassemble_filename(struct dso *dso= , char *filename, size_t fil * DSO is the same as when 'perf record' ran. */ __symbol__join_symfs(filename, filename_size, dso->long_name); + + if (access(filename, R_OK) && errno =3D=3D ENOENT && dso->nsinfo) { + char *new_name =3D filename_with_chroot(dso->nsinfo->pid, + filename); + if (new_name) { + strlcpy(filename, new_name, filename_size); + free(new_name); + } + } } =20 free(build_id_path); @@ -2036,6 +2046,7 @@ static int symbol__disassemble(struct symbol *sym, st= ruct annotate_args *args) memset(&objdump_process, 0, sizeof(objdump_process)); objdump_process.argv =3D objdump_argv; objdump_process.out =3D -1; + objdump_process.err =3D -1; if (start_command(&objdump_process)) { pr_err("Failure starting to run %s\n", command); err =3D -1; --=20 2.35.0.rc2.247.g8bbb082509-goog