Re: [PATCH] tools: perf: allow opt-in "no-dso." files in /dev/shm
From: Namhyung Kim
Date: Wed Nov 04 2026 - 16:59:30 EST
On Tue, Oct 13, 2026 at 02:38:41PM -0700, Stephen Brennan wrote:
> Applications can place JIT-compiled code in POSIX shared memory so that
> multiple processes can execute the same code. On Linux, these shared
> memory objects appear as file mappings under /dev/shm.
>
> Perf uses /tmp/perf-$pid.map to resolve symbols for executable SysV
> shared memory mappings, but it treats /dev/shm mappings as ordinary
> DSOs. As a result, applications which provide perf-map symbols for JIT
> code in POSIX shared memory don't get those symbols resolved, while they
> do with SysV shared memory.
>
> It would be incorrect to classify every /dev/shm mapping as no-DSO
> memory though, because /dev/shm is just a tmpfs mount, and it can
> contain ELF files.
>
> Add a filename prefix "/dev/shm/no-dso." which is recognized by
> is_no_dso_memory(). Applications can opt-in by naming their shared
> memory objects "no-dso.<name>". Executable mappings with this prefix
> will use the perf-map file, while other /dev/shm mappings will keep the
> existing behavior. This allows applications that already emit perf maps
> to use POSIX shared memory for JIT code, without needing to implement
> jitdump support.
>
> Signed-off-by: Stephen Brennan <stephen.s.brennan@xxxxxxxxxx>
Applied to perf-tools-next, thanks!
Best regards
Namhyung