|
|
Log in / Subscribe / Register

perf tools: Enhance namespace and chroot handling

From:  Namhyung Kim <namhyung-AT-kernel.org>
To:  Arnaldo Carvalho de Melo <acme-AT-kernel.org>
Subject:  [PATCH v1 00/11] perf tools: Enhance namespace and chroot handling
Date:  Fri, 23 Oct 2026 00:11:30 -0700
Message-ID:  <20261023071141.134149-1-namhyung@kernel.org>
Cc:  Ian Rogers <irogers-AT-google.com>, Jiri Olsa <jolsa-AT-kernel.org>, Adrian Hunter <adrian.hunter-AT-intel.com>, James Clark <james.clark-AT-linaro.org>, Peter Zijlstra <peterz-AT-infradead.org>, Ingo Molnar <mingo-AT-kernel.org>, LKML <linux-kernel-AT-vger.kernel.org>, linux-perf-users-AT-vger.kernel.org
Archive-link:  Article

Hello,

This patchset improves namespace and chroot handling with regards to
file access.  Basically it reads the information from the proc file
system but it's only meaningful when you run the perf command on the
same machine and the target thread is still alive.

Also some file types don't need to namespace and chroot translation
because they are located in a global directory and expected to be in
the same namespace and root directory with the perf command itself.

Thanks,
Namhyung


Namhyung Kim (11):
  perf tools: Add HEADER_BOOT_ID feature
  perf tools: Add perf_env__is_same_boot()
  perf tools: Add nsinfo__new_thread() to track tid
  perf tools: Defer /proc lookup until nsinfo is used
  perf tools: Verify thread status and mount namespace inode
  perf tools: Check thread liveness when accessing /proc
  perf tools: Handle chroot inside nsinfo__mountns_enter()
  perf tools: Export filename__read_build_id_ns()
  perf tools: Remove redundant chroot handling
  perf tools: Only enter mount namespace if necessary
  perf tools: Scope mount namespace entry in dso__load()

 .../Documentation/perf.data-file-format.txt   |   5 +
 tools/perf/builtin-inject.c                   |  13 +-
 tools/perf/builtin-trace.c                    |   2 +-
 tools/perf/util/build-id.c                    |   6 +-
 tools/perf/util/capstone.c                    |   6 +-
 tools/perf/util/dso.c                         |  41 +---
 tools/perf/util/dso.h                         |  36 ++-
 tools/perf/util/dsos.c                        |  17 +-
 tools/perf/util/env.c                         |  65 +++++
 tools/perf/util/env.h                         |   3 +
 tools/perf/util/header.c                      |  28 +++
 tools/perf/util/header.h                      |   1 +
 tools/perf/util/machine.c                     |  12 +-
 tools/perf/util/namespaces.c                  | 230 +++++++++++++++---
 tools/perf/util/namespaces.h                  |  12 +
 tools/perf/util/symbol.c                      |  51 ++--
 tools/perf/util/symbol.h                      |   3 +
 tools/perf/util/thread.c                      |  39 ++-
 tools/perf/util/thread.h                      |   7 +-
 tools/perf/util/util.c                        |  31 ---
 tools/perf/util/util.h                        |   2 -
 21 files changed, 436 insertions(+), 174 deletions(-)

-- 
2.56.0.257.gf7497c7d27-goog




Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds