Re: [PATCH] perf trace: propagate evsel__set_filter() error in trace__expand_filter()

From: Namhyung Kim

Date: Thu Nov 19 2026 - 22:54:42 EST


On Thu, 12 Nov 2026 16:09:21 +0800, Gu Bin wrote:
> At the end of trace__expand_filter(), the return value of
> evsel__set_filter() is ignored. When the strdup() inside fails with
> -ENOMEM, the function returns 0 anyway, leaving evsel->filter holding
> the unexpanded filter, which still contains the symbolic constants the
> loop meant to resolve. The failure then surfaces later and indirectly:
> evlist__apply_filters() passes the unexpanded string to the tracepoint
> filter parser, which rejects the symbolic name, so perf trace fails to
> start with a filter syntax error whose real cause is the missed
> allocation.
>
> [...]

Applied to perf-tools-next, thanks!

Best regards
Namhyung