Re: [PATCH v1 0/5] Remove NO_AUXTRACE build option

From: Ian Rogers

Date: Tue Nov 11 2025 - 13:01:52 EST


On Mon, Nov 10, 2025 at 10:21 PM Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
>
> Hi Ian,
>
> On Sun, Nov 09, 2025 at 05:31:47PM -0800, Ian Rogers wrote:
> > Switch the __get_cpuid feature for intel-pt to use the provided cpuid
> > function in perf, this removes the need for NO_AUXTRACE when the
> > feature detection fails. Remove the now unnecessary feature
> > detection. Remove NO_AUXTRACE as it just builds a more broken version
>
> Can you please elaborate what the broken part is?

Sure. I'll summarize what alters in patch 4. NO_AUXTRACE is
controlling 3 main things:
* set up of aux options for PMUs (code in the arch directory)
* ARM: coresight and SPE
* Intel: BTS and PT
* PowerPC: VPA DTL
* S390: cpumsf
* support for decoding aux events (common code that can be
cross-compiled assuming other library dependencies are available)
* ARM: coresight
* HiSi: PTT decoder
* Intel: BTS and PT
* PowerPC: VPA DTL
* S390: cpumsf
* Tool support for aux buffers (common shared builtin code):
* perf record: aux options for events, snapshot, aux-sample
* perf inject: aux events will fail the entire perf inject command

So somebody with a NO_AUXTRACE build would generally experience a very
sad perf command. Having the option made sense when there were feature
tests that could fail, but possibly that should have just controlled
not compiling intel-pt. Having the option is extra burden on
developers/maintainers, as shown in my comment:

> This was prompted by needing to make a v2 patch set of:
> https://lore.kernel.org/lkml/20251107170712.2302714-1-irogers@xxxxxxxxxx/
> due to a broken NO_AUXTRACE configuration.

Somebody may have been using NO_AUXTRACE as a proxy for not having
some library, but I don't see that in the code. If this is the case we
should add the appropriate feature test, ..
Not having NO_AUXTRACE may have been a bug work around for someone, in
which case we should work to fix the bug. Again, I don't know of this
case and don't see it in the code.

Thanks,
Ian

> Thanks,
> Namhyung