Re: [PATCH v2 1/2] perf inject: Add --convert-callchain option

Arnaldo Carvalho de Melo
2026-01-13T21:24:54Z

On Tue, Jan 13, 2026 at 01:15:06PM -0800, Namhyung Kim wrote:
> On Tue, Jan 13, 2026 at 04:38:31PM -0300, Arnaldo Carvalho de Melo wrote:
> > On Fri, Jan 09, 2026 at 05:17:14PM -0800, Namhyung Kim wrote:
> > > There are applications not built with frame pointers, so DWARF is needed
> > > to get the stack traces. So `perf record --call-graph dwarf` saves the
> > > stack and register data for each sample to get the stacktrace offline.
> > > But sometimes those data may have sensitive information and we don't
> > > want to keep them in the file.

> > > This perf inject --convert-callchain option parses the callchains and
> > > discard the stack and register after that. This will save storage space
> > > and processing time for the new data file. Of course, users should
> > > remove the original data file. :)

> > This made me think for a while to finally realize this is not a general
> > purpose "convert callchain" option, but one that converts to ip-based
> > callchains specificaly, useful and probably can stay with this name, or
> > maybe we could use --resolve-callchains as we use
> > thread__resolve_callchain() for that anyway?

> IIUC resolving callchain is to get DSO/map and symbol from raw data.
> But I admit the name is general but have no other idea. :)

Naming is difficult, I think we can keep as --convert-callchain, if we
ever want to do other kind of conversion than from DWARF to IP we can
just pass arguments to this option, with it without options, as is now,
meaning the most common convertion, the one being done in your patch.

I'll apply the patch as is, thanks.

- Arnaldo